1 #! /bin/sh
   2 # Guess values for system-dependent variables and create Makefiles.
   3 # Generated by GNU Autoconf 2.68 for OpenJDK jdk8.
   4 #
   5 # Report bugs to <build-dev@openjdk.java.net>.
   6 #
   7 #
   8 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
   9 # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
  10 # Foundation, Inc.
  11 #
  12 #
  13 # This configure script is free software; the Free Software Foundation
  14 # gives unlimited permission to copy, distribute and modify it.
  15 ## -------------------- ##
  16 ## M4sh Initialization. ##
  17 ## -------------------- ##
  18 
  19 # Be more Bourne compatible
  20 DUALCASE=1; export DUALCASE # for MKS sh
  21 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
  22   emulate sh
  23   NULLCMD=:
  24   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
  25   # is contrary to our usage.  Disable this feature.
  26   alias -g '${1+"$@"}'='"$@"'
  27   setopt NO_GLOB_SUBST
  28 else
  29   case `(set -o) 2>/dev/null` in #(
  30   *posix*) :
  31     set -o posix ;; #(
  32   *) :
  33      ;;
  34 esac
  35 fi
  36 
  37 
  38 as_nl='
  39 '
  40 export as_nl
  41 # Printing a long string crashes Solaris 7 /usr/bin/printf.
  42 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
  43 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
  44 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
  45 # Prefer a ksh shell builtin over an external printf program on Solaris,
  46 # but without wasting forks for bash or zsh.
  47 if test -z "$BASH_VERSION$ZSH_VERSION" \
  48     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
  49   as_echo='print -r --'
  50   as_echo_n='print -rn --'
  51 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
  52   as_echo='printf %s\n'
  53   as_echo_n='printf %s'
  54 else
  55   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
  56     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
  57     as_echo_n='/usr/ucb/echo -n'
  58   else
  59     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
  60     as_echo_n_body='eval
  61       arg=$1;
  62       case $arg in #(
  63       *"$as_nl"*)
  64         expr "X$arg" : "X\\(.*\\)$as_nl";
  65         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
  66       esac;
  67       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
  68     '
  69     export as_echo_n_body
  70     as_echo_n='sh -c $as_echo_n_body as_echo'
  71   fi
  72   export as_echo_body
  73   as_echo='sh -c $as_echo_body as_echo'
  74 fi
  75 
  76 # The user is always right.
  77 if test "${PATH_SEPARATOR+set}" != set; then
  78   PATH_SEPARATOR=:
  79   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
  80     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
  81       PATH_SEPARATOR=';'
  82   }
  83 fi
  84 
  85 
  86 # IFS
  87 # We need space, tab and new line, in precisely that order.  Quoting is
  88 # there to prevent editors from complaining about space-tab.
  89 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
  90 # splitting by setting IFS to empty value.)
  91 IFS=" ""        $as_nl"
  92 
  93 # Find who we are.  Look in the path if we contain no directory separator.
  94 as_myself=
  95 case $0 in #((
  96   *[\\/]* ) as_myself=$0 ;;
  97   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  98 for as_dir in $PATH
  99 do
 100   IFS=$as_save_IFS
 101   test -z "$as_dir" && as_dir=.
 102     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
 103   done
 104 IFS=$as_save_IFS
 105 
 106      ;;
 107 esac
 108 # We did not find ourselves, most probably we were run as `sh COMMAND'
 109 # in which case we are not to be found in the path.
 110 if test "x$as_myself" = x; then
 111   as_myself=$0
 112 fi
 113 if test ! -f "$as_myself"; then
 114   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
 115   exit 1
 116 fi
 117 
 118 # Unset variables that we do not need and which cause bugs (e.g. in
 119 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
 120 # suppresses any "Segmentation fault" message there.  '((' could
 121 # trigger a bug in pdksh 5.2.14.
 122 for as_var in BASH_ENV ENV MAIL MAILPATH
 123 do eval test x\${$as_var+set} = xset \
 124   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
 125 done
 126 PS1='$ '
 127 PS2='> '
 128 PS4='+ '
 129 
 130 # NLS nuisances.
 131 LC_ALL=C
 132 export LC_ALL
 133 LANGUAGE=C
 134 export LANGUAGE
 135 
 136 # CDPATH.
 137 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 138 
 139 if test "x$CONFIG_SHELL" = x; then
 140   as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
 141   emulate sh
 142   NULLCMD=:
 143   # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
 144   # is contrary to our usage.  Disable this feature.
 145   alias -g '\${1+\"\$@\"}'='\"\$@\"'
 146   setopt NO_GLOB_SUBST
 147 else
 148   case \`(set -o) 2>/dev/null\` in #(
 149   *posix*) :
 150     set -o posix ;; #(
 151   *) :
 152      ;;
 153 esac
 154 fi
 155 "
 156   as_required="as_fn_return () { (exit \$1); }
 157 as_fn_success () { as_fn_return 0; }
 158 as_fn_failure () { as_fn_return 1; }
 159 as_fn_ret_success () { return 0; }
 160 as_fn_ret_failure () { return 1; }
 161 
 162 exitcode=0
 163 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
 164 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
 165 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
 166 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
 167 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
 168 
 169 else
 170   exitcode=1; echo positional parameters were not saved.
 171 fi
 172 test x\$exitcode = x0 || exit 1"
 173   as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
 174   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
 175   eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
 176   test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
 177 test \$(( 1 + 1 )) = 2 || exit 1"
 178   if (eval "$as_required") 2>/dev/null; then :
 179   as_have_required=yes
 180 else
 181   as_have_required=no
 182 fi
 183   if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
 184 
 185 else
 186   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 187 as_found=false
 188 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
 189 do
 190   IFS=$as_save_IFS
 191   test -z "$as_dir" && as_dir=.
 192   as_found=:
 193   case $as_dir in #(
 194          /*)
 195            for as_base in sh bash ksh sh5; do
 196              # Try only shells that exist, to save several forks.
 197              as_shell=$as_dir/$as_base
 198              if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
 199                     { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
 200   CONFIG_SHELL=$as_shell as_have_required=yes
 201                    if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
 202   break 2
 203 fi
 204 fi
 205            done;;
 206        esac
 207   as_found=false
 208 done
 209 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
 210               { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
 211   CONFIG_SHELL=$SHELL as_have_required=yes
 212 fi; }
 213 IFS=$as_save_IFS
 214 
 215 
 216       if test "x$CONFIG_SHELL" != x; then :
 217   # We cannot yet assume a decent shell, so we have to provide a
 218         # neutralization value for shells without unset; and this also
 219         # works around shells that cannot unset nonexistent variables.
 220         # Preserve -v and -x to the replacement shell.
 221         BASH_ENV=/dev/null
 222         ENV=/dev/null
 223         (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
 224         export CONFIG_SHELL
 225         case $- in # ((((
 226           *v*x* | *x*v* ) as_opts=-vx ;;
 227           *v* ) as_opts=-v ;;
 228           *x* ) as_opts=-x ;;
 229           * ) as_opts= ;;
 230         esac
 231         exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
 232 fi
 233 
 234     if test x$as_have_required = xno; then :
 235   $as_echo "$0: This script requires a shell more modern than all"
 236   $as_echo "$0: the shells that I found on your system."
 237   if test x${ZSH_VERSION+set} = xset ; then
 238     $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
 239     $as_echo "$0: be upgraded to zsh 4.3.4 or later."
 240   else
 241     $as_echo "$0: Please tell bug-autoconf@gnu.org and
 242 $0: build-dev@openjdk.java.net about your system, including
 243 $0: any error possibly output before this message. Then
 244 $0: install a modern shell, or manually run the script
 245 $0: under such a shell if you do have one."
 246   fi
 247   exit 1
 248 fi
 249 fi
 250 fi
 251 SHELL=${CONFIG_SHELL-/bin/sh}
 252 export SHELL
 253 # Unset more variables known to interfere with behavior of common tools.
 254 CLICOLOR_FORCE= GREP_OPTIONS=
 255 unset CLICOLOR_FORCE GREP_OPTIONS
 256 
 257 ## --------------------- ##
 258 ## M4sh Shell Functions. ##
 259 ## --------------------- ##
 260 # as_fn_unset VAR
 261 # ---------------
 262 # Portably unset VAR.
 263 as_fn_unset ()
 264 {
 265   { eval $1=; unset $1;}
 266 }
 267 as_unset=as_fn_unset
 268 
 269 # as_fn_set_status STATUS
 270 # -----------------------
 271 # Set $? to STATUS, without forking.
 272 as_fn_set_status ()
 273 {
 274   return $1
 275 } # as_fn_set_status
 276 
 277 # as_fn_exit STATUS
 278 # -----------------
 279 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
 280 as_fn_exit ()
 281 {
 282   set +e
 283   as_fn_set_status $1
 284   exit $1
 285 } # as_fn_exit
 286 
 287 # as_fn_mkdir_p
 288 # -------------
 289 # Create "$as_dir" as a directory, including parents if necessary.
 290 as_fn_mkdir_p ()
 291 {
 292 
 293   case $as_dir in #(
 294   -*) as_dir=./$as_dir;;
 295   esac
 296   test -d "$as_dir" || eval $as_mkdir_p || {
 297     as_dirs=
 298     while :; do
 299       case $as_dir in #(
 300       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
 301       *) as_qdir=$as_dir;;
 302       esac
 303       as_dirs="'$as_qdir' $as_dirs"
 304       as_dir=`$as_dirname -- "$as_dir" ||
 305 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
 306          X"$as_dir" : 'X\(//\)[^/]' \| \
 307          X"$as_dir" : 'X\(//\)$' \| \
 308          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
 309 $as_echo X"$as_dir" |
 310     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
 311             s//\1/
 312             q
 313           }
 314           /^X\(\/\/\)[^/].*/{
 315             s//\1/
 316             q
 317           }
 318           /^X\(\/\/\)$/{
 319             s//\1/
 320             q
 321           }
 322           /^X\(\/\).*/{
 323             s//\1/
 324             q
 325           }
 326           s/.*/./; q'`
 327       test -d "$as_dir" && break
 328     done
 329     test -z "$as_dirs" || eval "mkdir $as_dirs"
 330   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
 331 
 332 
 333 } # as_fn_mkdir_p
 334 # as_fn_append VAR VALUE
 335 # ----------------------
 336 # Append the text in VALUE to the end of the definition contained in VAR. Take
 337 # advantage of any shell optimizations that allow amortized linear growth over
 338 # repeated appends, instead of the typical quadratic growth present in naive
 339 # implementations.
 340 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
 341   eval 'as_fn_append ()
 342   {
 343     eval $1+=\$2
 344   }'
 345 else
 346   as_fn_append ()
 347   {
 348     eval $1=\$$1\$2
 349   }
 350 fi # as_fn_append
 351 
 352 # as_fn_arith ARG...
 353 # ------------------
 354 # Perform arithmetic evaluation on the ARGs, and store the result in the
 355 # global $as_val. Take advantage of shells that can avoid forks. The arguments
 356 # must be portable across $(()) and expr.
 357 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
 358   eval 'as_fn_arith ()
 359   {
 360     as_val=$(( $* ))
 361   }'
 362 else
 363   as_fn_arith ()
 364   {
 365     as_val=`expr "$@" || test $? -eq 1`
 366   }
 367 fi # as_fn_arith
 368 
 369 
 370 # as_fn_error STATUS ERROR [LINENO LOG_FD]
 371 # ----------------------------------------
 372 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
 373 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
 374 # script with STATUS, using 1 if that was 0.
 375 as_fn_error ()
 376 {
 377   as_status=$1; test $as_status -eq 0 && as_status=1
 378   if test "$4"; then
 379     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
 380     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
 381   fi
 382   $as_echo "$as_me: error: $2" >&2
 383   as_fn_exit $as_status
 384 } # as_fn_error
 385 
 386 if expr a : '\(a\)' >/dev/null 2>&1 &&
 387    test "X`expr 00001 : '.*\(...\)'`" = X001; then
 388   as_expr=expr
 389 else
 390   as_expr=false
 391 fi
 392 
 393 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
 394   as_basename=basename
 395 else
 396   as_basename=false
 397 fi
 398 
 399 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
 400   as_dirname=dirname
 401 else
 402   as_dirname=false
 403 fi
 404 
 405 as_me=`$as_basename -- "$0" ||
 406 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
 407          X"$0" : 'X\(//\)$' \| \
 408          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
 409 $as_echo X/"$0" |
 410     sed '/^.*\/\([^/][^/]*\)\/*$/{
 411             s//\1/
 412             q
 413           }
 414           /^X\/\(\/\/\)$/{
 415             s//\1/
 416             q
 417           }
 418           /^X\/\(\/\).*/{
 419             s//\1/
 420             q
 421           }
 422           s/.*/./; q'`
 423 
 424 # Avoid depending upon Character Ranges.
 425 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
 426 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
 427 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
 428 as_cr_digits='0123456789'
 429 as_cr_alnum=$as_cr_Letters$as_cr_digits
 430 
 431 
 432   as_lineno_1=$LINENO as_lineno_1a=$LINENO
 433   as_lineno_2=$LINENO as_lineno_2a=$LINENO
 434   eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
 435   test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
 436   # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
 437   sed -n '
 438     p
 439     /[$]LINENO/=
 440   ' <$as_myself |
 441     sed '
 442       s/[$]LINENO.*/&-/
 443       t lineno
 444       b
 445       :lineno
 446       N
 447       :loop
 448       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
 449       t loop
 450       s/-\n.*//
 451     ' >$as_me.lineno &&
 452   chmod +x "$as_me.lineno" ||
 453     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
 454 
 455   # Don't try to exec as it changes $[0], causing all sort of problems
 456   # (the dirname of $[0] is not the place where we might find the
 457   # original and so on.  Autoconf is especially sensitive to this).
 458   . "./$as_me.lineno"
 459   # Exit status is that of the last command.
 460   exit
 461 }
 462 
 463 ECHO_C= ECHO_N= ECHO_T=
 464 case `echo -n x` in #(((((
 465 -n*)
 466   case `echo 'xy\c'` in
 467   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
 468   xy)  ECHO_C='\c';;
 469   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
 470        ECHO_T=' ';;
 471   esac;;
 472 *)
 473   ECHO_N='-n';;
 474 esac
 475 
 476 rm -f conf$$ conf$$.exe conf$$.file
 477 if test -d conf$$.dir; then
 478   rm -f conf$$.dir/conf$$.file
 479 else
 480   rm -f conf$$.dir
 481   mkdir conf$$.dir 2>/dev/null
 482 fi
 483 if (echo >conf$$.file) 2>/dev/null; then
 484   if ln -s conf$$.file conf$$ 2>/dev/null; then
 485     as_ln_s='ln -s'
 486     # ... but there are two gotchas:
 487     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
 488     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
 489     # In both cases, we have to default to `cp -p'.
 490     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
 491       as_ln_s='cp -p'
 492   elif ln conf$$.file conf$$ 2>/dev/null; then
 493     as_ln_s=ln
 494   else
 495     as_ln_s='cp -p'
 496   fi
 497 else
 498   as_ln_s='cp -p'
 499 fi
 500 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
 501 rmdir conf$$.dir 2>/dev/null
 502 
 503 if mkdir -p . 2>/dev/null; then
 504   as_mkdir_p='mkdir -p "$as_dir"'
 505 else
 506   test -d ./-p && rmdir ./-p
 507   as_mkdir_p=false
 508 fi
 509 
 510 if test -x / >/dev/null 2>&1; then
 511   as_test_x='test -x'
 512 else
 513   if ls -dL / >/dev/null 2>&1; then
 514     as_ls_L_option=L
 515   else
 516     as_ls_L_option=
 517   fi
 518   as_test_x='
 519     eval sh -c '\''
 520       if test -d "$1"; then
 521         test -d "$1/.";
 522       else
 523         case $1 in #(
 524         -*)set "./$1";;
 525         esac;
 526         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
 527         ???[sx]*):;;*)false;;esac;fi
 528     '\'' sh
 529   '
 530 fi
 531 as_executable_p=$as_test_x
 532 
 533 # Sed expression to map a string onto a valid CPP name.
 534 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
 535 
 536 # Sed expression to map a string onto a valid variable name.
 537 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
 538 
 539 
 540 test -n "$DJDIR" || exec 7<&0 </dev/null
 541 exec 6>&1
 542 
 543 # Name of the host.
 544 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
 545 # so uname gets run too.
 546 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
 547 
 548 #
 549 # Initializations.
 550 #
 551 ac_default_prefix=/usr/local
 552 ac_clean_files=
 553 ac_config_libobj_dir=.
 554 LIBOBJS=
 555 cross_compiling=no
 556 subdirs=
 557 MFLAGS=
 558 MAKEFLAGS=
 559 
 560 # Identity of this package.
 561 PACKAGE_NAME='OpenJDK'
 562 PACKAGE_TARNAME='openjdk'
 563 PACKAGE_VERSION='jdk8'
 564 PACKAGE_STRING='OpenJDK jdk8'
 565 PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
 566 PACKAGE_URL='http://openjdk.java.net'
 567 
 568 # Factoring default headers for most tests.
 569 ac_includes_default="\
 570 #include <stdio.h>
 571 #ifdef HAVE_SYS_TYPES_H
 572 # include <sys/types.h>
 573 #endif
 574 #ifdef HAVE_SYS_STAT_H
 575 # include <sys/stat.h>
 576 #endif
 577 #ifdef STDC_HEADERS
 578 # include <stdlib.h>
 579 # include <stddef.h>
 580 #else
 581 # ifdef HAVE_STDLIB_H
 582 #  include <stdlib.h>
 583 # endif
 584 #endif
 585 #ifdef HAVE_STRING_H
 586 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
 587 #  include <memory.h>
 588 # endif
 589 # include <string.h>
 590 #endif
 591 #ifdef HAVE_STRINGS_H
 592 # include <strings.h>
 593 #endif
 594 #ifdef HAVE_INTTYPES_H
 595 # include <inttypes.h>
 596 #endif
 597 #ifdef HAVE_STDINT_H
 598 # include <stdint.h>
 599 #endif
 600 #ifdef HAVE_UNISTD_H
 601 # include <unistd.h>
 602 #endif"
 603 
 604 ac_subst_vars='LTLIBOBJS
 605 LIBOBJS
 606 CCACHE
 607 USE_PRECOMPILED_HEADER
 608 SJAVAC_SERVER_DIR
 609 ENABLE_SJAVAC
 610 SJAVAC_SERVER_JAVA
 611 JOBS
 612 MEMORY_SIZE
 613 NUM_CORES
 614 ENABLE_INTREE_EC
 615 SALIB_NAME
 616 HOTSPOT_MAKE_ARGS
 617 FIXPATH
 618 LIBCXX
 619 LLVM_LIBS
 620 LLVM_LDFLAGS
 621 LLVM_CFLAGS
 622 LLVM_CONFIG
 623 LIBFFI_LIBS
 624 LIBFFI_CFLAGS
 625 STATIC_CXX_SETTING
 626 LIBDL
 627 LIBM
 628 LIBZIP_CAN_USE_MMAP
 629 USE_EXTERNAL_LIBZ
 630 USE_EXTERNAL_LIBGIF
 631 USE_EXTERNAL_LIBJPEG
 632 ALSA_LIBS
 633 ALSA_CFLAGS
 634 FREETYPE2_LIB_PATH
 635 USING_SYSTEM_FT_LIB
 636 FREETYPE2_LIBS
 637 FREETYPE2_CFLAGS
 638 CUPS_CFLAGS
 639 OPENWIN_HOME
 640 X_EXTRA_LIBS
 641 X_LIBS
 642 X_PRE_LIBS
 643 X_CFLAGS
 644 XMKMF
 645 CXXFLAGS_DEBUG_SYMBOLS
 646 CFLAGS_DEBUG_SYMBOLS
 647 ZIP_DEBUGINFO_FILES
 648 ENABLE_DEBUG_SYMBOLS
 649 COMPILER_SUPPORTS_TARGET_BITS_FLAG
 650 ZERO_ARCHFLAG
 651 LDFLAGS_CXX_JDK
 652 LDFLAGS_JDKEXE_SUFFIX
 653 LDFLAGS_JDKLIB_SUFFIX
 654 LDFLAGS_JDKEXE
 655 LDFLAGS_JDKLIB
 656 CXXFLAGS_JDKEXE
 657 CXXFLAGS_JDKLIB
 658 CFLAGS_JDKEXE
 659 CFLAGS_JDKLIB
 660 MACOSX_VERSION_MIN
 661 PACKAGE_PATH
 662 LEGACY_EXTRA_LDFLAGS
 663 LEGACY_EXTRA_CXXFLAGS
 664 LEGACY_EXTRA_CFLAGS
 665 CXX_FLAG_DEPS
 666 C_FLAG_DEPS
 667 CXX_O_FLAG_NONE
 668 CXX_O_FLAG_NORM
 669 CXX_O_FLAG_HI
 670 CXX_O_FLAG_HIGHEST
 671 C_O_FLAG_NONE
 672 C_O_FLAG_NORM
 673 C_O_FLAG_HI
 674 C_O_FLAG_HIGHEST
 675 POST_MCS_CMD
 676 POST_STRIP_CMD
 677 SET_EXECUTABLE_ORIGIN
 678 SET_SHARED_LIBRARY_ORIGIN
 679 CXX_FLAG_REORDER
 680 C_FLAG_REORDER
 681 SET_SHARED_LIBRARY_MAPFILE
 682 SET_SHARED_LIBRARY_NAME
 683 SHARED_LIBRARY_FLAGS
 684 EXE_SUFFIX
 685 STATIC_LIBRARY_SUFFIX
 686 SHARED_LIBRARY_SUFFIX
 687 LIBRARY_PREFIX
 688 STATIC_LIBRARY
 689 SHARED_LIBRARY
 690 OBJ_SUFFIX
 691 COMPILER_NAME
 692 JT_HOME
 693 JTREGEXE
 694 LIPO
 695 ac_ct_OBJDUMP
 696 OBJDUMP
 697 ac_ct_OBJCOPY
 698 OBJCOPY
 699 MCS
 700 STRIP
 701 GNM
 702 NM
 703 AS
 704 CXXCPP
 705 CPP
 706 COMPILER_TYPE
 707 RC_FLAGS
 708 DUMPBIN
 709 WINAR
 710 HOTSPOT_RC
 711 HOTSPOT_MT
 712 RC
 713 MT
 714 WINLD
 715 HOTSPOT_LD
 716 HOTSPOT_CXX
 717 ARFLAGS
 718 AR
 719 LDEXECXX
 720 LDCXX
 721 LDEXE
 722 LD
 723 ac_ct_OBJC
 724 OBJCFLAGS
 725 OBJC
 726 ac_ct_CXX
 727 CXXFLAGS
 728 CXX
 729 ac_ct_PROPER_COMPILER_CXX
 730 PROPER_COMPILER_CXX
 731 POTENTIAL_CXX
 732 TOOLS_DIR_CXX
 733 OBJEXT
 734 EXEEXT
 735 ac_ct_CC
 736 CPPFLAGS
 737 LDFLAGS
 738 CFLAGS
 739 CC
 740 ac_ct_PROPER_COMPILER_CC
 741 PROPER_COMPILER_CC
 742 POTENTIAL_CC
 743 TOOLS_DIR_CC
 744 BUILD_LD
 745 BUILD_CXX
 746 BUILD_CC
 747 MSVCR_DLL
 748 DXSDK_INCLUDE_PATH
 749 DXSDK_LIB_PATH
 750 VS_PATH
 751 VS_LIB
 752 VS_INCLUDE
 753 CYGWIN_LINK
 754 AR_OUT_OPTION
 755 LD_OUT_OPTION
 756 EXE_OUT_OPTION
 757 CC_OUT_OPTION
 758 BUILD_HOTSPOT
 759 HOTSPOT_DIST
 760 BUILD_OUTPUT
 761 OVERRIDE_SRC_ROOT
 762 ADD_SRC_ROOT
 763 JDK_TOPDIR
 764 NASHORN_TOPDIR
 765 HOTSPOT_TOPDIR
 766 JAXWS_TOPDIR
 767 JAXP_TOPDIR
 768 CORBA_TOPDIR
 769 LANGTOOLS_TOPDIR
 770 BOOT_JDK_JVMARGS
 771 JAVAC_FLAGS
 772 BOOT_JDK_SOURCETARGET
 773 BOOT_JDK
 774 BOOT_TOOLSJAR
 775 BOOT_RTJAR
 776 JAVA_CHECK
 777 JAVAC_CHECK
 778 COOKED_BUILD_NUMBER
 779 JDK_VERSION
 780 COPYRIGHT_YEAR
 781 MACOSX_BUNDLE_ID_BASE
 782 MACOSX_BUNDLE_NAME_BASE
 783 COMPANY_NAME
 784 JDK_RC_PLATFORM_NAME
 785 PRODUCT_SUFFIX
 786 PRODUCT_NAME
 787 LAUNCHER_NAME
 788 MILESTONE
 789 JDK_BUILD_NUMBER
 790 JDK_UPDATE_VERSION
 791 JDK_MICRO_VERSION
 792 JDK_MINOR_VERSION
 793 JDK_MAJOR_VERSION
 794 USER_RELEASE_SUFFIX
 795 COMPRESS_JARS
 796 UNLIMITED_CRYPTO
 797 CACERTS_FILE
 798 TEST_IN_BUILD
 799 BUILD_HEADLESS
 800 SUPPORT_HEADFUL
 801 SUPPORT_HEADLESS
 802 BDEPS_FTP
 803 BDEPS_UNZIP
 804 OS_VERSION_MICRO
 805 OS_VERSION_MINOR
 806 OS_VERSION_MAJOR
 807 PKG_CONFIG
 808 CODESIGN
 809 XATTR
 810 TIME
 811 STAT
 812 HG
 813 READELF
 814 OTOOL
 815 LDD
 816 ZIP
 817 UNZIP
 818 FIND_DELETE
 819 MAKE
 820 CHECK_TOOLSDIR_MAKE
 821 CHECK_TOOLSDIR_GMAKE
 822 CHECK_MAKE
 823 CHECK_GMAKE
 824 PKGHANDLER
 825 OUTPUT_ROOT
 826 CONF_NAME
 827 SPEC
 828 BUILD_VARIANT_RELEASE
 829 DEBUG_CLASSFILES
 830 FASTDEBUG
 831 VARIANT
 832 DEBUG_LEVEL
 833 MACOSX_UNIVERSAL
 834 INCLUDE_SA
 835 JVM_VARIANT_CORE
 836 JVM_VARIANT_ZEROSHARK
 837 JVM_VARIANT_ZERO
 838 JVM_VARIANT_KERNEL
 839 JVM_VARIANT_MINIMAL1
 840 JVM_VARIANT_CLIENT
 841 JVM_VARIANT_SERVER
 842 JVM_VARIANTS
 843 JVM_INTERPRETER
 844 JDK_VARIANT
 845 SET_OPENJDK
 846 BUILD_LOG_WRAPPER
 847 BUILD_LOG_PREVIOUS
 848 BUILD_LOG
 849 SYS_ROOT
 850 PATH_SEP
 851 SRC_ROOT
 852 ZERO_ARCHDEF
 853 DEFINE_CROSS_COMPILE_ARCH
 854 LP64
 855 OPENJDK_TARGET_OS_API_DIR
 856 OPENJDK_TARGET_CPU_JLI_CFLAGS
 857 OPENJDK_TARGET_CPU_OSARCH
 858 OPENJDK_TARGET_CPU_ISADIR
 859 OPENJDK_TARGET_CPU_LIBDIR
 860 OPENJDK_TARGET_CPU_LEGACY_LIB
 861 OPENJDK_TARGET_CPU_LEGACY
 862 REQUIRED_OS_VERSION
 863 REQUIRED_OS_NAME
 864 COMPILE_TYPE
 865 OPENJDK_TARGET_CPU_ENDIAN
 866 OPENJDK_TARGET_CPU_BITS
 867 OPENJDK_TARGET_CPU_ARCH
 868 OPENJDK_TARGET_CPU
 869 OPENJDK_TARGET_OS_API
 870 OPENJDK_TARGET_OS
 871 OPENJDK_BUILD_CPU_ENDIAN
 872 OPENJDK_BUILD_CPU_BITS
 873 OPENJDK_BUILD_CPU_ARCH
 874 OPENJDK_BUILD_CPU
 875 OPENJDK_BUILD_OS_API
 876 OPENJDK_BUILD_OS
 877 OPENJDK_BUILD_AUTOCONF_NAME
 878 OPENJDK_TARGET_AUTOCONF_NAME
 879 target_os
 880 target_vendor
 881 target_cpu
 882 target
 883 host_os
 884 host_vendor
 885 host_cpu
 886 host
 887 build_os
 888 build_vendor
 889 build_cpu
 890 build
 891 SETFILE
 892 DF
 893 READLINK
 894 CYGPATH
 895 NAWK
 896 SED
 897 FGREP
 898 EGREP
 899 GREP
 900 AWK
 901 XARGS
 902 WHICH
 903 WC
 904 UNIQ
 905 UNAME
 906 TR
 907 TOUCH
 908 TEE
 909 TAR
 910 TAIL
 911 SORT
 912 SH
 913 RM
 914 PRINTF
 915 MV
 916 MKTEMP
 917 MKDIR
 918 LS
 919 LN
 920 HEAD
 921 FIND
 922 FILE
 923 EXPR
 924 ECHO
 925 DIRNAME
 926 DIFF
 927 DATE
 928 CUT
 929 CPIO
 930 CP
 931 COMM
 932 CMP
 933 CHMOD
 934 CAT
 935 BASH
 936 BASENAME
 937 DATE_WHEN_CONFIGURED
 938 CONFIGURE_COMMAND_LINE
 939 CUSTOM_MAKE_DIR
 940 target_alias
 941 host_alias
 942 build_alias
 943 LIBS
 944 ECHO_T
 945 ECHO_N
 946 ECHO_C
 947 DEFS
 948 mandir
 949 localedir
 950 libdir
 951 psdir
 952 pdfdir
 953 dvidir
 954 htmldir
 955 infodir
 956 docdir
 957 oldincludedir
 958 includedir
 959 localstatedir
 960 sharedstatedir
 961 sysconfdir
 962 datadir
 963 datarootdir
 964 libexecdir
 965 sbindir
 966 bindir
 967 program_transform_name
 968 prefix
 969 exec_prefix
 970 PACKAGE_URL
 971 PACKAGE_BUGREPORT
 972 PACKAGE_STRING
 973 PACKAGE_VERSION
 974 PACKAGE_TARNAME
 975 PACKAGE_NAME
 976 PATH_SEPARATOR
 977 SHELL'
 978 ac_subst_files=''
 979 ac_user_opts='
 980 enable_option_checking
 981 with_custom_make_dir
 982 with_target_bits
 983 with_sys_root
 984 with_tools_dir
 985 with_devkit
 986 enable_openjdk_only
 987 with_jdk_variant
 988 with_jvm_interpreter
 989 with_jvm_variants
 990 enable_debug
 991 with_debug_level
 992 with_conf_name
 993 with_builddeps_conf
 994 with_builddeps_server
 995 with_builddeps_dir
 996 with_builddeps_group
 997 enable_headful
 998 enable_hotspot_test_in_build
 999 with_cacerts_file
1000 enable_unlimited_crypto
1001 with_milestone
1002 with_update_version
1003 with_build_number
1004 with_user_release_suffix
1005 with_boot_jdk
1006 with_boot_jdk_jvmargs
1007 with_add_source_root
1008 with_override_source_root
1009 with_adds_and_overrides
1010 with_override_langtools
1011 with_override_corba
1012 with_override_jaxp
1013 with_override_jaxws
1014 with_override_hotspot
1015 with_override_jdk
1016 with_import_hotspot
1017 with_msvcr_dll
1018 with_dxsdk
1019 with_dxsdk_lib
1020 with_dxsdk_include
1021 with_jtreg
1022 with_extra_cflags
1023 with_extra_cxxflags
1024 with_extra_ldflags
1025 enable_debug_symbols
1026 enable_zip_debug_info
1027 enable_macosx_runtime_support
1028 with_x
1029 with_cups
1030 with_cups_include
1031 with_freetype
1032 with_alsa
1033 with_alsa_include
1034 with_alsa_lib
1035 with_giflib
1036 with_zlib
1037 with_stdc__lib
1038 with_num_cores
1039 with_memory_size
1040 with_jobs
1041 with_sjavac_server_java
1042 enable_sjavac
1043 enable_precompiled_headers
1044 enable_ccache
1045 with_ccache_dir
1046 '
1047       ac_precious_vars='build_alias
1048 host_alias
1049 target_alias
1050 PKG_CONFIG
1051 CC
1052 CFLAGS
1053 LDFLAGS
1054 LIBS
1055 CPPFLAGS
1056 CXX
1057 CXXFLAGS
1058 CCC
1059 OBJC
1060 OBJCFLAGS
1061 CPP
1062 CXXCPP
1063 XMKMF
1064 FREETYPE2_CFLAGS
1065 FREETYPE2_LIBS
1066 ALSA_CFLAGS
1067 ALSA_LIBS
1068 LIBFFI_CFLAGS
1069 LIBFFI_LIBS'
1070 
1071 
1072 # Initialize some variables set by options.
1073 ac_init_help=
1074 ac_init_version=false
1075 ac_unrecognized_opts=
1076 ac_unrecognized_sep=
1077 # The variables have the same names as the options, with
1078 # dashes changed to underlines.
1079 cache_file=/dev/null
1080 exec_prefix=NONE
1081 no_create=
1082 no_recursion=
1083 prefix=NONE
1084 program_prefix=NONE
1085 program_suffix=NONE
1086 program_transform_name=s,x,x,
1087 silent=
1088 site=
1089 srcdir=
1090 verbose=
1091 x_includes=NONE
1092 x_libraries=NONE
1093 
1094 # Installation directory options.
1095 # These are left unexpanded so users can "make install exec_prefix=/foo"
1096 # and all the variables that are supposed to be based on exec_prefix
1097 # by default will actually change.
1098 # Use braces instead of parens because sh, perl, etc. also accept them.
1099 # (The list follows the same order as the GNU Coding Standards.)
1100 bindir='${exec_prefix}/bin'
1101 sbindir='${exec_prefix}/sbin'
1102 libexecdir='${exec_prefix}/libexec'
1103 datarootdir='${prefix}/share'
1104 datadir='${datarootdir}'
1105 sysconfdir='${prefix}/etc'
1106 sharedstatedir='${prefix}/com'
1107 localstatedir='${prefix}/var'
1108 includedir='${prefix}/include'
1109 oldincludedir='/usr/include'
1110 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1111 infodir='${datarootdir}/info'
1112 htmldir='${docdir}'
1113 dvidir='${docdir}'
1114 pdfdir='${docdir}'
1115 psdir='${docdir}'
1116 libdir='${exec_prefix}/lib'
1117 localedir='${datarootdir}/locale'
1118 mandir='${datarootdir}/man'
1119 
1120 ac_prev=
1121 ac_dashdash=
1122 for ac_option
1123 do
1124   # If the previous option needs an argument, assign it.
1125   if test -n "$ac_prev"; then
1126     eval $ac_prev=\$ac_option
1127     ac_prev=
1128     continue
1129   fi
1130 
1131   case $ac_option in
1132   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1133   *=)   ac_optarg= ;;
1134   *)    ac_optarg=yes ;;
1135   esac
1136 
1137   # Accept the important Cygnus configure options, so we can diagnose typos.
1138 
1139   case $ac_dashdash$ac_option in
1140   --)
1141     ac_dashdash=yes ;;
1142 
1143   -bindir | --bindir | --bindi | --bind | --bin | --bi)
1144     ac_prev=bindir ;;
1145   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1146     bindir=$ac_optarg ;;
1147 
1148   -build | --build | --buil | --bui | --bu)
1149     ac_prev=build_alias ;;
1150   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1151     build_alias=$ac_optarg ;;
1152 
1153   -cache-file | --cache-file | --cache-fil | --cache-fi \
1154   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1155     ac_prev=cache_file ;;
1156   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1157   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1158     cache_file=$ac_optarg ;;
1159 
1160   --config-cache | -C)
1161     cache_file=config.cache ;;
1162 
1163   -datadir | --datadir | --datadi | --datad)
1164     ac_prev=datadir ;;
1165   -datadir=* | --datadir=* | --datadi=* | --datad=*)
1166     datadir=$ac_optarg ;;
1167 
1168   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1169   | --dataroo | --dataro | --datar)
1170     ac_prev=datarootdir ;;
1171   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1172   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1173     datarootdir=$ac_optarg ;;
1174 
1175   -disable-* | --disable-*)
1176     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1177     # Reject names that are not valid shell variable names.
1178     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1179       as_fn_error $? "invalid feature name: $ac_useropt"
1180     ac_useropt_orig=$ac_useropt
1181     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1182     case $ac_user_opts in
1183       *"
1184 "enable_$ac_useropt"
1185 "*) ;;
1186       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1187          ac_unrecognized_sep=', ';;
1188     esac
1189     eval enable_$ac_useropt=no ;;
1190 
1191   -docdir | --docdir | --docdi | --doc | --do)
1192     ac_prev=docdir ;;
1193   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1194     docdir=$ac_optarg ;;
1195 
1196   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1197     ac_prev=dvidir ;;
1198   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1199     dvidir=$ac_optarg ;;
1200 
1201   -enable-* | --enable-*)
1202     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1203     # Reject names that are not valid shell variable names.
1204     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1205       as_fn_error $? "invalid feature name: $ac_useropt"
1206     ac_useropt_orig=$ac_useropt
1207     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1208     case $ac_user_opts in
1209       *"
1210 "enable_$ac_useropt"
1211 "*) ;;
1212       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1213          ac_unrecognized_sep=', ';;
1214     esac
1215     eval enable_$ac_useropt=\$ac_optarg ;;
1216 
1217   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1218   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1219   | --exec | --exe | --ex)
1220     ac_prev=exec_prefix ;;
1221   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1222   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1223   | --exec=* | --exe=* | --ex=*)
1224     exec_prefix=$ac_optarg ;;
1225 
1226   -gas | --gas | --ga | --g)
1227     # Obsolete; use --with-gas.
1228     with_gas=yes ;;
1229 
1230   -help | --help | --hel | --he | -h)
1231     ac_init_help=long ;;
1232   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1233     ac_init_help=recursive ;;
1234   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1235     ac_init_help=short ;;
1236 
1237   -host | --host | --hos | --ho)
1238     ac_prev=host_alias ;;
1239   -host=* | --host=* | --hos=* | --ho=*)
1240     host_alias=$ac_optarg ;;
1241 
1242   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1243     ac_prev=htmldir ;;
1244   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1245   | --ht=*)
1246     htmldir=$ac_optarg ;;
1247 
1248   -includedir | --includedir | --includedi | --included | --include \
1249   | --includ | --inclu | --incl | --inc)
1250     ac_prev=includedir ;;
1251   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1252   | --includ=* | --inclu=* | --incl=* | --inc=*)
1253     includedir=$ac_optarg ;;
1254 
1255   -infodir | --infodir | --infodi | --infod | --info | --inf)
1256     ac_prev=infodir ;;
1257   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1258     infodir=$ac_optarg ;;
1259 
1260   -libdir | --libdir | --libdi | --libd)
1261     ac_prev=libdir ;;
1262   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1263     libdir=$ac_optarg ;;
1264 
1265   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1266   | --libexe | --libex | --libe)
1267     ac_prev=libexecdir ;;
1268   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1269   | --libexe=* | --libex=* | --libe=*)
1270     libexecdir=$ac_optarg ;;
1271 
1272   -localedir | --localedir | --localedi | --localed | --locale)
1273     ac_prev=localedir ;;
1274   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1275     localedir=$ac_optarg ;;
1276 
1277   -localstatedir | --localstatedir | --localstatedi | --localstated \
1278   | --localstate | --localstat | --localsta | --localst | --locals)
1279     ac_prev=localstatedir ;;
1280   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1281   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1282     localstatedir=$ac_optarg ;;
1283 
1284   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1285     ac_prev=mandir ;;
1286   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1287     mandir=$ac_optarg ;;
1288 
1289   -nfp | --nfp | --nf)
1290     # Obsolete; use --without-fp.
1291     with_fp=no ;;
1292 
1293   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1294   | --no-cr | --no-c | -n)
1295     no_create=yes ;;
1296 
1297   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1298   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1299     no_recursion=yes ;;
1300 
1301   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1302   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1303   | --oldin | --oldi | --old | --ol | --o)
1304     ac_prev=oldincludedir ;;
1305   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1306   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1307   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1308     oldincludedir=$ac_optarg ;;
1309 
1310   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1311     ac_prev=prefix ;;
1312   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1313     prefix=$ac_optarg ;;
1314 
1315   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1316   | --program-pre | --program-pr | --program-p)
1317     ac_prev=program_prefix ;;
1318   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1319   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1320     program_prefix=$ac_optarg ;;
1321 
1322   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1323   | --program-suf | --program-su | --program-s)
1324     ac_prev=program_suffix ;;
1325   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1326   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1327     program_suffix=$ac_optarg ;;
1328 
1329   -program-transform-name | --program-transform-name \
1330   | --program-transform-nam | --program-transform-na \
1331   | --program-transform-n | --program-transform- \
1332   | --program-transform | --program-transfor \
1333   | --program-transfo | --program-transf \
1334   | --program-trans | --program-tran \
1335   | --progr-tra | --program-tr | --program-t)
1336     ac_prev=program_transform_name ;;
1337   -program-transform-name=* | --program-transform-name=* \
1338   | --program-transform-nam=* | --program-transform-na=* \
1339   | --program-transform-n=* | --program-transform-=* \
1340   | --program-transform=* | --program-transfor=* \
1341   | --program-transfo=* | --program-transf=* \
1342   | --program-trans=* | --program-tran=* \
1343   | --progr-tra=* | --program-tr=* | --program-t=*)
1344     program_transform_name=$ac_optarg ;;
1345 
1346   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1347     ac_prev=pdfdir ;;
1348   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1349     pdfdir=$ac_optarg ;;
1350 
1351   -psdir | --psdir | --psdi | --psd | --ps)
1352     ac_prev=psdir ;;
1353   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1354     psdir=$ac_optarg ;;
1355 
1356   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1357   | -silent | --silent | --silen | --sile | --sil)
1358     silent=yes ;;
1359 
1360   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1361     ac_prev=sbindir ;;
1362   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1363   | --sbi=* | --sb=*)
1364     sbindir=$ac_optarg ;;
1365 
1366   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1367   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1368   | --sharedst | --shareds | --shared | --share | --shar \
1369   | --sha | --sh)
1370     ac_prev=sharedstatedir ;;
1371   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1372   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1373   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1374   | --sha=* | --sh=*)
1375     sharedstatedir=$ac_optarg ;;
1376 
1377   -site | --site | --sit)
1378     ac_prev=site ;;
1379   -site=* | --site=* | --sit=*)
1380     site=$ac_optarg ;;
1381 
1382   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1383     ac_prev=srcdir ;;
1384   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1385     srcdir=$ac_optarg ;;
1386 
1387   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1388   | --syscon | --sysco | --sysc | --sys | --sy)
1389     ac_prev=sysconfdir ;;
1390   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1391   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1392     sysconfdir=$ac_optarg ;;
1393 
1394   -target | --target | --targe | --targ | --tar | --ta | --t)
1395     ac_prev=target_alias ;;
1396   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1397     target_alias=$ac_optarg ;;
1398 
1399   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1400     verbose=yes ;;
1401 
1402   -version | --version | --versio | --versi | --vers | -V)
1403     ac_init_version=: ;;
1404 
1405   -with-* | --with-*)
1406     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1407     # Reject names that are not valid shell variable names.
1408     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1409       as_fn_error $? "invalid package name: $ac_useropt"
1410     ac_useropt_orig=$ac_useropt
1411     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1412     case $ac_user_opts in
1413       *"
1414 "with_$ac_useropt"
1415 "*) ;;
1416       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1417          ac_unrecognized_sep=', ';;
1418     esac
1419     eval with_$ac_useropt=\$ac_optarg ;;
1420 
1421   -without-* | --without-*)
1422     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1423     # Reject names that are not valid shell variable names.
1424     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1425       as_fn_error $? "invalid package name: $ac_useropt"
1426     ac_useropt_orig=$ac_useropt
1427     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1428     case $ac_user_opts in
1429       *"
1430 "with_$ac_useropt"
1431 "*) ;;
1432       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1433          ac_unrecognized_sep=', ';;
1434     esac
1435     eval with_$ac_useropt=no ;;
1436 
1437   --x)
1438     # Obsolete; use --with-x.
1439     with_x=yes ;;
1440 
1441   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1442   | --x-incl | --x-inc | --x-in | --x-i)
1443     ac_prev=x_includes ;;
1444   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1445   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1446     x_includes=$ac_optarg ;;
1447 
1448   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1449   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1450     ac_prev=x_libraries ;;
1451   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1452   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1453     x_libraries=$ac_optarg ;;
1454 
1455   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1456 Try \`$0 --help' for more information"
1457     ;;
1458 
1459   *=*)
1460     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1461     # Reject names that are not valid shell variable names.
1462     case $ac_envvar in #(
1463       '' | [0-9]* | *[!_$as_cr_alnum]* )
1464       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1465     esac
1466     eval $ac_envvar=\$ac_optarg
1467     export $ac_envvar ;;
1468 
1469   *)
1470     # FIXME: should be removed in autoconf 3.0.
1471     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1472     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1473       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1474     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1475     ;;
1476 
1477   esac
1478 done
1479 
1480 if test -n "$ac_prev"; then
1481   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1482   as_fn_error $? "missing argument to $ac_option"
1483 fi
1484 
1485 if test -n "$ac_unrecognized_opts"; then
1486   case $enable_option_checking in
1487     no) ;;
1488     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1489     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1490   esac
1491 fi
1492 
1493 # Check all directory arguments for consistency.
1494 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1495                 datadir sysconfdir sharedstatedir localstatedir includedir \
1496                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1497                 libdir localedir mandir
1498 do
1499   eval ac_val=\$$ac_var
1500   # Remove trailing slashes.
1501   case $ac_val in
1502     */ )
1503       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1504       eval $ac_var=\$ac_val;;
1505   esac
1506   # Be sure to have absolute directory names.
1507   case $ac_val in
1508     [\\/$]* | ?:[\\/]* )  continue;;
1509     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1510   esac
1511   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1512 done
1513 
1514 # There might be people who depend on the old broken behavior: `$host'
1515 # used to hold the argument of --host etc.
1516 # FIXME: To remove some day.
1517 build=$build_alias
1518 host=$host_alias
1519 target=$target_alias
1520 
1521 # FIXME: To remove some day.
1522 if test "x$host_alias" != x; then
1523   if test "x$build_alias" = x; then
1524     cross_compiling=maybe
1525     $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1526     If a cross compiler is detected then cross compile mode will be used" >&2
1527   elif test "x$build_alias" != "x$host_alias"; then
1528     cross_compiling=yes
1529   fi
1530 fi
1531 
1532 ac_tool_prefix=
1533 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1534 
1535 test "$silent" = yes && exec 6>/dev/null
1536 
1537 
1538 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1539 ac_ls_di=`ls -di .` &&
1540 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1541   as_fn_error $? "working directory cannot be determined"
1542 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1543   as_fn_error $? "pwd does not report name of working directory"
1544 
1545 
1546 # Find the source files, if location was not specified.
1547 if test -z "$srcdir"; then
1548   ac_srcdir_defaulted=yes
1549   # Try the directory containing this script, then the parent directory.
1550   ac_confdir=`$as_dirname -- "$as_myself" ||
1551 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1552          X"$as_myself" : 'X\(//\)[^/]' \| \
1553          X"$as_myself" : 'X\(//\)$' \| \
1554          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1555 $as_echo X"$as_myself" |
1556     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1557             s//\1/
1558             q
1559           }
1560           /^X\(\/\/\)[^/].*/{
1561             s//\1/
1562             q
1563           }
1564           /^X\(\/\/\)$/{
1565             s//\1/
1566             q
1567           }
1568           /^X\(\/\).*/{
1569             s//\1/
1570             q
1571           }
1572           s/.*/./; q'`
1573   srcdir=$ac_confdir
1574   if test ! -r "$srcdir/$ac_unique_file"; then
1575     srcdir=..
1576   fi
1577 else
1578   ac_srcdir_defaulted=no
1579 fi
1580 if test ! -r "$srcdir/$ac_unique_file"; then
1581   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1582   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1583 fi
1584 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1585 ac_abs_confdir=`(
1586         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1587         pwd)`
1588 # When building in place, set srcdir=.
1589 if test "$ac_abs_confdir" = "$ac_pwd"; then
1590   srcdir=.
1591 fi
1592 # Remove unnecessary trailing slashes from srcdir.
1593 # Double slashes in file names in object file debugging info
1594 # mess up M-x gdb in Emacs.
1595 case $srcdir in
1596 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1597 esac
1598 for ac_var in $ac_precious_vars; do
1599   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1600   eval ac_env_${ac_var}_value=\$${ac_var}
1601   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1602   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1603 done
1604 
1605 #
1606 # Report the --help message.
1607 #
1608 if test "$ac_init_help" = "long"; then
1609   # Omit some internal or obsolete options to make the list less imposing.
1610   # This message is too long to be a string in the A/UX 3.1 sh.
1611   cat <<_ACEOF
1612 \`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1613 
1614 Usage: $0 [OPTION]... [VAR=VALUE]...
1615 
1616 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1617 VAR=VALUE.  See below for descriptions of some of the useful variables.
1618 
1619 Defaults for the options are specified in brackets.
1620 
1621 Configuration:
1622   -h, --help              display this help and exit
1623       --help=short        display options specific to this package
1624       --help=recursive    display the short help of all the included packages
1625   -V, --version           display version information and exit
1626   -q, --quiet, --silent   do not print \`checking ...' messages
1627       --cache-file=FILE   cache test results in FILE [disabled]
1628   -C, --config-cache      alias for \`--cache-file=config.cache'
1629   -n, --no-create         do not create output files
1630       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1631 
1632 Installation directories:
1633   --prefix=PREFIX         install architecture-independent files in PREFIX
1634                           [$ac_default_prefix]
1635   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1636                           [PREFIX]
1637 
1638 By default, \`make install' will install all the files in
1639 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1640 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1641 for instance \`--prefix=\$HOME'.
1642 
1643 For better control, use the options below.
1644 
1645 Fine tuning of the installation directories:
1646   --bindir=DIR            user executables [EPREFIX/bin]
1647   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1648   --libexecdir=DIR        program executables [EPREFIX/libexec]
1649   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1650   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1651   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1652   --libdir=DIR            object code libraries [EPREFIX/lib]
1653   --includedir=DIR        C header files [PREFIX/include]
1654   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1655   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1656   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1657   --infodir=DIR           info documentation [DATAROOTDIR/info]
1658   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1659   --mandir=DIR            man documentation [DATAROOTDIR/man]
1660   --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1661   --htmldir=DIR           html documentation [DOCDIR]
1662   --dvidir=DIR            dvi documentation [DOCDIR]
1663   --pdfdir=DIR            pdf documentation [DOCDIR]
1664   --psdir=DIR             ps documentation [DOCDIR]
1665 _ACEOF
1666 
1667   cat <<\_ACEOF
1668 
1669 X features:
1670   --x-includes=DIR    X include files are in DIR
1671   --x-libraries=DIR   X library files are in DIR
1672 
1673 System types:
1674   --build=BUILD     configure for building on BUILD [guessed]
1675   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1676   --target=TARGET   configure for building compilers for TARGET [HOST]
1677 _ACEOF
1678 fi
1679 
1680 if test -n "$ac_init_help"; then
1681   case $ac_init_help in
1682      short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1683    esac
1684   cat <<\_ACEOF
1685 
1686 Optional Features:
1687   --disable-option-checking  ignore unrecognized --enable/--with options
1688   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1689   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1690   --enable-openjdk-only   suppress building custom source even if present
1691                           [disabled]
1692   --enable-debug          set the debug level to fastdebug (shorthand for
1693                           --with-debug-level=fastdebug) [disabled]
1694   --disable-headful       disable building headful support (graphical UI
1695                           support) [enabled]
1696   --enable-hotspot-test-in-build
1697                           run the Queens test after Hotspot build [disabled]
1698   --enable-unlimited-crypto
1699                           Enable unlimited crypto policy [disabled]
1700   --disable-debug-symbols disable generation of debug symbols [enabled]
1701   --disable-zip-debug-info
1702                           disable zipping of debug-info files [enabled]
1703   --disable-macosx-runtime-support
1704                           disable the use of MacOSX Java runtime support
1705                           framework [enabled]
1706   --enable-sjavac         use sjavac to do fast incremental compiles
1707                           [disabled]
1708   --disable-precompiled-headers
1709                           disable using precompiled headers when compiling C++
1710                           [enabled]
1711   --disable-ccache        disable using ccache to speed up recompilations
1712                           [enabled]
1713 
1714 Optional Packages:
1715   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1716   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1717   --with-custom-make-dir  use this directory for custom build/make files
1718   --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1719                           support it), e.g. --with-target-bits=32 [guessed]
1720   --with-sys-root         pass this sys-root to the compilers and tools (for
1721                           cross-compiling)
1722   --with-tools-dir        search this directory for compilers and tools (for
1723                           cross-compiling)
1724   --with-devkit           use this directory as base for tools-dir and
1725                           sys-root (for cross-compiling)
1726   --with-jdk-variant      JDK variant to build (normal) [normal]
1727   --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1728   --with-jvm-variants     JVM variants (separated by commas) to build (server,
1729                           client, minimal1, kernel, zero, zeroshark, core)
1730                           [server]
1731   --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1732                           [release]
1733   --with-conf-name        use this as the name of the configuration [generated
1734                           from important configuration options]
1735   --with-builddeps-conf   use this configuration file for the builddeps
1736   --with-builddeps-server download and use build dependencies from this server
1737                           url
1738   --with-builddeps-dir    store downloaded build dependencies here
1739                           [/localhome/builddeps]
1740   --with-builddeps-group  chgrp the downloaded build dependencies to this
1741                           group
1742   --with-cacerts-file     specify alternative cacerts file
1743   --with-milestone        Set milestone value for build [internal]
1744   --with-update-version   Set update version value for build [b00]
1745   --with-build-number     Set build number value for build [b00]
1746   --with-user-release-suffix
1747                           Add a custom string to the version string if build
1748                           number isn't set.[username_builddateb00]
1749   --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1750   --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1751                           invocations of the Boot JDK, overriding the default
1752                           values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1753                           -enableassertions"
1754   --with-add-source-root  for each and every source directory, look in this
1755                           additional source root for the same directory; if it
1756                           exists and have files in it, include it in the build
1757   --with-override-source-root
1758                           for each and every source directory, look in this
1759                           override source root for the same directory; if it
1760                           exists, use that directory instead and ignore the
1761                           directory in the original source root
1762   --with-adds-and-overrides
1763                           use the subdirs 'adds' and 'overrides' in the
1764                           specified directory as add-source-root and
1765                           override-source-root
1766   --with-override-langtools
1767                           use this langtools dir for the build
1768   --with-override-corba   use this corba dir for the build
1769   --with-override-jaxp    use this jaxp dir for the build
1770   --with-override-jaxws   use this jaxws dir for the build
1771   --with-override-hotspot use this hotspot dir for the build
1772   --with-override-jdk     use this jdk dir for the build
1773   --with-import-hotspot   import hotspot binaries from this jdk image or
1774                           hotspot build dist dir instead of building from
1775                           source
1776   --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1777                           only) [probed]
1778   --with-dxsdk            the DirectX SDK (Windows only) [probed]
1779   --with-dxsdk-lib        the DirectX SDK lib directory (Windows only)
1780                           [probed]
1781   --with-dxsdk-include    the DirectX SDK include directory (Windows only)
1782                           [probed]
1783   --with-jtreg            Regression Test Harness [probed]
1784   --with-extra-cflags     extra flags to be used when compiling jdk c-files
1785   --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1786   --with-extra-ldflags    extra flags to be used when linking jdk
1787   --with-x                use the X Window System
1788   --with-cups             specify prefix directory for the cups package
1789                           (expecting the headers under PATH/include)
1790   --with-cups-include     specify directory for the cups include files
1791   --with-freetype         specify prefix directory for the freetype2 package
1792                           (expecting the libraries under PATH/lib and the
1793                           headers under PATH/include)
1794   --with-alsa             specify prefix directory for the alsa package
1795                           (expecting the libraries under PATH/lib and the
1796                           headers under PATH/include)
1797   --with-alsa-include     specify directory for the alsa include files
1798   --with-alsa-lib         specify directory for the alsa library
1799   --with-giflib           use giflib from build system or OpenJDK source
1800                           (system, bundled) [bundled]
1801   --with-zlib             use zlib from build system or OpenJDK source
1802                           (system, bundled) [bundled]
1803   --with-stdc++lib=<static>,<dynamic>,<default>
1804                           force linking of the C++ runtime on Linux to either
1805                           static or dynamic, default is static with dynamic as
1806                           fallback
1807   --with-num-cores        number of cores in the build system, e.g.
1808                           --with-num-cores=8 [probed]
1809   --with-memory-size      memory (in MB) available in the build system, e.g.
1810                           --with-memory-size=1024 [probed]
1811   --with-jobs             number of parallel jobs to let make run [calculated
1812                           based on cores and memory]
1813   --with-sjavac-server-java
1814                           use this java binary for running the sjavac
1815                           background server [Boot JDK java]
1816   --with-ccache-dir       where to store ccache files [~/.ccache]
1817 
1818 Some influential environment variables:
1819   PKG_CONFIG  path to pkg-config utility
1820   CC          C compiler command
1821   CFLAGS      C compiler flags
1822   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1823               nonstandard directory <lib dir>
1824   LIBS        libraries to pass to the linker, e.g. -l<library>
1825   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1826               you have headers in a nonstandard directory <include dir>
1827   CXX         C++ compiler command
1828   CXXFLAGS    C++ compiler flags
1829   OBJC        Objective C compiler command
1830   OBJCFLAGS   Objective C compiler flags
1831   CPP         C preprocessor
1832   CXXCPP      C++ preprocessor
1833   XMKMF       Path to xmkmf, Makefile generator for X Window System
1834   FREETYPE2_CFLAGS
1835               C compiler flags for FREETYPE2, overriding pkg-config
1836   FREETYPE2_LIBS
1837               linker flags for FREETYPE2, overriding pkg-config
1838   ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1839   ALSA_LIBS   linker flags for ALSA, overriding pkg-config
1840   LIBFFI_CFLAGS
1841               C compiler flags for LIBFFI, overriding pkg-config
1842   LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
1843 
1844 Use these variables to override the choices made by `configure' or to help
1845 it to find libraries and programs with nonstandard names/locations.
1846 
1847 Report bugs to <build-dev@openjdk.java.net>.
1848 OpenJDK home page: <http://openjdk.java.net>.
1849 _ACEOF
1850 ac_status=$?
1851 fi
1852 
1853 if test "$ac_init_help" = "recursive"; then
1854   # If there are subdirs, report their specific --help.
1855   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1856     test -d "$ac_dir" ||
1857       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1858       continue
1859     ac_builddir=.
1860 
1861 case "$ac_dir" in
1862 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1863 *)
1864   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1865   # A ".." for each directory in $ac_dir_suffix.
1866   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1867   case $ac_top_builddir_sub in
1868   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1869   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1870   esac ;;
1871 esac
1872 ac_abs_top_builddir=$ac_pwd
1873 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1874 # for backward compatibility:
1875 ac_top_builddir=$ac_top_build_prefix
1876 
1877 case $srcdir in
1878   .)  # We are building in place.
1879     ac_srcdir=.
1880     ac_top_srcdir=$ac_top_builddir_sub
1881     ac_abs_top_srcdir=$ac_pwd ;;
1882   [\\/]* | ?:[\\/]* )  # Absolute name.
1883     ac_srcdir=$srcdir$ac_dir_suffix;
1884     ac_top_srcdir=$srcdir
1885     ac_abs_top_srcdir=$srcdir ;;
1886   *) # Relative name.
1887     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1888     ac_top_srcdir=$ac_top_build_prefix$srcdir
1889     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1890 esac
1891 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1892 
1893     cd "$ac_dir" || { ac_status=$?; continue; }
1894     # Check for guested configure.
1895     if test -f "$ac_srcdir/configure.gnu"; then
1896       echo &&
1897       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1898     elif test -f "$ac_srcdir/configure"; then
1899       echo &&
1900       $SHELL "$ac_srcdir/configure" --help=recursive
1901     else
1902       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1903     fi || ac_status=$?
1904     cd "$ac_pwd" || { ac_status=$?; break; }
1905   done
1906 fi
1907 
1908 test -n "$ac_init_help" && exit $ac_status
1909 if $ac_init_version; then
1910   cat <<\_ACEOF
1911 OpenJDK configure jdk8
1912 generated by GNU Autoconf 2.68
1913 
1914 Copyright (C) 2010 Free Software Foundation, Inc.
1915 This configure script is free software; the Free Software Foundation
1916 gives unlimited permission to copy, distribute and modify it.
1917 _ACEOF
1918   exit
1919 fi
1920 
1921 ## ------------------------ ##
1922 ## Autoconf initialization. ##
1923 ## ------------------------ ##
1924 
1925 # ac_fn_c_try_compile LINENO
1926 # --------------------------
1927 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1928 ac_fn_c_try_compile ()
1929 {
1930   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1931   rm -f conftest.$ac_objext
1932   if { { ac_try="$ac_compile"
1933 case "(($ac_try" in
1934   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1935   *) ac_try_echo=$ac_try;;
1936 esac
1937 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1938 $as_echo "$ac_try_echo"; } >&5
1939   (eval "$ac_compile") 2>conftest.err
1940   ac_status=$?
1941   if test -s conftest.err; then
1942     grep -v '^ *+' conftest.err >conftest.er1
1943     cat conftest.er1 >&5
1944     mv -f conftest.er1 conftest.err
1945   fi
1946   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1947   test $ac_status = 0; } && {
1948          test -z "$ac_c_werror_flag" ||
1949          test ! -s conftest.err
1950        } && test -s conftest.$ac_objext; then :
1951   ac_retval=0
1952 else
1953   $as_echo "$as_me: failed program was:" >&5
1954 sed 's/^/| /' conftest.$ac_ext >&5
1955 
1956         ac_retval=1
1957 fi
1958   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1959   as_fn_set_status $ac_retval
1960 
1961 } # ac_fn_c_try_compile
1962 
1963 # ac_fn_cxx_try_compile LINENO
1964 # ----------------------------
1965 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1966 ac_fn_cxx_try_compile ()
1967 {
1968   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1969   rm -f conftest.$ac_objext
1970   if { { ac_try="$ac_compile"
1971 case "(($ac_try" in
1972   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1973   *) ac_try_echo=$ac_try;;
1974 esac
1975 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1976 $as_echo "$ac_try_echo"; } >&5
1977   (eval "$ac_compile") 2>conftest.err
1978   ac_status=$?
1979   if test -s conftest.err; then
1980     grep -v '^ *+' conftest.err >conftest.er1
1981     cat conftest.er1 >&5
1982     mv -f conftest.er1 conftest.err
1983   fi
1984   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1985   test $ac_status = 0; } && {
1986          test -z "$ac_cxx_werror_flag" ||
1987          test ! -s conftest.err
1988        } && test -s conftest.$ac_objext; then :
1989   ac_retval=0
1990 else
1991   $as_echo "$as_me: failed program was:" >&5
1992 sed 's/^/| /' conftest.$ac_ext >&5
1993 
1994         ac_retval=1
1995 fi
1996   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1997   as_fn_set_status $ac_retval
1998 
1999 } # ac_fn_cxx_try_compile
2000 
2001 # ac_fn_objc_try_compile LINENO
2002 # -----------------------------
2003 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2004 ac_fn_objc_try_compile ()
2005 {
2006   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2007   rm -f conftest.$ac_objext
2008   if { { ac_try="$ac_compile"
2009 case "(($ac_try" in
2010   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2011   *) ac_try_echo=$ac_try;;
2012 esac
2013 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2014 $as_echo "$ac_try_echo"; } >&5
2015   (eval "$ac_compile") 2>conftest.err
2016   ac_status=$?
2017   if test -s conftest.err; then
2018     grep -v '^ *+' conftest.err >conftest.er1
2019     cat conftest.er1 >&5
2020     mv -f conftest.er1 conftest.err
2021   fi
2022   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2023   test $ac_status = 0; } && {
2024          test -z "$ac_objc_werror_flag" ||
2025          test ! -s conftest.err
2026        } && test -s conftest.$ac_objext; then :
2027   ac_retval=0
2028 else
2029   $as_echo "$as_me: failed program was:" >&5
2030 sed 's/^/| /' conftest.$ac_ext >&5
2031 
2032         ac_retval=1
2033 fi
2034   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2035   as_fn_set_status $ac_retval
2036 
2037 } # ac_fn_objc_try_compile
2038 
2039 # ac_fn_c_try_cpp LINENO
2040 # ----------------------
2041 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2042 ac_fn_c_try_cpp ()
2043 {
2044   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2045   if { { ac_try="$ac_cpp conftest.$ac_ext"
2046 case "(($ac_try" in
2047   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2048   *) ac_try_echo=$ac_try;;
2049 esac
2050 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2051 $as_echo "$ac_try_echo"; } >&5
2052   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2053   ac_status=$?
2054   if test -s conftest.err; then
2055     grep -v '^ *+' conftest.err >conftest.er1
2056     cat conftest.er1 >&5
2057     mv -f conftest.er1 conftest.err
2058   fi
2059   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2060   test $ac_status = 0; } > conftest.i && {
2061          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2062          test ! -s conftest.err
2063        }; then :
2064   ac_retval=0
2065 else
2066   $as_echo "$as_me: failed program was:" >&5
2067 sed 's/^/| /' conftest.$ac_ext >&5
2068 
2069     ac_retval=1
2070 fi
2071   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2072   as_fn_set_status $ac_retval
2073 
2074 } # ac_fn_c_try_cpp
2075 
2076 # ac_fn_cxx_try_cpp LINENO
2077 # ------------------------
2078 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2079 ac_fn_cxx_try_cpp ()
2080 {
2081   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2082   if { { ac_try="$ac_cpp conftest.$ac_ext"
2083 case "(($ac_try" in
2084   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2085   *) ac_try_echo=$ac_try;;
2086 esac
2087 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2088 $as_echo "$ac_try_echo"; } >&5
2089   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2090   ac_status=$?
2091   if test -s conftest.err; then
2092     grep -v '^ *+' conftest.err >conftest.er1
2093     cat conftest.er1 >&5
2094     mv -f conftest.er1 conftest.err
2095   fi
2096   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2097   test $ac_status = 0; } > conftest.i && {
2098          test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2099          test ! -s conftest.err
2100        }; then :
2101   ac_retval=0
2102 else
2103   $as_echo "$as_me: failed program was:" >&5
2104 sed 's/^/| /' conftest.$ac_ext >&5
2105 
2106     ac_retval=1
2107 fi
2108   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2109   as_fn_set_status $ac_retval
2110 
2111 } # ac_fn_cxx_try_cpp
2112 
2113 # ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2114 # ---------------------------------------------------------
2115 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2116 # the include files in INCLUDES and setting the cache variable VAR
2117 # accordingly.
2118 ac_fn_cxx_check_header_mongrel ()
2119 {
2120   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2121   if eval \${$3+:} false; then :
2122   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2123 $as_echo_n "checking for $2... " >&6; }
2124 if eval \${$3+:} false; then :
2125   $as_echo_n "(cached) " >&6
2126 fi
2127 eval ac_res=\$$3
2128                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2129 $as_echo "$ac_res" >&6; }
2130 else
2131   # Is the header compilable?
2132 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2133 $as_echo_n "checking $2 usability... " >&6; }
2134 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2135 /* end confdefs.h.  */
2136 $4
2137 #include <$2>
2138 _ACEOF
2139 if ac_fn_cxx_try_compile "$LINENO"; then :
2140   ac_header_compiler=yes
2141 else
2142   ac_header_compiler=no
2143 fi
2144 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2146 $as_echo "$ac_header_compiler" >&6; }
2147 
2148 # Is the header present?
2149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2150 $as_echo_n "checking $2 presence... " >&6; }
2151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2152 /* end confdefs.h.  */
2153 #include <$2>
2154 _ACEOF
2155 if ac_fn_cxx_try_cpp "$LINENO"; then :
2156   ac_header_preproc=yes
2157 else
2158   ac_header_preproc=no
2159 fi
2160 rm -f conftest.err conftest.i conftest.$ac_ext
2161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2162 $as_echo "$ac_header_preproc" >&6; }
2163 
2164 # So?  What about this header?
2165 case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2166   yes:no: )
2167     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2168 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2169     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2170 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2171     ;;
2172   no:yes:* )
2173     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2174 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2175     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2176 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2177     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2178 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2179     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2180 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2181     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2182 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2183 ( $as_echo "## ----------------------------------------- ##
2184 ## Report this to build-dev@openjdk.java.net ##
2185 ## ----------------------------------------- ##"
2186      ) | sed "s/^/$as_me: WARNING:     /" >&2
2187     ;;
2188 esac
2189   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2190 $as_echo_n "checking for $2... " >&6; }
2191 if eval \${$3+:} false; then :
2192   $as_echo_n "(cached) " >&6
2193 else
2194   eval "$3=\$ac_header_compiler"
2195 fi
2196 eval ac_res=\$$3
2197                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2198 $as_echo "$ac_res" >&6; }
2199 fi
2200   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2201 
2202 } # ac_fn_cxx_check_header_mongrel
2203 
2204 # ac_fn_cxx_try_run LINENO
2205 # ------------------------
2206 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2207 # that executables *can* be run.
2208 ac_fn_cxx_try_run ()
2209 {
2210   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2211   if { { ac_try="$ac_link"
2212 case "(($ac_try" in
2213   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2214   *) ac_try_echo=$ac_try;;
2215 esac
2216 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2217 $as_echo "$ac_try_echo"; } >&5
2218   (eval "$ac_link") 2>&5
2219   ac_status=$?
2220   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2221   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2222   { { case "(($ac_try" in
2223   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2224   *) ac_try_echo=$ac_try;;
2225 esac
2226 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2227 $as_echo "$ac_try_echo"; } >&5
2228   (eval "$ac_try") 2>&5
2229   ac_status=$?
2230   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2231   test $ac_status = 0; }; }; then :
2232   ac_retval=0
2233 else
2234   $as_echo "$as_me: program exited with status $ac_status" >&5
2235        $as_echo "$as_me: failed program was:" >&5
2236 sed 's/^/| /' conftest.$ac_ext >&5
2237 
2238        ac_retval=$ac_status
2239 fi
2240   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2241   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2242   as_fn_set_status $ac_retval
2243 
2244 } # ac_fn_cxx_try_run
2245 
2246 # ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2247 # ---------------------------------------------------------
2248 # Tests whether HEADER exists and can be compiled using the include files in
2249 # INCLUDES, setting the cache variable VAR accordingly.
2250 ac_fn_cxx_check_header_compile ()
2251 {
2252   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2253   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2254 $as_echo_n "checking for $2... " >&6; }
2255 if eval \${$3+:} false; then :
2256   $as_echo_n "(cached) " >&6
2257 else
2258   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2259 /* end confdefs.h.  */
2260 $4
2261 #include <$2>
2262 _ACEOF
2263 if ac_fn_cxx_try_compile "$LINENO"; then :
2264   eval "$3=yes"
2265 else
2266   eval "$3=no"
2267 fi
2268 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2269 fi
2270 eval ac_res=\$$3
2271                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2272 $as_echo "$ac_res" >&6; }
2273   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2274 
2275 } # ac_fn_cxx_check_header_compile
2276 
2277 # ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2278 # ----------------------------------------------
2279 # Tries to find the compile-time value of EXPR in a program that includes
2280 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2281 # computed
2282 ac_fn_cxx_compute_int ()
2283 {
2284   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2285   if test "$cross_compiling" = yes; then
2286     # Depending upon the size, compute the lo and hi bounds.
2287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2288 /* end confdefs.h.  */
2289 $4
2290 int
2291 main ()
2292 {
2293 static int test_array [1 - 2 * !(($2) >= 0)];
2294 test_array [0] = 0
2295 
2296   ;
2297   return 0;
2298 }
2299 _ACEOF
2300 if ac_fn_cxx_try_compile "$LINENO"; then :
2301   ac_lo=0 ac_mid=0
2302   while :; do
2303     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2304 /* end confdefs.h.  */
2305 $4
2306 int
2307 main ()
2308 {
2309 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2310 test_array [0] = 0
2311 
2312   ;
2313   return 0;
2314 }
2315 _ACEOF
2316 if ac_fn_cxx_try_compile "$LINENO"; then :
2317   ac_hi=$ac_mid; break
2318 else
2319   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2320                         if test $ac_lo -le $ac_mid; then
2321                           ac_lo= ac_hi=
2322                           break
2323                         fi
2324                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2325 fi
2326 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2327   done
2328 else
2329   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2330 /* end confdefs.h.  */
2331 $4
2332 int
2333 main ()
2334 {
2335 static int test_array [1 - 2 * !(($2) < 0)];
2336 test_array [0] = 0
2337 
2338   ;
2339   return 0;
2340 }
2341 _ACEOF
2342 if ac_fn_cxx_try_compile "$LINENO"; then :
2343   ac_hi=-1 ac_mid=-1
2344   while :; do
2345     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2346 /* end confdefs.h.  */
2347 $4
2348 int
2349 main ()
2350 {
2351 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2352 test_array [0] = 0
2353 
2354   ;
2355   return 0;
2356 }
2357 _ACEOF
2358 if ac_fn_cxx_try_compile "$LINENO"; then :
2359   ac_lo=$ac_mid; break
2360 else
2361   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2362                         if test $ac_mid -le $ac_hi; then
2363                           ac_lo= ac_hi=
2364                           break
2365                         fi
2366                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2367 fi
2368 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2369   done
2370 else
2371   ac_lo= ac_hi=
2372 fi
2373 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2374 fi
2375 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2376 # Binary search between lo and hi bounds.
2377 while test "x$ac_lo" != "x$ac_hi"; do
2378   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2379   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2380 /* end confdefs.h.  */
2381 $4
2382 int
2383 main ()
2384 {
2385 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2386 test_array [0] = 0
2387 
2388   ;
2389   return 0;
2390 }
2391 _ACEOF
2392 if ac_fn_cxx_try_compile "$LINENO"; then :
2393   ac_hi=$ac_mid
2394 else
2395   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2396 fi
2397 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2398 done
2399 case $ac_lo in #((
2400 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2401 '') ac_retval=1 ;;
2402 esac
2403   else
2404     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2405 /* end confdefs.h.  */
2406 $4
2407 static long int longval () { return $2; }
2408 static unsigned long int ulongval () { return $2; }
2409 #include <stdio.h>
2410 #include <stdlib.h>
2411 int
2412 main ()
2413 {
2414 
2415   FILE *f = fopen ("conftest.val", "w");
2416   if (! f)
2417     return 1;
2418   if (($2) < 0)
2419     {
2420       long int i = longval ();
2421       if (i != ($2))
2422         return 1;
2423       fprintf (f, "%ld", i);
2424     }
2425   else
2426     {
2427       unsigned long int i = ulongval ();
2428       if (i != ($2))
2429         return 1;
2430       fprintf (f, "%lu", i);
2431     }
2432   /* Do not output a trailing newline, as this causes \r\n confusion
2433      on some platforms.  */
2434   return ferror (f) || fclose (f) != 0;
2435 
2436   ;
2437   return 0;
2438 }
2439 _ACEOF
2440 if ac_fn_cxx_try_run "$LINENO"; then :
2441   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2442 else
2443   ac_retval=1
2444 fi
2445 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2446   conftest.$ac_objext conftest.beam conftest.$ac_ext
2447 rm -f conftest.val
2448 
2449   fi
2450   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2451   as_fn_set_status $ac_retval
2452 
2453 } # ac_fn_cxx_compute_int
2454 
2455 # ac_fn_cxx_try_link LINENO
2456 # -------------------------
2457 # Try to link conftest.$ac_ext, and return whether this succeeded.
2458 ac_fn_cxx_try_link ()
2459 {
2460   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2461   rm -f conftest.$ac_objext conftest$ac_exeext
2462   if { { ac_try="$ac_link"
2463 case "(($ac_try" in
2464   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2465   *) ac_try_echo=$ac_try;;
2466 esac
2467 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2468 $as_echo "$ac_try_echo"; } >&5
2469   (eval "$ac_link") 2>conftest.err
2470   ac_status=$?
2471   if test -s conftest.err; then
2472     grep -v '^ *+' conftest.err >conftest.er1
2473     cat conftest.er1 >&5
2474     mv -f conftest.er1 conftest.err
2475   fi
2476   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2477   test $ac_status = 0; } && {
2478          test -z "$ac_cxx_werror_flag" ||
2479          test ! -s conftest.err
2480        } && test -s conftest$ac_exeext && {
2481          test "$cross_compiling" = yes ||
2482          $as_test_x conftest$ac_exeext
2483        }; then :
2484   ac_retval=0
2485 else
2486   $as_echo "$as_me: failed program was:" >&5
2487 sed 's/^/| /' conftest.$ac_ext >&5
2488 
2489         ac_retval=1
2490 fi
2491   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2492   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2493   # interfere with the next link command; also delete a directory that is
2494   # left behind by Apple's compiler.  We do this before executing the actions.
2495   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2496   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2497   as_fn_set_status $ac_retval
2498 
2499 } # ac_fn_cxx_try_link
2500 
2501 # ac_fn_cxx_check_func LINENO FUNC VAR
2502 # ------------------------------------
2503 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2504 ac_fn_cxx_check_func ()
2505 {
2506   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2507   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2508 $as_echo_n "checking for $2... " >&6; }
2509 if eval \${$3+:} false; then :
2510   $as_echo_n "(cached) " >&6
2511 else
2512   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2513 /* end confdefs.h.  */
2514 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2515    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2516 #define $2 innocuous_$2
2517 
2518 /* System header to define __stub macros and hopefully few prototypes,
2519     which can conflict with char $2 (); below.
2520     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2521     <limits.h> exists even on freestanding compilers.  */
2522 
2523 #ifdef __STDC__
2524 # include <limits.h>
2525 #else
2526 # include <assert.h>
2527 #endif
2528 
2529 #undef $2
2530 
2531 /* Override any GCC internal prototype to avoid an error.
2532    Use char because int might match the return type of a GCC
2533    builtin and then its argument prototype would still apply.  */
2534 #ifdef __cplusplus
2535 extern "C"
2536 #endif
2537 char $2 ();
2538 /* The GNU C library defines this for functions which it implements
2539     to always fail with ENOSYS.  Some functions are actually named
2540     something starting with __ and the normal name is an alias.  */
2541 #if defined __stub_$2 || defined __stub___$2
2542 choke me
2543 #endif
2544 
2545 int
2546 main ()
2547 {
2548 return $2 ();
2549   ;
2550   return 0;
2551 }
2552 _ACEOF
2553 if ac_fn_cxx_try_link "$LINENO"; then :
2554   eval "$3=yes"
2555 else
2556   eval "$3=no"
2557 fi
2558 rm -f core conftest.err conftest.$ac_objext \
2559     conftest$ac_exeext conftest.$ac_ext
2560 fi
2561 eval ac_res=\$$3
2562                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2563 $as_echo "$ac_res" >&6; }
2564   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2565 
2566 } # ac_fn_cxx_check_func
2567 
2568 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2569 # -------------------------------------------------------
2570 # Tests whether HEADER exists and can be compiled using the include files in
2571 # INCLUDES, setting the cache variable VAR accordingly.
2572 ac_fn_c_check_header_compile ()
2573 {
2574   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2575   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2576 $as_echo_n "checking for $2... " >&6; }
2577 if eval \${$3+:} false; then :
2578   $as_echo_n "(cached) " >&6
2579 else
2580   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2581 /* end confdefs.h.  */
2582 $4
2583 #include <$2>
2584 _ACEOF
2585 if ac_fn_c_try_compile "$LINENO"; then :
2586   eval "$3=yes"
2587 else
2588   eval "$3=no"
2589 fi
2590 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2591 fi
2592 eval ac_res=\$$3
2593                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2594 $as_echo "$ac_res" >&6; }
2595   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2596 
2597 } # ac_fn_c_check_header_compile
2598 cat >config.log <<_ACEOF
2599 This file contains any messages produced by compilers while
2600 running configure, to aid debugging if configure makes a mistake.
2601 
2602 It was created by OpenJDK $as_me jdk8, which was
2603 generated by GNU Autoconf 2.68.  Invocation command line was
2604 
2605   $ $0 $@
2606 
2607 _ACEOF
2608 exec 5>>config.log
2609 {
2610 cat <<_ASUNAME
2611 ## --------- ##
2612 ## Platform. ##
2613 ## --------- ##
2614 
2615 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2616 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2617 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2618 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2619 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2620 
2621 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2622 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2623 
2624 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2625 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2626 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2627 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2628 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2629 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2630 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2631 
2632 _ASUNAME
2633 
2634 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2635 for as_dir in $PATH
2636 do
2637   IFS=$as_save_IFS
2638   test -z "$as_dir" && as_dir=.
2639     $as_echo "PATH: $as_dir"
2640   done
2641 IFS=$as_save_IFS
2642 
2643 } >&5
2644 
2645 cat >&5 <<_ACEOF
2646 
2647 
2648 ## ----------- ##
2649 ## Core tests. ##
2650 ## ----------- ##
2651 
2652 _ACEOF
2653 
2654 
2655 # Keep a trace of the command line.
2656 # Strip out --no-create and --no-recursion so they do not pile up.
2657 # Strip out --silent because we don't want to record it for future runs.
2658 # Also quote any args containing shell meta-characters.
2659 # Make two passes to allow for proper duplicate-argument suppression.
2660 ac_configure_args=
2661 ac_configure_args0=
2662 ac_configure_args1=
2663 ac_must_keep_next=false
2664 for ac_pass in 1 2
2665 do
2666   for ac_arg
2667   do
2668     case $ac_arg in
2669     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2670     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2671     | -silent | --silent | --silen | --sile | --sil)
2672       continue ;;
2673     *\'*)
2674       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2675     esac
2676     case $ac_pass in
2677     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2678     2)
2679       as_fn_append ac_configure_args1 " '$ac_arg'"
2680       if test $ac_must_keep_next = true; then
2681         ac_must_keep_next=false # Got value, back to normal.
2682       else
2683         case $ac_arg in
2684           *=* | --config-cache | -C | -disable-* | --disable-* \
2685           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2686           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2687           | -with-* | --with-* | -without-* | --without-* | --x)
2688             case "$ac_configure_args0 " in
2689               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2690             esac
2691             ;;
2692           -* ) ac_must_keep_next=true ;;
2693         esac
2694       fi
2695       as_fn_append ac_configure_args " '$ac_arg'"
2696       ;;
2697     esac
2698   done
2699 done
2700 { ac_configure_args0=; unset ac_configure_args0;}
2701 { ac_configure_args1=; unset ac_configure_args1;}
2702 
2703 # When interrupted or exit'd, cleanup temporary files, and complete
2704 # config.log.  We remove comments because anyway the quotes in there
2705 # would cause problems or look ugly.
2706 # WARNING: Use '\'' to represent an apostrophe within the trap.
2707 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2708 trap 'exit_status=$?
2709   # Save into config.log some information that might help in debugging.
2710   {
2711     echo
2712 
2713     $as_echo "## ---------------- ##
2714 ## Cache variables. ##
2715 ## ---------------- ##"
2716     echo
2717     # The following way of writing the cache mishandles newlines in values,
2718 (
2719   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2720     eval ac_val=\$$ac_var
2721     case $ac_val in #(
2722     *${as_nl}*)
2723       case $ac_var in #(
2724       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2725 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2726       esac
2727       case $ac_var in #(
2728       _ | IFS | as_nl) ;; #(
2729       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2730       *) { eval $ac_var=; unset $ac_var;} ;;
2731       esac ;;
2732     esac
2733   done
2734   (set) 2>&1 |
2735     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2736     *${as_nl}ac_space=\ *)
2737       sed -n \
2738         "s/'\''/'\''\\\\'\'''\''/g;
2739           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2740       ;; #(
2741     *)
2742       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2743       ;;
2744     esac |
2745     sort
2746 )
2747     echo
2748 
2749     $as_echo "## ----------------- ##
2750 ## Output variables. ##
2751 ## ----------------- ##"
2752     echo
2753     for ac_var in $ac_subst_vars
2754     do
2755       eval ac_val=\$$ac_var
2756       case $ac_val in
2757       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2758       esac
2759       $as_echo "$ac_var='\''$ac_val'\''"
2760     done | sort
2761     echo
2762 
2763     if test -n "$ac_subst_files"; then
2764       $as_echo "## ------------------- ##
2765 ## File substitutions. ##
2766 ## ------------------- ##"
2767       echo
2768       for ac_var in $ac_subst_files
2769       do
2770         eval ac_val=\$$ac_var
2771         case $ac_val in
2772         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2773         esac
2774         $as_echo "$ac_var='\''$ac_val'\''"
2775       done | sort
2776       echo
2777     fi
2778 
2779     if test -s confdefs.h; then
2780       $as_echo "## ----------- ##
2781 ## confdefs.h. ##
2782 ## ----------- ##"
2783       echo
2784       cat confdefs.h
2785       echo
2786     fi
2787     test "$ac_signal" != 0 &&
2788       $as_echo "$as_me: caught signal $ac_signal"
2789     $as_echo "$as_me: exit $exit_status"
2790   } >&5
2791   rm -f core *.core core.conftest.* &&
2792     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2793     exit $exit_status
2794 ' 0
2795 for ac_signal in 1 2 13 15; do
2796   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2797 done
2798 ac_signal=0
2799 
2800 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2801 rm -f -r conftest* confdefs.h
2802 
2803 $as_echo "/* confdefs.h */" > confdefs.h
2804 
2805 # Predefined preprocessor variables.
2806 
2807 cat >>confdefs.h <<_ACEOF
2808 #define PACKAGE_NAME "$PACKAGE_NAME"
2809 _ACEOF
2810 
2811 cat >>confdefs.h <<_ACEOF
2812 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2813 _ACEOF
2814 
2815 cat >>confdefs.h <<_ACEOF
2816 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2817 _ACEOF
2818 
2819 cat >>confdefs.h <<_ACEOF
2820 #define PACKAGE_STRING "$PACKAGE_STRING"
2821 _ACEOF
2822 
2823 cat >>confdefs.h <<_ACEOF
2824 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2825 _ACEOF
2826 
2827 cat >>confdefs.h <<_ACEOF
2828 #define PACKAGE_URL "$PACKAGE_URL"
2829 _ACEOF
2830 
2831 
2832 # Let the site file select an alternate cache file if it wants to.
2833 # Prefer an explicitly selected file to automatically selected ones.
2834 ac_site_file1=NONE
2835 ac_site_file2=NONE
2836 if test -n "$CONFIG_SITE"; then
2837   # We do not want a PATH search for config.site.
2838   case $CONFIG_SITE in #((
2839     -*)  ac_site_file1=./$CONFIG_SITE;;
2840     */*) ac_site_file1=$CONFIG_SITE;;
2841     *)   ac_site_file1=./$CONFIG_SITE;;
2842   esac
2843 elif test "x$prefix" != xNONE; then
2844   ac_site_file1=$prefix/share/config.site
2845   ac_site_file2=$prefix/etc/config.site
2846 else
2847   ac_site_file1=$ac_default_prefix/share/config.site
2848   ac_site_file2=$ac_default_prefix/etc/config.site
2849 fi
2850 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2851 do
2852   test "x$ac_site_file" = xNONE && continue
2853   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2854     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2855 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2856     sed 's/^/| /' "$ac_site_file" >&5
2857     . "$ac_site_file" \
2858       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2859 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2860 as_fn_error $? "failed to load site script $ac_site_file
2861 See \`config.log' for more details" "$LINENO" 5; }
2862   fi
2863 done
2864 
2865 if test -r "$cache_file"; then
2866   # Some versions of bash will fail to source /dev/null (special files
2867   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2868   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2869     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2870 $as_echo "$as_me: loading cache $cache_file" >&6;}
2871     case $cache_file in
2872       [\\/]* | ?:[\\/]* ) . "$cache_file";;
2873       *)                      . "./$cache_file";;
2874     esac
2875   fi
2876 else
2877   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2878 $as_echo "$as_me: creating cache $cache_file" >&6;}
2879   >$cache_file
2880 fi
2881 
2882 # Check that the precious variables saved in the cache have kept the same
2883 # value.
2884 ac_cache_corrupted=false
2885 for ac_var in $ac_precious_vars; do
2886   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2887   eval ac_new_set=\$ac_env_${ac_var}_set
2888   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2889   eval ac_new_val=\$ac_env_${ac_var}_value
2890   case $ac_old_set,$ac_new_set in
2891     set,)
2892       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2893 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2894       ac_cache_corrupted=: ;;
2895     ,set)
2896       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2897 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2898       ac_cache_corrupted=: ;;
2899     ,);;
2900     *)
2901       if test "x$ac_old_val" != "x$ac_new_val"; then
2902         # differences in whitespace do not lead to failure.
2903         ac_old_val_w=`echo x $ac_old_val`
2904         ac_new_val_w=`echo x $ac_new_val`
2905         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2906           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2907 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2908           ac_cache_corrupted=:
2909         else
2910           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2911 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2912           eval $ac_var=\$ac_old_val
2913         fi
2914         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2915 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2916         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2917 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2918       fi;;
2919   esac
2920   # Pass precious variables to config.status.
2921   if test "$ac_new_set" = set; then
2922     case $ac_new_val in
2923     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2924     *) ac_arg=$ac_var=$ac_new_val ;;
2925     esac
2926     case " $ac_configure_args " in
2927       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2928       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2929     esac
2930   fi
2931 done
2932 if $ac_cache_corrupted; then
2933   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2934 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2935   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2936 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2937   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2938 fi
2939 ## -------------------- ##
2940 ## Main body of script. ##
2941 ## -------------------- ##
2942 
2943 ac_ext=c
2944 ac_cpp='$CPP $CPPFLAGS'
2945 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2946 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2947 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2948 
2949 
2950 
2951 ac_aux_dir=
2952 for ac_dir in build-aux "$srcdir"/build-aux; do
2953   if test -f "$ac_dir/install-sh"; then
2954     ac_aux_dir=$ac_dir
2955     ac_install_sh="$ac_aux_dir/install-sh -c"
2956     break
2957   elif test -f "$ac_dir/install.sh"; then
2958     ac_aux_dir=$ac_dir
2959     ac_install_sh="$ac_aux_dir/install.sh -c"
2960     break
2961   elif test -f "$ac_dir/shtool"; then
2962     ac_aux_dir=$ac_dir
2963     ac_install_sh="$ac_aux_dir/shtool install -c"
2964     break
2965   fi
2966 done
2967 if test -z "$ac_aux_dir"; then
2968   as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
2969 fi
2970 
2971 # These three variables are undocumented and unsupported,
2972 # and are intended to be withdrawn in a future Autoconf release.
2973 # They can cause serious problems if a builder's source tree is in a directory
2974 # whose full name contains unusual characters.
2975 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2976 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2977 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2978 
2979 
2980 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
2981 
2982 #
2983 # Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
2984 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2985 #
2986 # This code is free software; you can redistribute it and/or modify it
2987 # under the terms of the GNU General Public License version 2 only, as
2988 # published by the Free Software Foundation.  Oracle designates this
2989 # particular file as subject to the "Classpath" exception as provided
2990 # by Oracle in the LICENSE file that accompanied this code.
2991 #
2992 # This code is distributed in the hope that it will be useful, but WITHOUT
2993 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2994 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
2995 # version 2 for more details (a copy is included in the LICENSE file that
2996 # accompanied this code).
2997 #
2998 # You should have received a copy of the GNU General Public License version
2999 # 2 along with this work; if not, write to the Free Software Foundation,
3000 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3001 #
3002 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3003 # or visit www.oracle.com if you need additional information or have any
3004 # questions.
3005 #
3006 
3007 #
3008 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
3009 #
3010 # This program is free software; you can redistribute it and/or modify
3011 # it under the terms of the GNU General Public License as published by
3012 # the Free Software Foundation; either version 2 of the License, or
3013 # (at your option) any later version.
3014 #
3015 # This program is distributed in the hope that it will be useful, but
3016 # WITHOUT ANY WARRANTY; without even the implied warranty of
3017 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3018 # General Public License for more details.
3019 #
3020 # You should have received a copy of the GNU General Public License
3021 # along with this program; if not, write to the Free Software
3022 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3023 #
3024 # As a special exception to the GNU General Public License, if you
3025 # distribute this file as part of a program that contains a
3026 # configuration script generated by Autoconf, you may include it under
3027 # the same distribution terms that you use for the rest of that program.
3028 
3029 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
3030 # ----------------------------------
3031 # PKG_PROG_PKG_CONFIG
3032 
3033 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3034 #
3035 # Check to see whether a particular set of modules exists.  Similar
3036 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
3037 #
3038 #
3039 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
3040 # this or PKG_CHECK_MODULES is called, or make sure to call
3041 # PKG_CHECK_EXISTS manually
3042 # --------------------------------------------------------------
3043 
3044 
3045 
3046 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3047 # ---------------------------------------------
3048 # _PKG_CONFIG
3049 
3050 # _PKG_SHORT_ERRORS_SUPPORTED
3051 # -----------------------------
3052 # _PKG_SHORT_ERRORS_SUPPORTED
3053 
3054 
3055 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3056 # [ACTION-IF-NOT-FOUND])
3057 #
3058 #
3059 # Note that if there is a possibility the first call to
3060 # PKG_CHECK_MODULES might not happen, you should be sure to include an
3061 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3062 #
3063 #
3064 # --------------------------------------------------------------
3065 # PKG_CHECK_MODULES
3066 
3067 
3068 # Include these first...
3069 #
3070 # Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3071 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3072 #
3073 # This code is free software; you can redistribute it and/or modify it
3074 # under the terms of the GNU General Public License version 2 only, as
3075 # published by the Free Software Foundation.  Oracle designates this
3076 # particular file as subject to the "Classpath" exception as provided
3077 # by Oracle in the LICENSE file that accompanied this code.
3078 #
3079 # This code is distributed in the hope that it will be useful, but WITHOUT
3080 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3081 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3082 # version 2 for more details (a copy is included in the LICENSE file that
3083 # accompanied this code).
3084 #
3085 # You should have received a copy of the GNU General Public License version
3086 # 2 along with this work; if not, write to the Free Software Foundation,
3087 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3088 #
3089 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3090 # or visit www.oracle.com if you need additional information or have any
3091 # questions.
3092 #
3093 
3094 # Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3095 # If so, then append $1 to $2\
3096 # Also set JVM_ARG_OK to true/false depending on outcome.
3097 
3098 
3099 # This will make sure the given variable points to a full and proper
3100 # path. This means:
3101 # 1) There will be no spaces in the path. On posix platforms,
3102 #    spaces in the path will result in an error. On Windows,
3103 #    the path will be rewritten using short-style to be space-free.
3104 # 2) The path will be absolute, and it will be in unix-style (on
3105 #     cygwin).
3106 # $1: The name of the variable to fix
3107 
3108 
3109 # This will make sure the given variable points to a executable
3110 # with a full and proper path. This means:
3111 # 1) There will be no spaces in the path. On posix platforms,
3112 #    spaces in the path will result in an error. On Windows,
3113 #    the path will be rewritten using short-style to be space-free.
3114 # 2) The path will be absolute, and it will be in unix-style (on
3115 #     cygwin).
3116 # Any arguments given to the executable is preserved.
3117 # If the input variable does not have a directory specification, then
3118 # it need to be in the PATH.
3119 # $1: The name of the variable to fix
3120 
3121 
3122 
3123 
3124 
3125 
3126 # Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3127 # $1: variable to check
3128 # $2: executable name to print in warning (optional)
3129 
3130 
3131 # Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
3132 # Arguments as AC_PATH_PROG:
3133 # $1: variable to set
3134 # $2: executable name to look for
3135 
3136 
3137 # Setup the most fundamental tools that relies on not much else to set up,
3138 # but is used by much of the early bootstrap code.
3139 
3140 
3141 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3142 
3143 
3144 
3145 
3146 
3147 
3148 
3149 #%%% Simple tools %%%
3150 
3151 # Check if we have found a usable version of make
3152 # $1: the path to a potential make binary (or empty)
3153 # $2: the description on how we found this
3154 
3155 
3156 # Goes looking for a usable version of GNU make.
3157 
3158 
3159 
3160 
3161 
3162 
3163 # Check if build directory is on local disk. If not possible to determine,
3164 # we prefer to claim it's local.
3165 # Argument 1: directory to test
3166 # Argument 2: what to do if it is on local disk
3167 # Argument 3: what to do otherwise (remote disk or failure)
3168 
3169 
3170 # Check that source files have basic read permissions set. This might
3171 # not be the case in cygwin in certain conditions.
3172 
3173 
3174 
3175 
3176 #
3177 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3178 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3179 #
3180 # This code is free software; you can redistribute it and/or modify it
3181 # under the terms of the GNU General Public License version 2 only, as
3182 # published by the Free Software Foundation.  Oracle designates this
3183 # particular file as subject to the "Classpath" exception as provided
3184 # by Oracle in the LICENSE file that accompanied this code.
3185 #
3186 # This code is distributed in the hope that it will be useful, but WITHOUT
3187 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3188 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3189 # version 2 for more details (a copy is included in the LICENSE file that
3190 # accompanied this code).
3191 #
3192 # You should have received a copy of the GNU General Public License version
3193 # 2 along with this work; if not, write to the Free Software Foundation,
3194 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3195 #
3196 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3197 # or visit www.oracle.com if you need additional information or have any
3198 # questions.
3199 #
3200 
3201 
3202 
3203 
3204 
3205 # Helper function which possibly converts a path using DOS-style short mode.
3206 # If so, the updated path is stored in $new_path.
3207 # $1: The path to check
3208 
3209 
3210 # Helper function which possibly converts a path using DOS-style short mode.
3211 # If so, the updated path is stored in $new_path.
3212 # $1: The path to check
3213 
3214 
3215 # FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3216 # and could probably be heavily simplified. However, all changes in this
3217 # area tend to need lot of testing in different scenarios, and in lack of
3218 # proper unit testing, cleaning this up has not been deemed worth the effort
3219 # at the moment.
3220 
3221 
3222 
3223 
3224 
3225 
3226 
3227 
3228 
3229 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3230 
3231 
3232 
3233 
3234 #
3235 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3236 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3237 #
3238 # This code is free software; you can redistribute it and/or modify it
3239 # under the terms of the GNU General Public License version 2 only, as
3240 # published by the Free Software Foundation.  Oracle designates this
3241 # particular file as subject to the "Classpath" exception as provided
3242 # by Oracle in the LICENSE file that accompanied this code.
3243 #
3244 # This code is distributed in the hope that it will be useful, but WITHOUT
3245 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3246 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3247 # version 2 for more details (a copy is included in the LICENSE file that
3248 # accompanied this code).
3249 #
3250 # You should have received a copy of the GNU General Public License version
3251 # 2 along with this work; if not, write to the Free Software Foundation,
3252 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3253 #
3254 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3255 # or visit www.oracle.com if you need additional information or have any
3256 # questions.
3257 #
3258 
3259 
3260 
3261 
3262 
3263 
3264 
3265 
3266 
3267 
3268 
3269 # ... then the rest
3270 #
3271 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3272 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3273 #
3274 # This code is free software; you can redistribute it and/or modify it
3275 # under the terms of the GNU General Public License version 2 only, as
3276 # published by the Free Software Foundation.  Oracle designates this
3277 # particular file as subject to the "Classpath" exception as provided
3278 # by Oracle in the LICENSE file that accompanied this code.
3279 #
3280 # This code is distributed in the hope that it will be useful, but WITHOUT
3281 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3282 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3283 # version 2 for more details (a copy is included in the LICENSE file that
3284 # accompanied this code).
3285 #
3286 # You should have received a copy of the GNU General Public License version
3287 # 2 along with this work; if not, write to the Free Software Foundation,
3288 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3289 #
3290 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3291 # or visit www.oracle.com if you need additional information or have any
3292 # questions.
3293 #
3294 
3295 # Execute the check given as argument, and verify the result
3296 # If the Boot JDK was previously found, do nothing
3297 # $1 A command line (typically autoconf macro) to execute
3298 
3299 
3300 # Test: Is bootjdk explicitely set by command line arguments?
3301 
3302 
3303 # Test: Is bootjdk available from builddeps?
3304 
3305 
3306 # Test: Is $JAVA_HOME set?
3307 
3308 
3309 # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3310 
3311 
3312 # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3313 
3314 
3315 # Look for a jdk in the given path. If there are multiple, try to select the newest.
3316 # If found, set BOOT_JDK and BOOT_JDK_FOUND.
3317 # $1 = Path to directory containing jdk installations.
3318 # $2 = String to append to the found JDK directory to get the proper JDK home
3319 
3320 
3321 # Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3322 # environmental variable as base for where to look.
3323 # $1 Name of an environmal variable, assumed to point to the Program Files directory.
3324 
3325 
3326 # Test: Is there a JDK installed in default, well-known locations?
3327 
3328 
3329 # Check that a command-line tool in the Boot JDK is correct
3330 # $1 = name of variable to assign
3331 # $2 = name of binary
3332 
3333 
3334 ###############################################################################
3335 #
3336 # We need a Boot JDK to bootstrap the build.
3337 #
3338 
3339 
3340 
3341 
3342 
3343 #
3344 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3345 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3346 #
3347 # This code is free software; you can redistribute it and/or modify it
3348 # under the terms of the GNU General Public License version 2 only, as
3349 # published by the Free Software Foundation.  Oracle designates this
3350 # particular file as subject to the "Classpath" exception as provided
3351 # by Oracle in the LICENSE file that accompanied this code.
3352 #
3353 # This code is distributed in the hope that it will be useful, but WITHOUT
3354 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3355 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3356 # version 2 for more details (a copy is included in the LICENSE file that
3357 # accompanied this code).
3358 #
3359 # You should have received a copy of the GNU General Public License version
3360 # 2 along with this work; if not, write to the Free Software Foundation,
3361 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3362 #
3363 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3364 # or visit www.oracle.com if you need additional information or have any
3365 # questions.
3366 #
3367 
3368 
3369 
3370 
3371 
3372 
3373 
3374 
3375 
3376 
3377 
3378 
3379 
3380 
3381 
3382 
3383 
3384 
3385 
3386 
3387 #
3388 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3389 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3390 #
3391 # This code is free software; you can redistribute it and/or modify it
3392 # under the terms of the GNU General Public License version 2 only, as
3393 # published by the Free Software Foundation.  Oracle designates this
3394 # particular file as subject to the "Classpath" exception as provided
3395 # by Oracle in the LICENSE file that accompanied this code.
3396 #
3397 # This code is distributed in the hope that it will be useful, but WITHOUT
3398 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3399 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3400 # version 2 for more details (a copy is included in the LICENSE file that
3401 # accompanied this code).
3402 #
3403 # You should have received a copy of the GNU General Public License version
3404 # 2 along with this work; if not, write to the Free Software Foundation,
3405 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3406 #
3407 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3408 # or visit www.oracle.com if you need additional information or have any
3409 # questions.
3410 #
3411 
3412 
3413 
3414 
3415 
3416 cygwin_help() {
3417     case $1 in
3418     unzip)
3419         PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;;
3420     zip)
3421         PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;;
3422     make)
3423         PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;;
3424     * )
3425        break ;;
3426     esac
3427 }
3428 
3429 apt_help() {
3430     case $1 in
3431     devkit)
3432         PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3433     openjdk)
3434         PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3435     alsa)
3436         PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3437     cups)
3438         PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3439     freetype2)
3440         PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3441     pulse)
3442         PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3443     x11)
3444         PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev" ;;
3445     ccache)
3446         PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3447     * )
3448        break ;;
3449     esac
3450 }
3451 
3452 yum_help() {
3453     case $1 in
3454     devkit)
3455         PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3456     openjdk)
3457         PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3458     alsa)
3459         PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3460     cups)
3461         PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3462     freetype2)
3463         PKGHANDLER_COMMAND="sudo yum install freetype2-devel" ;;
3464     pulse)
3465         PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3466     x11)
3467         PKGHANDLER_COMMAND="sudo yum install libXtst-devel" ;;
3468     ccache)
3469         PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3470     * )
3471        break ;;
3472     esac
3473 }
3474 
3475 port_help() {
3476     PKGHANDLER_COMMAND=""
3477 }
3478 
3479 pkgutil_help() {
3480     PKGHANDLER_COMMAND=""
3481 }
3482 
3483 pkgadd_help() {
3484     PKGHANDLER_COMMAND=""
3485 }
3486 
3487 
3488 
3489 #
3490 # Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3491 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3492 #
3493 # This code is free software; you can redistribute it and/or modify it
3494 # under the terms of the GNU General Public License version 2 only, as
3495 # published by the Free Software Foundation.  Oracle designates this
3496 # particular file as subject to the "Classpath" exception as provided
3497 # by Oracle in the LICENSE file that accompanied this code.
3498 #
3499 # This code is distributed in the hope that it will be useful, but WITHOUT
3500 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3501 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3502 # version 2 for more details (a copy is included in the LICENSE file that
3503 # accompanied this code).
3504 #
3505 # You should have received a copy of the GNU General Public License version
3506 # 2 along with this work; if not, write to the Free Software Foundation,
3507 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3508 #
3509 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3510 # or visit www.oracle.com if you need additional information or have any
3511 # questions.
3512 #
3513 
3514 
3515 
3516 
3517 
3518 
3519 
3520 
3521 
3522 
3523 ###############################################################################
3524 #
3525 # Should we build only OpenJDK even if closed sources are present?
3526 #
3527 
3528 
3529 
3530 
3531 ###############################################################################
3532 #
3533 # Setup version numbers
3534 #
3535 
3536 
3537 
3538 
3539 
3540 
3541 # Support for customization of the build process. Some build files
3542 # will include counterparts from this location, if they exist. This allows
3543 # for a degree of customization of the build targets and the rules/recipes
3544 # to create them
3545 
3546 # Check whether --with-custom-make-dir was given.
3547 if test "${with_custom_make_dir+set}" = set; then :
3548   withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3549 fi
3550 
3551 
3552 
3553 #
3554 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3555 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3556 #
3557 # This code is free software; you can redistribute it and/or modify it
3558 # under the terms of the GNU General Public License version 2 only, as
3559 # published by the Free Software Foundation.  Oracle designates this
3560 # particular file as subject to the "Classpath" exception as provided
3561 # by Oracle in the LICENSE file that accompanied this code.
3562 #
3563 # This code is distributed in the hope that it will be useful, but WITHOUT
3564 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3565 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3566 # version 2 for more details (a copy is included in the LICENSE file that
3567 # accompanied this code).
3568 #
3569 # You should have received a copy of the GNU General Public License version
3570 # 2 along with this work; if not, write to the Free Software Foundation,
3571 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3572 #
3573 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3574 # or visit www.oracle.com if you need additional information or have any
3575 # questions.
3576 #
3577 
3578 
3579 
3580 
3581 
3582 
3583 
3584 
3585 
3586 
3587 
3588 
3589 
3590 
3591 
3592 #
3593 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3594 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3595 #
3596 # This code is free software; you can redistribute it and/or modify it
3597 # under the terms of the GNU General Public License version 2 only, as
3598 # published by the Free Software Foundation.  Oracle designates this
3599 # particular file as subject to the "Classpath" exception as provided
3600 # by Oracle in the LICENSE file that accompanied this code.
3601 #
3602 # This code is distributed in the hope that it will be useful, but WITHOUT
3603 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3604 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3605 # version 2 for more details (a copy is included in the LICENSE file that
3606 # accompanied this code).
3607 #
3608 # You should have received a copy of the GNU General Public License version
3609 # 2 along with this work; if not, write to the Free Software Foundation,
3610 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3611 #
3612 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3613 # or visit www.oracle.com if you need additional information or have any
3614 # questions.
3615 #
3616 
3617 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3618 # Converts autoconf style CPU name to OpenJDK style, into
3619 # VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3620 
3621 
3622 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3623 # Converts autoconf style OS name to OpenJDK style, into
3624 # VAR_OS and VAR_OS_API.
3625 
3626 
3627 # Expects $host_os $host_cpu $build_os and $build_cpu
3628 # and $with_target_bits to have been setup!
3629 #
3630 # Translate the standard triplet(quadruplet) definition
3631 # of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3632 # OPENJDK_BUILD_OS, etc.
3633 
3634 
3635 # Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3636 # accordingly. Must be done after setting up build and target system, but before
3637 # doing anything else with these values.
3638 
3639 
3640     # Setup the legacy variables, for controlling the old makefiles.
3641     #
3642 
3643 
3644 
3645 
3646 #%%% Build and target systems %%%
3647 
3648 
3649 
3650 
3651 # Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3652 # Add -mX to various FLAGS variables.
3653 
3654 
3655 
3656 
3657 
3658 
3659 #
3660 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3661 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3662 #
3663 # This code is free software; you can redistribute it and/or modify it
3664 # under the terms of the GNU General Public License version 2 only, as
3665 # published by the Free Software Foundation.  Oracle designates this
3666 # particular file as subject to the "Classpath" exception as provided
3667 # by Oracle in the LICENSE file that accompanied this code.
3668 #
3669 # This code is distributed in the hope that it will be useful, but WITHOUT
3670 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3671 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3672 # version 2 for more details (a copy is included in the LICENSE file that
3673 # accompanied this code).
3674 #
3675 # You should have received a copy of the GNU General Public License version
3676 # 2 along with this work; if not, write to the Free Software Foundation,
3677 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3678 #
3679 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3680 # or visit www.oracle.com if you need additional information or have any
3681 # questions.
3682 #
3683 
3684 
3685 
3686 
3687 
3688 
3689 
3690 
3691 #
3692 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3693 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3694 #
3695 # This code is free software; you can redistribute it and/or modify it
3696 # under the terms of the GNU General Public License version 2 only, as
3697 # published by the Free Software Foundation.  Oracle designates this
3698 # particular file as subject to the "Classpath" exception as provided
3699 # by Oracle in the LICENSE file that accompanied this code.
3700 #
3701 # This code is distributed in the hope that it will be useful, but WITHOUT
3702 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3703 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3704 # version 2 for more details (a copy is included in the LICENSE file that
3705 # accompanied this code).
3706 #
3707 # You should have received a copy of the GNU General Public License version
3708 # 2 along with this work; if not, write to the Free Software Foundation,
3709 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3710 #
3711 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3712 # or visit www.oracle.com if you need additional information or have any
3713 # questions.
3714 #
3715 
3716 # $1 = compiler to test (CC or CXX)
3717 # $2 = human readable name of compiler (C or C++)
3718 
3719 
3720 
3721 
3722 
3723 # $1 = compiler to test (CC or CXX)
3724 # $2 = human readable name of compiler (C or C++)
3725 # $3 = list of compiler names to search for
3726 
3727 
3728 
3729 
3730 
3731 
3732 
3733 
3734 
3735 
3736 
3737 
3738 
3739 # TOOLCHAIN_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3740 #                                   [RUN-IF-FALSE])
3741 # ------------------------------------------------------------
3742 # Check that the c and c++ compilers support an argument
3743 
3744 
3745 
3746 
3747 # Setup the JTREG paths
3748 
3749 
3750 #
3751 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3752 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3753 #
3754 # This code is free software; you can redistribute it and/or modify it
3755 # under the terms of the GNU General Public License version 2 only, as
3756 # published by the Free Software Foundation.  Oracle designates this
3757 # particular file as subject to the "Classpath" exception as provided
3758 # by Oracle in the LICENSE file that accompanied this code.
3759 #
3760 # This code is distributed in the hope that it will be useful, but WITHOUT
3761 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3762 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3763 # version 2 for more details (a copy is included in the LICENSE file that
3764 # accompanied this code).
3765 #
3766 # You should have received a copy of the GNU General Public License version
3767 # 2 along with this work; if not, write to the Free Software Foundation,
3768 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3769 #
3770 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3771 # or visit www.oracle.com if you need additional information or have any
3772 # questions.
3773 #
3774 
3775 
3776 
3777 
3778 
3779 
3780 
3781 # Check if the VS env variables were setup prior to running configure.
3782 # If not, then find vcvarsall.bat and run it automatically, and integrate
3783 # the set env variables into the spec file.
3784 
3785 
3786 
3787 # Setup the DXSDK paths
3788 
3789 
3790 
3791 
3792 
3793 
3794 # This line needs to be here, verbatim, after all includes and the dummy hook
3795 # definitions. It is replaced with custom functionality when building
3796 # custom sources.
3797 #CUSTOM_AUTOCONF_INCLUDE
3798 
3799 # Do not change or remove the following line, it is needed for consistency checks:
3800 DATE_WHEN_GENERATED=1371745642
3801 
3802 ###############################################################################
3803 #
3804 # Initialization / Boot-strapping
3805 #
3806 # The bootstrapping process needs to solve the "chicken or the egg" problem,
3807 # thus it jumps back and forth, each time gaining something needed later on.
3808 #
3809 ###############################################################################
3810 
3811 # Basic initialization that must happen first of all
3812 
3813 # Save the original command line. This is passed to us by the wrapper configure script.
3814 
3815 DATE_WHEN_CONFIGURED=`LANG=C date`
3816 
3817 { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3818 $as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3819 { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3820 $as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3821 
3822 
3823 
3824 # Start with tools that do not need have cross compilation support
3825 # and can be expected to be found in the default PATH. These tools are
3826 # used by configure. Nor are these tools expected to be found in the
3827 # devkit from the builddeps server either, since they are
3828 # needed to download the devkit.
3829 
3830 # First are all the simple required tools.
3831 
3832     for ac_prog in basename
3833 do
3834   # Extract the first word of "$ac_prog", so it can be a program name with args.
3835 set dummy $ac_prog; ac_word=$2
3836 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3837 $as_echo_n "checking for $ac_word... " >&6; }
3838 if ${ac_cv_path_BASENAME+:} false; then :
3839   $as_echo_n "(cached) " >&6
3840 else
3841   case $BASENAME in
3842   [\\/]* | ?:[\\/]*)
3843   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3844   ;;
3845   *)
3846   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3847 for as_dir in $PATH
3848 do
3849   IFS=$as_save_IFS
3850   test -z "$as_dir" && as_dir=.
3851     for ac_exec_ext in '' $ac_executable_extensions; do
3852   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3853     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3854     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3855     break 2
3856   fi
3857 done
3858   done
3859 IFS=$as_save_IFS
3860 
3861   ;;
3862 esac
3863 fi
3864 BASENAME=$ac_cv_path_BASENAME
3865 if test -n "$BASENAME"; then
3866   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
3867 $as_echo "$BASENAME" >&6; }
3868 else
3869   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3870 $as_echo "no" >&6; }
3871 fi
3872 
3873 
3874   test -n "$BASENAME" && break
3875 done
3876 
3877 
3878     if test "x$BASENAME" = x; then
3879         if test "xbasename" = x; then
3880           PROG_NAME=basename
3881         else
3882           PROG_NAME=basename
3883         fi
3884         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3885 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3886         as_fn_error $? "Cannot continue" "$LINENO" 5
3887     fi
3888 
3889 
3890 
3891     for ac_prog in bash
3892 do
3893   # Extract the first word of "$ac_prog", so it can be a program name with args.
3894 set dummy $ac_prog; ac_word=$2
3895 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3896 $as_echo_n "checking for $ac_word... " >&6; }
3897 if ${ac_cv_path_BASH+:} false; then :
3898   $as_echo_n "(cached) " >&6
3899 else
3900   case $BASH in
3901   [\\/]* | ?:[\\/]*)
3902   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3903   ;;
3904   *)
3905   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3906 for as_dir in $PATH
3907 do
3908   IFS=$as_save_IFS
3909   test -z "$as_dir" && as_dir=.
3910     for ac_exec_ext in '' $ac_executable_extensions; do
3911   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3912     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3913     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3914     break 2
3915   fi
3916 done
3917   done
3918 IFS=$as_save_IFS
3919 
3920   ;;
3921 esac
3922 fi
3923 BASH=$ac_cv_path_BASH
3924 if test -n "$BASH"; then
3925   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
3926 $as_echo "$BASH" >&6; }
3927 else
3928   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3929 $as_echo "no" >&6; }
3930 fi
3931 
3932 
3933   test -n "$BASH" && break
3934 done
3935 
3936 
3937     if test "x$BASH" = x; then
3938         if test "xbash" = x; then
3939           PROG_NAME=bash
3940         else
3941           PROG_NAME=bash
3942         fi
3943         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3944 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3945         as_fn_error $? "Cannot continue" "$LINENO" 5
3946     fi
3947 
3948 
3949 
3950     for ac_prog in cat
3951 do
3952   # Extract the first word of "$ac_prog", so it can be a program name with args.
3953 set dummy $ac_prog; ac_word=$2
3954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3955 $as_echo_n "checking for $ac_word... " >&6; }
3956 if ${ac_cv_path_CAT+:} false; then :
3957   $as_echo_n "(cached) " >&6
3958 else
3959   case $CAT in
3960   [\\/]* | ?:[\\/]*)
3961   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
3962   ;;
3963   *)
3964   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3965 for as_dir in $PATH
3966 do
3967   IFS=$as_save_IFS
3968   test -z "$as_dir" && as_dir=.
3969     for ac_exec_ext in '' $ac_executable_extensions; do
3970   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3971     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
3972     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3973     break 2
3974   fi
3975 done
3976   done
3977 IFS=$as_save_IFS
3978 
3979   ;;
3980 esac
3981 fi
3982 CAT=$ac_cv_path_CAT
3983 if test -n "$CAT"; then
3984   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
3985 $as_echo "$CAT" >&6; }
3986 else
3987   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3988 $as_echo "no" >&6; }
3989 fi
3990 
3991 
3992   test -n "$CAT" && break
3993 done
3994 
3995 
3996     if test "x$CAT" = x; then
3997         if test "xcat" = x; then
3998           PROG_NAME=cat
3999         else
4000           PROG_NAME=cat
4001         fi
4002         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4003 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4004         as_fn_error $? "Cannot continue" "$LINENO" 5
4005     fi
4006 
4007 
4008 
4009     for ac_prog in chmod
4010 do
4011   # Extract the first word of "$ac_prog", so it can be a program name with args.
4012 set dummy $ac_prog; ac_word=$2
4013 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4014 $as_echo_n "checking for $ac_word... " >&6; }
4015 if ${ac_cv_path_CHMOD+:} false; then :
4016   $as_echo_n "(cached) " >&6
4017 else
4018   case $CHMOD in
4019   [\\/]* | ?:[\\/]*)
4020   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4021   ;;
4022   *)
4023   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4024 for as_dir in $PATH
4025 do
4026   IFS=$as_save_IFS
4027   test -z "$as_dir" && as_dir=.
4028     for ac_exec_ext in '' $ac_executable_extensions; do
4029   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4030     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4031     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4032     break 2
4033   fi
4034 done
4035   done
4036 IFS=$as_save_IFS
4037 
4038   ;;
4039 esac
4040 fi
4041 CHMOD=$ac_cv_path_CHMOD
4042 if test -n "$CHMOD"; then
4043   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4044 $as_echo "$CHMOD" >&6; }
4045 else
4046   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4047 $as_echo "no" >&6; }
4048 fi
4049 
4050 
4051   test -n "$CHMOD" && break
4052 done
4053 
4054 
4055     if test "x$CHMOD" = x; then
4056         if test "xchmod" = x; then
4057           PROG_NAME=chmod
4058         else
4059           PROG_NAME=chmod
4060         fi
4061         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4062 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4063         as_fn_error $? "Cannot continue" "$LINENO" 5
4064     fi
4065 
4066 
4067 
4068     for ac_prog in cmp
4069 do
4070   # Extract the first word of "$ac_prog", so it can be a program name with args.
4071 set dummy $ac_prog; ac_word=$2
4072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4073 $as_echo_n "checking for $ac_word... " >&6; }
4074 if ${ac_cv_path_CMP+:} false; then :
4075   $as_echo_n "(cached) " >&6
4076 else
4077   case $CMP in
4078   [\\/]* | ?:[\\/]*)
4079   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
4080   ;;
4081   *)
4082   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4083 for as_dir in $PATH
4084 do
4085   IFS=$as_save_IFS
4086   test -z "$as_dir" && as_dir=.
4087     for ac_exec_ext in '' $ac_executable_extensions; do
4088   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4089     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
4090     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4091     break 2
4092   fi
4093 done
4094   done
4095 IFS=$as_save_IFS
4096 
4097   ;;
4098 esac
4099 fi
4100 CMP=$ac_cv_path_CMP
4101 if test -n "$CMP"; then
4102   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
4103 $as_echo "$CMP" >&6; }
4104 else
4105   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4106 $as_echo "no" >&6; }
4107 fi
4108 
4109 
4110   test -n "$CMP" && break
4111 done
4112 
4113 
4114     if test "x$CMP" = x; then
4115         if test "xcmp" = x; then
4116           PROG_NAME=cmp
4117         else
4118           PROG_NAME=cmp
4119         fi
4120         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4121 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4122         as_fn_error $? "Cannot continue" "$LINENO" 5
4123     fi
4124 
4125 
4126 
4127     for ac_prog in comm
4128 do
4129   # Extract the first word of "$ac_prog", so it can be a program name with args.
4130 set dummy $ac_prog; ac_word=$2
4131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4132 $as_echo_n "checking for $ac_word... " >&6; }
4133 if ${ac_cv_path_COMM+:} false; then :
4134   $as_echo_n "(cached) " >&6
4135 else
4136   case $COMM in
4137   [\\/]* | ?:[\\/]*)
4138   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
4139   ;;
4140   *)
4141   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4142 for as_dir in $PATH
4143 do
4144   IFS=$as_save_IFS
4145   test -z "$as_dir" && as_dir=.
4146     for ac_exec_ext in '' $ac_executable_extensions; do
4147   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4148     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
4149     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4150     break 2
4151   fi
4152 done
4153   done
4154 IFS=$as_save_IFS
4155 
4156   ;;
4157 esac
4158 fi
4159 COMM=$ac_cv_path_COMM
4160 if test -n "$COMM"; then
4161   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
4162 $as_echo "$COMM" >&6; }
4163 else
4164   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4165 $as_echo "no" >&6; }
4166 fi
4167 
4168 
4169   test -n "$COMM" && break
4170 done
4171 
4172 
4173     if test "x$COMM" = x; then
4174         if test "xcomm" = x; then
4175           PROG_NAME=comm
4176         else
4177           PROG_NAME=comm
4178         fi
4179         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4180 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4181         as_fn_error $? "Cannot continue" "$LINENO" 5
4182     fi
4183 
4184 
4185 
4186     for ac_prog in cp
4187 do
4188   # Extract the first word of "$ac_prog", so it can be a program name with args.
4189 set dummy $ac_prog; ac_word=$2
4190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4191 $as_echo_n "checking for $ac_word... " >&6; }
4192 if ${ac_cv_path_CP+:} false; then :
4193   $as_echo_n "(cached) " >&6
4194 else
4195   case $CP in
4196   [\\/]* | ?:[\\/]*)
4197   ac_cv_path_CP="$CP" # Let the user override the test with a path.
4198   ;;
4199   *)
4200   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4201 for as_dir in $PATH
4202 do
4203   IFS=$as_save_IFS
4204   test -z "$as_dir" && as_dir=.
4205     for ac_exec_ext in '' $ac_executable_extensions; do
4206   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4207     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4208     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4209     break 2
4210   fi
4211 done
4212   done
4213 IFS=$as_save_IFS
4214 
4215   ;;
4216 esac
4217 fi
4218 CP=$ac_cv_path_CP
4219 if test -n "$CP"; then
4220   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4221 $as_echo "$CP" >&6; }
4222 else
4223   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4224 $as_echo "no" >&6; }
4225 fi
4226 
4227 
4228   test -n "$CP" && break
4229 done
4230 
4231 
4232     if test "x$CP" = x; then
4233         if test "xcp" = x; then
4234           PROG_NAME=cp
4235         else
4236           PROG_NAME=cp
4237         fi
4238         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4239 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4240         as_fn_error $? "Cannot continue" "$LINENO" 5
4241     fi
4242 
4243 
4244 
4245     for ac_prog in cpio
4246 do
4247   # Extract the first word of "$ac_prog", so it can be a program name with args.
4248 set dummy $ac_prog; ac_word=$2
4249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4250 $as_echo_n "checking for $ac_word... " >&6; }
4251 if ${ac_cv_path_CPIO+:} false; then :
4252   $as_echo_n "(cached) " >&6
4253 else
4254   case $CPIO in
4255   [\\/]* | ?:[\\/]*)
4256   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
4257   ;;
4258   *)
4259   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4260 for as_dir in $PATH
4261 do
4262   IFS=$as_save_IFS
4263   test -z "$as_dir" && as_dir=.
4264     for ac_exec_ext in '' $ac_executable_extensions; do
4265   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4266     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
4267     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4268     break 2
4269   fi
4270 done
4271   done
4272 IFS=$as_save_IFS
4273 
4274   ;;
4275 esac
4276 fi
4277 CPIO=$ac_cv_path_CPIO
4278 if test -n "$CPIO"; then
4279   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
4280 $as_echo "$CPIO" >&6; }
4281 else
4282   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4283 $as_echo "no" >&6; }
4284 fi
4285 
4286 
4287   test -n "$CPIO" && break
4288 done
4289 
4290 
4291     if test "x$CPIO" = x; then
4292         if test "xcpio" = x; then
4293           PROG_NAME=cpio
4294         else
4295           PROG_NAME=cpio
4296         fi
4297         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4298 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4299         as_fn_error $? "Cannot continue" "$LINENO" 5
4300     fi
4301 
4302 
4303 
4304     for ac_prog in cut
4305 do
4306   # Extract the first word of "$ac_prog", so it can be a program name with args.
4307 set dummy $ac_prog; ac_word=$2
4308 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4309 $as_echo_n "checking for $ac_word... " >&6; }
4310 if ${ac_cv_path_CUT+:} false; then :
4311   $as_echo_n "(cached) " >&6
4312 else
4313   case $CUT in
4314   [\\/]* | ?:[\\/]*)
4315   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4316   ;;
4317   *)
4318   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4319 for as_dir in $PATH
4320 do
4321   IFS=$as_save_IFS
4322   test -z "$as_dir" && as_dir=.
4323     for ac_exec_ext in '' $ac_executable_extensions; do
4324   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4325     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4326     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4327     break 2
4328   fi
4329 done
4330   done
4331 IFS=$as_save_IFS
4332 
4333   ;;
4334 esac
4335 fi
4336 CUT=$ac_cv_path_CUT
4337 if test -n "$CUT"; then
4338   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4339 $as_echo "$CUT" >&6; }
4340 else
4341   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4342 $as_echo "no" >&6; }
4343 fi
4344 
4345 
4346   test -n "$CUT" && break
4347 done
4348 
4349 
4350     if test "x$CUT" = x; then
4351         if test "xcut" = x; then
4352           PROG_NAME=cut
4353         else
4354           PROG_NAME=cut
4355         fi
4356         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4357 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4358         as_fn_error $? "Cannot continue" "$LINENO" 5
4359     fi
4360 
4361 
4362 
4363     for ac_prog in date
4364 do
4365   # Extract the first word of "$ac_prog", so it can be a program name with args.
4366 set dummy $ac_prog; ac_word=$2
4367 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4368 $as_echo_n "checking for $ac_word... " >&6; }
4369 if ${ac_cv_path_DATE+:} false; then :
4370   $as_echo_n "(cached) " >&6
4371 else
4372   case $DATE in
4373   [\\/]* | ?:[\\/]*)
4374   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4375   ;;
4376   *)
4377   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4378 for as_dir in $PATH
4379 do
4380   IFS=$as_save_IFS
4381   test -z "$as_dir" && as_dir=.
4382     for ac_exec_ext in '' $ac_executable_extensions; do
4383   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4384     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4385     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4386     break 2
4387   fi
4388 done
4389   done
4390 IFS=$as_save_IFS
4391 
4392   ;;
4393 esac
4394 fi
4395 DATE=$ac_cv_path_DATE
4396 if test -n "$DATE"; then
4397   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4398 $as_echo "$DATE" >&6; }
4399 else
4400   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4401 $as_echo "no" >&6; }
4402 fi
4403 
4404 
4405   test -n "$DATE" && break
4406 done
4407 
4408 
4409     if test "x$DATE" = x; then
4410         if test "xdate" = x; then
4411           PROG_NAME=date
4412         else
4413           PROG_NAME=date
4414         fi
4415         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4416 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4417         as_fn_error $? "Cannot continue" "$LINENO" 5
4418     fi
4419 
4420 
4421 
4422     for ac_prog in gdiff diff
4423 do
4424   # Extract the first word of "$ac_prog", so it can be a program name with args.
4425 set dummy $ac_prog; ac_word=$2
4426 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4427 $as_echo_n "checking for $ac_word... " >&6; }
4428 if ${ac_cv_path_DIFF+:} false; then :
4429   $as_echo_n "(cached) " >&6
4430 else
4431   case $DIFF in
4432   [\\/]* | ?:[\\/]*)
4433   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4434   ;;
4435   *)
4436   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4437 for as_dir in $PATH
4438 do
4439   IFS=$as_save_IFS
4440   test -z "$as_dir" && as_dir=.
4441     for ac_exec_ext in '' $ac_executable_extensions; do
4442   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4443     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4444     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4445     break 2
4446   fi
4447 done
4448   done
4449 IFS=$as_save_IFS
4450 
4451   ;;
4452 esac
4453 fi
4454 DIFF=$ac_cv_path_DIFF
4455 if test -n "$DIFF"; then
4456   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4457 $as_echo "$DIFF" >&6; }
4458 else
4459   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4460 $as_echo "no" >&6; }
4461 fi
4462 
4463 
4464   test -n "$DIFF" && break
4465 done
4466 
4467 
4468     if test "x$DIFF" = x; then
4469         if test "xgdiff diff" = x; then
4470           PROG_NAME=diff
4471         else
4472           PROG_NAME=gdiff diff
4473         fi
4474         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4475 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4476         as_fn_error $? "Cannot continue" "$LINENO" 5
4477     fi
4478 
4479 
4480 
4481     for ac_prog in dirname
4482 do
4483   # Extract the first word of "$ac_prog", so it can be a program name with args.
4484 set dummy $ac_prog; ac_word=$2
4485 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4486 $as_echo_n "checking for $ac_word... " >&6; }
4487 if ${ac_cv_path_DIRNAME+:} false; then :
4488   $as_echo_n "(cached) " >&6
4489 else
4490   case $DIRNAME in
4491   [\\/]* | ?:[\\/]*)
4492   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
4493   ;;
4494   *)
4495   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4496 for as_dir in $PATH
4497 do
4498   IFS=$as_save_IFS
4499   test -z "$as_dir" && as_dir=.
4500     for ac_exec_ext in '' $ac_executable_extensions; do
4501   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4502     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
4503     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4504     break 2
4505   fi
4506 done
4507   done
4508 IFS=$as_save_IFS
4509 
4510   ;;
4511 esac
4512 fi
4513 DIRNAME=$ac_cv_path_DIRNAME
4514 if test -n "$DIRNAME"; then
4515   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
4516 $as_echo "$DIRNAME" >&6; }
4517 else
4518   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4519 $as_echo "no" >&6; }
4520 fi
4521 
4522 
4523   test -n "$DIRNAME" && break
4524 done
4525 
4526 
4527     if test "x$DIRNAME" = x; then
4528         if test "xdirname" = x; then
4529           PROG_NAME=dirname
4530         else
4531           PROG_NAME=dirname
4532         fi
4533         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4534 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4535         as_fn_error $? "Cannot continue" "$LINENO" 5
4536     fi
4537 
4538 
4539 
4540     for ac_prog in echo
4541 do
4542   # Extract the first word of "$ac_prog", so it can be a program name with args.
4543 set dummy $ac_prog; ac_word=$2
4544 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4545 $as_echo_n "checking for $ac_word... " >&6; }
4546 if ${ac_cv_path_ECHO+:} false; then :
4547   $as_echo_n "(cached) " >&6
4548 else
4549   case $ECHO in
4550   [\\/]* | ?:[\\/]*)
4551   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4552   ;;
4553   *)
4554   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4555 for as_dir in $PATH
4556 do
4557   IFS=$as_save_IFS
4558   test -z "$as_dir" && as_dir=.
4559     for ac_exec_ext in '' $ac_executable_extensions; do
4560   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4561     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4562     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4563     break 2
4564   fi
4565 done
4566   done
4567 IFS=$as_save_IFS
4568 
4569   ;;
4570 esac
4571 fi
4572 ECHO=$ac_cv_path_ECHO
4573 if test -n "$ECHO"; then
4574   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4575 $as_echo "$ECHO" >&6; }
4576 else
4577   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4578 $as_echo "no" >&6; }
4579 fi
4580 
4581 
4582   test -n "$ECHO" && break
4583 done
4584 
4585 
4586     if test "x$ECHO" = x; then
4587         if test "xecho" = x; then
4588           PROG_NAME=echo
4589         else
4590           PROG_NAME=echo
4591         fi
4592         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4593 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4594         as_fn_error $? "Cannot continue" "$LINENO" 5
4595     fi
4596 
4597 
4598 
4599     for ac_prog in expr
4600 do
4601   # Extract the first word of "$ac_prog", so it can be a program name with args.
4602 set dummy $ac_prog; ac_word=$2
4603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4604 $as_echo_n "checking for $ac_word... " >&6; }
4605 if ${ac_cv_path_EXPR+:} false; then :
4606   $as_echo_n "(cached) " >&6
4607 else
4608   case $EXPR in
4609   [\\/]* | ?:[\\/]*)
4610   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
4611   ;;
4612   *)
4613   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4614 for as_dir in $PATH
4615 do
4616   IFS=$as_save_IFS
4617   test -z "$as_dir" && as_dir=.
4618     for ac_exec_ext in '' $ac_executable_extensions; do
4619   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4620     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
4621     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4622     break 2
4623   fi
4624 done
4625   done
4626 IFS=$as_save_IFS
4627 
4628   ;;
4629 esac
4630 fi
4631 EXPR=$ac_cv_path_EXPR
4632 if test -n "$EXPR"; then
4633   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
4634 $as_echo "$EXPR" >&6; }
4635 else
4636   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4637 $as_echo "no" >&6; }
4638 fi
4639 
4640 
4641   test -n "$EXPR" && break
4642 done
4643 
4644 
4645     if test "x$EXPR" = x; then
4646         if test "xexpr" = x; then
4647           PROG_NAME=expr
4648         else
4649           PROG_NAME=expr
4650         fi
4651         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4652 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4653         as_fn_error $? "Cannot continue" "$LINENO" 5
4654     fi
4655 
4656 
4657 
4658     for ac_prog in file
4659 do
4660   # Extract the first word of "$ac_prog", so it can be a program name with args.
4661 set dummy $ac_prog; ac_word=$2
4662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4663 $as_echo_n "checking for $ac_word... " >&6; }
4664 if ${ac_cv_path_FILE+:} false; then :
4665   $as_echo_n "(cached) " >&6
4666 else
4667   case $FILE in
4668   [\\/]* | ?:[\\/]*)
4669   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
4670   ;;
4671   *)
4672   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4673 for as_dir in $PATH
4674 do
4675   IFS=$as_save_IFS
4676   test -z "$as_dir" && as_dir=.
4677     for ac_exec_ext in '' $ac_executable_extensions; do
4678   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4679     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
4680     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4681     break 2
4682   fi
4683 done
4684   done
4685 IFS=$as_save_IFS
4686 
4687   ;;
4688 esac
4689 fi
4690 FILE=$ac_cv_path_FILE
4691 if test -n "$FILE"; then
4692   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
4693 $as_echo "$FILE" >&6; }
4694 else
4695   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4696 $as_echo "no" >&6; }
4697 fi
4698 
4699 
4700   test -n "$FILE" && break
4701 done
4702 
4703 
4704     if test "x$FILE" = x; then
4705         if test "xfile" = x; then
4706           PROG_NAME=file
4707         else
4708           PROG_NAME=file
4709         fi
4710         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4711 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4712         as_fn_error $? "Cannot continue" "$LINENO" 5
4713     fi
4714 
4715 
4716 
4717     for ac_prog in find
4718 do
4719   # Extract the first word of "$ac_prog", so it can be a program name with args.
4720 set dummy $ac_prog; ac_word=$2
4721 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4722 $as_echo_n "checking for $ac_word... " >&6; }
4723 if ${ac_cv_path_FIND+:} false; then :
4724   $as_echo_n "(cached) " >&6
4725 else
4726   case $FIND in
4727   [\\/]* | ?:[\\/]*)
4728   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
4729   ;;
4730   *)
4731   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4732 for as_dir in $PATH
4733 do
4734   IFS=$as_save_IFS
4735   test -z "$as_dir" && as_dir=.
4736     for ac_exec_ext in '' $ac_executable_extensions; do
4737   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4738     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
4739     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4740     break 2
4741   fi
4742 done
4743   done
4744 IFS=$as_save_IFS
4745 
4746   ;;
4747 esac
4748 fi
4749 FIND=$ac_cv_path_FIND
4750 if test -n "$FIND"; then
4751   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
4752 $as_echo "$FIND" >&6; }
4753 else
4754   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4755 $as_echo "no" >&6; }
4756 fi
4757 
4758 
4759   test -n "$FIND" && break
4760 done
4761 
4762 
4763     if test "x$FIND" = x; then
4764         if test "xfind" = x; then
4765           PROG_NAME=find
4766         else
4767           PROG_NAME=find
4768         fi
4769         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4770 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4771         as_fn_error $? "Cannot continue" "$LINENO" 5
4772     fi
4773 
4774 
4775 
4776     for ac_prog in head
4777 do
4778   # Extract the first word of "$ac_prog", so it can be a program name with args.
4779 set dummy $ac_prog; ac_word=$2
4780 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4781 $as_echo_n "checking for $ac_word... " >&6; }
4782 if ${ac_cv_path_HEAD+:} false; then :
4783   $as_echo_n "(cached) " >&6
4784 else
4785   case $HEAD in
4786   [\\/]* | ?:[\\/]*)
4787   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
4788   ;;
4789   *)
4790   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4791 for as_dir in $PATH
4792 do
4793   IFS=$as_save_IFS
4794   test -z "$as_dir" && as_dir=.
4795     for ac_exec_ext in '' $ac_executable_extensions; do
4796   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4797     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
4798     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4799     break 2
4800   fi
4801 done
4802   done
4803 IFS=$as_save_IFS
4804 
4805   ;;
4806 esac
4807 fi
4808 HEAD=$ac_cv_path_HEAD
4809 if test -n "$HEAD"; then
4810   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
4811 $as_echo "$HEAD" >&6; }
4812 else
4813   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4814 $as_echo "no" >&6; }
4815 fi
4816 
4817 
4818   test -n "$HEAD" && break
4819 done
4820 
4821 
4822     if test "x$HEAD" = x; then
4823         if test "xhead" = x; then
4824           PROG_NAME=head
4825         else
4826           PROG_NAME=head
4827         fi
4828         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4829 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4830         as_fn_error $? "Cannot continue" "$LINENO" 5
4831     fi
4832 
4833 
4834 
4835     for ac_prog in ln
4836 do
4837   # Extract the first word of "$ac_prog", so it can be a program name with args.
4838 set dummy $ac_prog; ac_word=$2
4839 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4840 $as_echo_n "checking for $ac_word... " >&6; }
4841 if ${ac_cv_path_LN+:} false; then :
4842   $as_echo_n "(cached) " >&6
4843 else
4844   case $LN in
4845   [\\/]* | ?:[\\/]*)
4846   ac_cv_path_LN="$LN" # Let the user override the test with a path.
4847   ;;
4848   *)
4849   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4850 for as_dir in $PATH
4851 do
4852   IFS=$as_save_IFS
4853   test -z "$as_dir" && as_dir=.
4854     for ac_exec_ext in '' $ac_executable_extensions; do
4855   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4856     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4857     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4858     break 2
4859   fi
4860 done
4861   done
4862 IFS=$as_save_IFS
4863 
4864   ;;
4865 esac
4866 fi
4867 LN=$ac_cv_path_LN
4868 if test -n "$LN"; then
4869   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4870 $as_echo "$LN" >&6; }
4871 else
4872   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4873 $as_echo "no" >&6; }
4874 fi
4875 
4876 
4877   test -n "$LN" && break
4878 done
4879 
4880 
4881     if test "x$LN" = x; then
4882         if test "xln" = x; then
4883           PROG_NAME=ln
4884         else
4885           PROG_NAME=ln
4886         fi
4887         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4888 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4889         as_fn_error $? "Cannot continue" "$LINENO" 5
4890     fi
4891 
4892 
4893 
4894     for ac_prog in ls
4895 do
4896   # Extract the first word of "$ac_prog", so it can be a program name with args.
4897 set dummy $ac_prog; ac_word=$2
4898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4899 $as_echo_n "checking for $ac_word... " >&6; }
4900 if ${ac_cv_path_LS+:} false; then :
4901   $as_echo_n "(cached) " >&6
4902 else
4903   case $LS in
4904   [\\/]* | ?:[\\/]*)
4905   ac_cv_path_LS="$LS" # Let the user override the test with a path.
4906   ;;
4907   *)
4908   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4909 for as_dir in $PATH
4910 do
4911   IFS=$as_save_IFS
4912   test -z "$as_dir" && as_dir=.
4913     for ac_exec_ext in '' $ac_executable_extensions; do
4914   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4915     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4916     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4917     break 2
4918   fi
4919 done
4920   done
4921 IFS=$as_save_IFS
4922 
4923   ;;
4924 esac
4925 fi
4926 LS=$ac_cv_path_LS
4927 if test -n "$LS"; then
4928   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
4929 $as_echo "$LS" >&6; }
4930 else
4931   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4932 $as_echo "no" >&6; }
4933 fi
4934 
4935 
4936   test -n "$LS" && break
4937 done
4938 
4939 
4940     if test "x$LS" = x; then
4941         if test "xls" = x; then
4942           PROG_NAME=ls
4943         else
4944           PROG_NAME=ls
4945         fi
4946         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4947 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4948         as_fn_error $? "Cannot continue" "$LINENO" 5
4949     fi
4950 
4951 
4952 
4953     for ac_prog in mkdir
4954 do
4955   # Extract the first word of "$ac_prog", so it can be a program name with args.
4956 set dummy $ac_prog; ac_word=$2
4957 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4958 $as_echo_n "checking for $ac_word... " >&6; }
4959 if ${ac_cv_path_MKDIR+:} false; then :
4960   $as_echo_n "(cached) " >&6
4961 else
4962   case $MKDIR in
4963   [\\/]* | ?:[\\/]*)
4964   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
4965   ;;
4966   *)
4967   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4968 for as_dir in $PATH
4969 do
4970   IFS=$as_save_IFS
4971   test -z "$as_dir" && as_dir=.
4972     for ac_exec_ext in '' $ac_executable_extensions; do
4973   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4974     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
4975     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4976     break 2
4977   fi
4978 done
4979   done
4980 IFS=$as_save_IFS
4981 
4982   ;;
4983 esac
4984 fi
4985 MKDIR=$ac_cv_path_MKDIR
4986 if test -n "$MKDIR"; then
4987   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
4988 $as_echo "$MKDIR" >&6; }
4989 else
4990   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4991 $as_echo "no" >&6; }
4992 fi
4993 
4994 
4995   test -n "$MKDIR" && break
4996 done
4997 
4998 
4999     if test "x$MKDIR" = x; then
5000         if test "xmkdir" = x; then
5001           PROG_NAME=mkdir
5002         else
5003           PROG_NAME=mkdir
5004         fi
5005         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5006 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5007         as_fn_error $? "Cannot continue" "$LINENO" 5
5008     fi
5009 
5010 
5011 
5012     for ac_prog in mktemp
5013 do
5014   # Extract the first word of "$ac_prog", so it can be a program name with args.
5015 set dummy $ac_prog; ac_word=$2
5016 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5017 $as_echo_n "checking for $ac_word... " >&6; }
5018 if ${ac_cv_path_MKTEMP+:} false; then :
5019   $as_echo_n "(cached) " >&6
5020 else
5021   case $MKTEMP in
5022   [\\/]* | ?:[\\/]*)
5023   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
5024   ;;
5025   *)
5026   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5027 for as_dir in $PATH
5028 do
5029   IFS=$as_save_IFS
5030   test -z "$as_dir" && as_dir=.
5031     for ac_exec_ext in '' $ac_executable_extensions; do
5032   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5033     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
5034     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5035     break 2
5036   fi
5037 done
5038   done
5039 IFS=$as_save_IFS
5040 
5041   ;;
5042 esac
5043 fi
5044 MKTEMP=$ac_cv_path_MKTEMP
5045 if test -n "$MKTEMP"; then
5046   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
5047 $as_echo "$MKTEMP" >&6; }
5048 else
5049   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5050 $as_echo "no" >&6; }
5051 fi
5052 
5053 
5054   test -n "$MKTEMP" && break
5055 done
5056 
5057 
5058     if test "x$MKTEMP" = x; then
5059         if test "xmktemp" = x; then
5060           PROG_NAME=mktemp
5061         else
5062           PROG_NAME=mktemp
5063         fi
5064         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5065 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5066         as_fn_error $? "Cannot continue" "$LINENO" 5
5067     fi
5068 
5069 
5070 
5071     for ac_prog in mv
5072 do
5073   # Extract the first word of "$ac_prog", so it can be a program name with args.
5074 set dummy $ac_prog; ac_word=$2
5075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5076 $as_echo_n "checking for $ac_word... " >&6; }
5077 if ${ac_cv_path_MV+:} false; then :
5078   $as_echo_n "(cached) " >&6
5079 else
5080   case $MV in
5081   [\\/]* | ?:[\\/]*)
5082   ac_cv_path_MV="$MV" # Let the user override the test with a path.
5083   ;;
5084   *)
5085   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5086 for as_dir in $PATH
5087 do
5088   IFS=$as_save_IFS
5089   test -z "$as_dir" && as_dir=.
5090     for ac_exec_ext in '' $ac_executable_extensions; do
5091   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5092     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
5093     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5094     break 2
5095   fi
5096 done
5097   done
5098 IFS=$as_save_IFS
5099 
5100   ;;
5101 esac
5102 fi
5103 MV=$ac_cv_path_MV
5104 if test -n "$MV"; then
5105   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
5106 $as_echo "$MV" >&6; }
5107 else
5108   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5109 $as_echo "no" >&6; }
5110 fi
5111 
5112 
5113   test -n "$MV" && break
5114 done
5115 
5116 
5117     if test "x$MV" = x; then
5118         if test "xmv" = x; then
5119           PROG_NAME=mv
5120         else
5121           PROG_NAME=mv
5122         fi
5123         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5124 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5125         as_fn_error $? "Cannot continue" "$LINENO" 5
5126     fi
5127 
5128 
5129 
5130     for ac_prog in printf
5131 do
5132   # Extract the first word of "$ac_prog", so it can be a program name with args.
5133 set dummy $ac_prog; ac_word=$2
5134 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5135 $as_echo_n "checking for $ac_word... " >&6; }
5136 if ${ac_cv_path_PRINTF+:} false; then :
5137   $as_echo_n "(cached) " >&6
5138 else
5139   case $PRINTF in
5140   [\\/]* | ?:[\\/]*)
5141   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
5142   ;;
5143   *)
5144   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5145 for as_dir in $PATH
5146 do
5147   IFS=$as_save_IFS
5148   test -z "$as_dir" && as_dir=.
5149     for ac_exec_ext in '' $ac_executable_extensions; do
5150   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5151     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
5152     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5153     break 2
5154   fi
5155 done
5156   done
5157 IFS=$as_save_IFS
5158 
5159   ;;
5160 esac
5161 fi
5162 PRINTF=$ac_cv_path_PRINTF
5163 if test -n "$PRINTF"; then
5164   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
5165 $as_echo "$PRINTF" >&6; }
5166 else
5167   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5168 $as_echo "no" >&6; }
5169 fi
5170 
5171 
5172   test -n "$PRINTF" && break
5173 done
5174 
5175 
5176     if test "x$PRINTF" = x; then
5177         if test "xprintf" = x; then
5178           PROG_NAME=printf
5179         else
5180           PROG_NAME=printf
5181         fi
5182         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5183 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5184         as_fn_error $? "Cannot continue" "$LINENO" 5
5185     fi
5186 
5187 
5188 
5189     for ac_prog in rm
5190 do
5191   # Extract the first word of "$ac_prog", so it can be a program name with args.
5192 set dummy $ac_prog; ac_word=$2
5193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5194 $as_echo_n "checking for $ac_word... " >&6; }
5195 if ${ac_cv_path_RM+:} false; then :
5196   $as_echo_n "(cached) " >&6
5197 else
5198   case $RM in
5199   [\\/]* | ?:[\\/]*)
5200   ac_cv_path_RM="$RM" # Let the user override the test with a path.
5201   ;;
5202   *)
5203   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5204 for as_dir in $PATH
5205 do
5206   IFS=$as_save_IFS
5207   test -z "$as_dir" && as_dir=.
5208     for ac_exec_ext in '' $ac_executable_extensions; do
5209   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5210     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
5211     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5212     break 2
5213   fi
5214 done
5215   done
5216 IFS=$as_save_IFS
5217 
5218   ;;
5219 esac
5220 fi
5221 RM=$ac_cv_path_RM
5222 if test -n "$RM"; then
5223   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
5224 $as_echo "$RM" >&6; }
5225 else
5226   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5227 $as_echo "no" >&6; }
5228 fi
5229 
5230 
5231   test -n "$RM" && break
5232 done
5233 
5234 
5235     if test "x$RM" = x; then
5236         if test "xrm" = x; then
5237           PROG_NAME=rm
5238         else
5239           PROG_NAME=rm
5240         fi
5241         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5242 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5243         as_fn_error $? "Cannot continue" "$LINENO" 5
5244     fi
5245 
5246 
5247 
5248     for ac_prog in sh
5249 do
5250   # Extract the first word of "$ac_prog", so it can be a program name with args.
5251 set dummy $ac_prog; ac_word=$2
5252 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5253 $as_echo_n "checking for $ac_word... " >&6; }
5254 if ${ac_cv_path_SH+:} false; then :
5255   $as_echo_n "(cached) " >&6
5256 else
5257   case $SH in
5258   [\\/]* | ?:[\\/]*)
5259   ac_cv_path_SH="$SH" # Let the user override the test with a path.
5260   ;;
5261   *)
5262   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5263 for as_dir in $PATH
5264 do
5265   IFS=$as_save_IFS
5266   test -z "$as_dir" && as_dir=.
5267     for ac_exec_ext in '' $ac_executable_extensions; do
5268   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5269     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5270     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5271     break 2
5272   fi
5273 done
5274   done
5275 IFS=$as_save_IFS
5276 
5277   ;;
5278 esac
5279 fi
5280 SH=$ac_cv_path_SH
5281 if test -n "$SH"; then
5282   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5283 $as_echo "$SH" >&6; }
5284 else
5285   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5286 $as_echo "no" >&6; }
5287 fi
5288 
5289 
5290   test -n "$SH" && break
5291 done
5292 
5293 
5294     if test "x$SH" = x; then
5295         if test "xsh" = x; then
5296           PROG_NAME=sh
5297         else
5298           PROG_NAME=sh
5299         fi
5300         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5301 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5302         as_fn_error $? "Cannot continue" "$LINENO" 5
5303     fi
5304 
5305 
5306 
5307     for ac_prog in sort
5308 do
5309   # Extract the first word of "$ac_prog", so it can be a program name with args.
5310 set dummy $ac_prog; ac_word=$2
5311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5312 $as_echo_n "checking for $ac_word... " >&6; }
5313 if ${ac_cv_path_SORT+:} false; then :
5314   $as_echo_n "(cached) " >&6
5315 else
5316   case $SORT in
5317   [\\/]* | ?:[\\/]*)
5318   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
5319   ;;
5320   *)
5321   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5322 for as_dir in $PATH
5323 do
5324   IFS=$as_save_IFS
5325   test -z "$as_dir" && as_dir=.
5326     for ac_exec_ext in '' $ac_executable_extensions; do
5327   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5328     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
5329     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5330     break 2
5331   fi
5332 done
5333   done
5334 IFS=$as_save_IFS
5335 
5336   ;;
5337 esac
5338 fi
5339 SORT=$ac_cv_path_SORT
5340 if test -n "$SORT"; then
5341   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5342 $as_echo "$SORT" >&6; }
5343 else
5344   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5345 $as_echo "no" >&6; }
5346 fi
5347 
5348 
5349   test -n "$SORT" && break
5350 done
5351 
5352 
5353     if test "x$SORT" = x; then
5354         if test "xsort" = x; then
5355           PROG_NAME=sort
5356         else
5357           PROG_NAME=sort
5358         fi
5359         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5360 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5361         as_fn_error $? "Cannot continue" "$LINENO" 5
5362     fi
5363 
5364 
5365 
5366     for ac_prog in tail
5367 do
5368   # Extract the first word of "$ac_prog", so it can be a program name with args.
5369 set dummy $ac_prog; ac_word=$2
5370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5371 $as_echo_n "checking for $ac_word... " >&6; }
5372 if ${ac_cv_path_TAIL+:} false; then :
5373   $as_echo_n "(cached) " >&6
5374 else
5375   case $TAIL in
5376   [\\/]* | ?:[\\/]*)
5377   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5378   ;;
5379   *)
5380   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5381 for as_dir in $PATH
5382 do
5383   IFS=$as_save_IFS
5384   test -z "$as_dir" && as_dir=.
5385     for ac_exec_ext in '' $ac_executable_extensions; do
5386   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5387     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5388     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5389     break 2
5390   fi
5391 done
5392   done
5393 IFS=$as_save_IFS
5394 
5395   ;;
5396 esac
5397 fi
5398 TAIL=$ac_cv_path_TAIL
5399 if test -n "$TAIL"; then
5400   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5401 $as_echo "$TAIL" >&6; }
5402 else
5403   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5404 $as_echo "no" >&6; }
5405 fi
5406 
5407 
5408   test -n "$TAIL" && break
5409 done
5410 
5411 
5412     if test "x$TAIL" = x; then
5413         if test "xtail" = x; then
5414           PROG_NAME=tail
5415         else
5416           PROG_NAME=tail
5417         fi
5418         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5419 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5420         as_fn_error $? "Cannot continue" "$LINENO" 5
5421     fi
5422 
5423 
5424 
5425     for ac_prog in tar
5426 do
5427   # Extract the first word of "$ac_prog", so it can be a program name with args.
5428 set dummy $ac_prog; ac_word=$2
5429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5430 $as_echo_n "checking for $ac_word... " >&6; }
5431 if ${ac_cv_path_TAR+:} false; then :
5432   $as_echo_n "(cached) " >&6
5433 else
5434   case $TAR in
5435   [\\/]* | ?:[\\/]*)
5436   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5437   ;;
5438   *)
5439   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5440 for as_dir in $PATH
5441 do
5442   IFS=$as_save_IFS
5443   test -z "$as_dir" && as_dir=.
5444     for ac_exec_ext in '' $ac_executable_extensions; do
5445   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5446     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5447     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5448     break 2
5449   fi
5450 done
5451   done
5452 IFS=$as_save_IFS
5453 
5454   ;;
5455 esac
5456 fi
5457 TAR=$ac_cv_path_TAR
5458 if test -n "$TAR"; then
5459   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5460 $as_echo "$TAR" >&6; }
5461 else
5462   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5463 $as_echo "no" >&6; }
5464 fi
5465 
5466 
5467   test -n "$TAR" && break
5468 done
5469 
5470 
5471     if test "x$TAR" = x; then
5472         if test "xtar" = x; then
5473           PROG_NAME=tar
5474         else
5475           PROG_NAME=tar
5476         fi
5477         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5478 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5479         as_fn_error $? "Cannot continue" "$LINENO" 5
5480     fi
5481 
5482 
5483 
5484     for ac_prog in tee
5485 do
5486   # Extract the first word of "$ac_prog", so it can be a program name with args.
5487 set dummy $ac_prog; ac_word=$2
5488 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5489 $as_echo_n "checking for $ac_word... " >&6; }
5490 if ${ac_cv_path_TEE+:} false; then :
5491   $as_echo_n "(cached) " >&6
5492 else
5493   case $TEE in
5494   [\\/]* | ?:[\\/]*)
5495   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5496   ;;
5497   *)
5498   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5499 for as_dir in $PATH
5500 do
5501   IFS=$as_save_IFS
5502   test -z "$as_dir" && as_dir=.
5503     for ac_exec_ext in '' $ac_executable_extensions; do
5504   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5505     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5506     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5507     break 2
5508   fi
5509 done
5510   done
5511 IFS=$as_save_IFS
5512 
5513   ;;
5514 esac
5515 fi
5516 TEE=$ac_cv_path_TEE
5517 if test -n "$TEE"; then
5518   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5519 $as_echo "$TEE" >&6; }
5520 else
5521   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5522 $as_echo "no" >&6; }
5523 fi
5524 
5525 
5526   test -n "$TEE" && break
5527 done
5528 
5529 
5530     if test "x$TEE" = x; then
5531         if test "xtee" = x; then
5532           PROG_NAME=tee
5533         else
5534           PROG_NAME=tee
5535         fi
5536         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5537 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5538         as_fn_error $? "Cannot continue" "$LINENO" 5
5539     fi
5540 
5541 
5542 
5543     for ac_prog in touch
5544 do
5545   # Extract the first word of "$ac_prog", so it can be a program name with args.
5546 set dummy $ac_prog; ac_word=$2
5547 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5548 $as_echo_n "checking for $ac_word... " >&6; }
5549 if ${ac_cv_path_TOUCH+:} false; then :
5550   $as_echo_n "(cached) " >&6
5551 else
5552   case $TOUCH in
5553   [\\/]* | ?:[\\/]*)
5554   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5555   ;;
5556   *)
5557   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5558 for as_dir in $PATH
5559 do
5560   IFS=$as_save_IFS
5561   test -z "$as_dir" && as_dir=.
5562     for ac_exec_ext in '' $ac_executable_extensions; do
5563   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5564     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5565     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5566     break 2
5567   fi
5568 done
5569   done
5570 IFS=$as_save_IFS
5571 
5572   ;;
5573 esac
5574 fi
5575 TOUCH=$ac_cv_path_TOUCH
5576 if test -n "$TOUCH"; then
5577   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5578 $as_echo "$TOUCH" >&6; }
5579 else
5580   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5581 $as_echo "no" >&6; }
5582 fi
5583 
5584 
5585   test -n "$TOUCH" && break
5586 done
5587 
5588 
5589     if test "x$TOUCH" = x; then
5590         if test "xtouch" = x; then
5591           PROG_NAME=touch
5592         else
5593           PROG_NAME=touch
5594         fi
5595         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5596 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5597         as_fn_error $? "Cannot continue" "$LINENO" 5
5598     fi
5599 
5600 
5601 
5602     for ac_prog in tr
5603 do
5604   # Extract the first word of "$ac_prog", so it can be a program name with args.
5605 set dummy $ac_prog; ac_word=$2
5606 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5607 $as_echo_n "checking for $ac_word... " >&6; }
5608 if ${ac_cv_path_TR+:} false; then :
5609   $as_echo_n "(cached) " >&6
5610 else
5611   case $TR in
5612   [\\/]* | ?:[\\/]*)
5613   ac_cv_path_TR="$TR" # Let the user override the test with a path.
5614   ;;
5615   *)
5616   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5617 for as_dir in $PATH
5618 do
5619   IFS=$as_save_IFS
5620   test -z "$as_dir" && as_dir=.
5621     for ac_exec_ext in '' $ac_executable_extensions; do
5622   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5623     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5624     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5625     break 2
5626   fi
5627 done
5628   done
5629 IFS=$as_save_IFS
5630 
5631   ;;
5632 esac
5633 fi
5634 TR=$ac_cv_path_TR
5635 if test -n "$TR"; then
5636   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5637 $as_echo "$TR" >&6; }
5638 else
5639   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5640 $as_echo "no" >&6; }
5641 fi
5642 
5643 
5644   test -n "$TR" && break
5645 done
5646 
5647 
5648     if test "x$TR" = x; then
5649         if test "xtr" = x; then
5650           PROG_NAME=tr
5651         else
5652           PROG_NAME=tr
5653         fi
5654         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5655 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5656         as_fn_error $? "Cannot continue" "$LINENO" 5
5657     fi
5658 
5659 
5660 
5661     for ac_prog in uname
5662 do
5663   # Extract the first word of "$ac_prog", so it can be a program name with args.
5664 set dummy $ac_prog; ac_word=$2
5665 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5666 $as_echo_n "checking for $ac_word... " >&6; }
5667 if ${ac_cv_path_UNAME+:} false; then :
5668   $as_echo_n "(cached) " >&6
5669 else
5670   case $UNAME in
5671   [\\/]* | ?:[\\/]*)
5672   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
5673   ;;
5674   *)
5675   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5676 for as_dir in $PATH
5677 do
5678   IFS=$as_save_IFS
5679   test -z "$as_dir" && as_dir=.
5680     for ac_exec_ext in '' $ac_executable_extensions; do
5681   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5682     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
5683     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5684     break 2
5685   fi
5686 done
5687   done
5688 IFS=$as_save_IFS
5689 
5690   ;;
5691 esac
5692 fi
5693 UNAME=$ac_cv_path_UNAME
5694 if test -n "$UNAME"; then
5695   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
5696 $as_echo "$UNAME" >&6; }
5697 else
5698   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5699 $as_echo "no" >&6; }
5700 fi
5701 
5702 
5703   test -n "$UNAME" && break
5704 done
5705 
5706 
5707     if test "x$UNAME" = x; then
5708         if test "xuname" = x; then
5709           PROG_NAME=uname
5710         else
5711           PROG_NAME=uname
5712         fi
5713         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5714 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5715         as_fn_error $? "Cannot continue" "$LINENO" 5
5716     fi
5717 
5718 
5719 
5720     for ac_prog in uniq
5721 do
5722   # Extract the first word of "$ac_prog", so it can be a program name with args.
5723 set dummy $ac_prog; ac_word=$2
5724 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5725 $as_echo_n "checking for $ac_word... " >&6; }
5726 if ${ac_cv_path_UNIQ+:} false; then :
5727   $as_echo_n "(cached) " >&6
5728 else
5729   case $UNIQ in
5730   [\\/]* | ?:[\\/]*)
5731   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5732   ;;
5733   *)
5734   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5735 for as_dir in $PATH
5736 do
5737   IFS=$as_save_IFS
5738   test -z "$as_dir" && as_dir=.
5739     for ac_exec_ext in '' $ac_executable_extensions; do
5740   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5741     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5742     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5743     break 2
5744   fi
5745 done
5746   done
5747 IFS=$as_save_IFS
5748 
5749   ;;
5750 esac
5751 fi
5752 UNIQ=$ac_cv_path_UNIQ
5753 if test -n "$UNIQ"; then
5754   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
5755 $as_echo "$UNIQ" >&6; }
5756 else
5757   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5758 $as_echo "no" >&6; }
5759 fi
5760 
5761 
5762   test -n "$UNIQ" && break
5763 done
5764 
5765 
5766     if test "x$UNIQ" = x; then
5767         if test "xuniq" = x; then
5768           PROG_NAME=uniq
5769         else
5770           PROG_NAME=uniq
5771         fi
5772         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5773 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5774         as_fn_error $? "Cannot continue" "$LINENO" 5
5775     fi
5776 
5777 
5778 
5779     for ac_prog in wc
5780 do
5781   # Extract the first word of "$ac_prog", so it can be a program name with args.
5782 set dummy $ac_prog; ac_word=$2
5783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5784 $as_echo_n "checking for $ac_word... " >&6; }
5785 if ${ac_cv_path_WC+:} false; then :
5786   $as_echo_n "(cached) " >&6
5787 else
5788   case $WC in
5789   [\\/]* | ?:[\\/]*)
5790   ac_cv_path_WC="$WC" # Let the user override the test with a path.
5791   ;;
5792   *)
5793   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5794 for as_dir in $PATH
5795 do
5796   IFS=$as_save_IFS
5797   test -z "$as_dir" && as_dir=.
5798     for ac_exec_ext in '' $ac_executable_extensions; do
5799   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5800     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5801     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5802     break 2
5803   fi
5804 done
5805   done
5806 IFS=$as_save_IFS
5807 
5808   ;;
5809 esac
5810 fi
5811 WC=$ac_cv_path_WC
5812 if test -n "$WC"; then
5813   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
5814 $as_echo "$WC" >&6; }
5815 else
5816   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5817 $as_echo "no" >&6; }
5818 fi
5819 
5820 
5821   test -n "$WC" && break
5822 done
5823 
5824 
5825     if test "x$WC" = x; then
5826         if test "xwc" = x; then
5827           PROG_NAME=wc
5828         else
5829           PROG_NAME=wc
5830         fi
5831         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5832 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5833         as_fn_error $? "Cannot continue" "$LINENO" 5
5834     fi
5835 
5836 
5837 
5838     for ac_prog in which
5839 do
5840   # Extract the first word of "$ac_prog", so it can be a program name with args.
5841 set dummy $ac_prog; ac_word=$2
5842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5843 $as_echo_n "checking for $ac_word... " >&6; }
5844 if ${ac_cv_path_WHICH+:} false; then :
5845   $as_echo_n "(cached) " >&6
5846 else
5847   case $WHICH in
5848   [\\/]* | ?:[\\/]*)
5849   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5850   ;;
5851   *)
5852   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5853 for as_dir in $PATH
5854 do
5855   IFS=$as_save_IFS
5856   test -z "$as_dir" && as_dir=.
5857     for ac_exec_ext in '' $ac_executable_extensions; do
5858   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5859     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5860     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5861     break 2
5862   fi
5863 done
5864   done
5865 IFS=$as_save_IFS
5866 
5867   ;;
5868 esac
5869 fi
5870 WHICH=$ac_cv_path_WHICH
5871 if test -n "$WHICH"; then
5872   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
5873 $as_echo "$WHICH" >&6; }
5874 else
5875   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5876 $as_echo "no" >&6; }
5877 fi
5878 
5879 
5880   test -n "$WHICH" && break
5881 done
5882 
5883 
5884     if test "x$WHICH" = x; then
5885         if test "xwhich" = x; then
5886           PROG_NAME=which
5887         else
5888           PROG_NAME=which
5889         fi
5890         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5891 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5892         as_fn_error $? "Cannot continue" "$LINENO" 5
5893     fi
5894 
5895 
5896 
5897     for ac_prog in xargs
5898 do
5899   # Extract the first word of "$ac_prog", so it can be a program name with args.
5900 set dummy $ac_prog; ac_word=$2
5901 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5902 $as_echo_n "checking for $ac_word... " >&6; }
5903 if ${ac_cv_path_XARGS+:} false; then :
5904   $as_echo_n "(cached) " >&6
5905 else
5906   case $XARGS in
5907   [\\/]* | ?:[\\/]*)
5908   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5909   ;;
5910   *)
5911   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5912 for as_dir in $PATH
5913 do
5914   IFS=$as_save_IFS
5915   test -z "$as_dir" && as_dir=.
5916     for ac_exec_ext in '' $ac_executable_extensions; do
5917   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5918     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
5919     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5920     break 2
5921   fi
5922 done
5923   done
5924 IFS=$as_save_IFS
5925 
5926   ;;
5927 esac
5928 fi
5929 XARGS=$ac_cv_path_XARGS
5930 if test -n "$XARGS"; then
5931   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
5932 $as_echo "$XARGS" >&6; }
5933 else
5934   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5935 $as_echo "no" >&6; }
5936 fi
5937 
5938 
5939   test -n "$XARGS" && break
5940 done
5941 
5942 
5943     if test "x$XARGS" = x; then
5944         if test "xxargs" = x; then
5945           PROG_NAME=xargs
5946         else
5947           PROG_NAME=xargs
5948         fi
5949         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5950 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5951         as_fn_error $? "Cannot continue" "$LINENO" 5
5952     fi
5953 
5954 
5955 
5956 # Then required tools that require some special treatment.
5957 for ac_prog in gawk mawk nawk awk
5958 do
5959   # Extract the first word of "$ac_prog", so it can be a program name with args.
5960 set dummy $ac_prog; ac_word=$2
5961 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5962 $as_echo_n "checking for $ac_word... " >&6; }
5963 if ${ac_cv_prog_AWK+:} false; then :
5964   $as_echo_n "(cached) " >&6
5965 else
5966   if test -n "$AWK"; then
5967   ac_cv_prog_AWK="$AWK" # Let the user override the test.
5968 else
5969 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5970 for as_dir in $PATH
5971 do
5972   IFS=$as_save_IFS
5973   test -z "$as_dir" && as_dir=.
5974     for ac_exec_ext in '' $ac_executable_extensions; do
5975   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5976     ac_cv_prog_AWK="$ac_prog"
5977     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5978     break 2
5979   fi
5980 done
5981   done
5982 IFS=$as_save_IFS
5983 
5984 fi
5985 fi
5986 AWK=$ac_cv_prog_AWK
5987 if test -n "$AWK"; then
5988   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5989 $as_echo "$AWK" >&6; }
5990 else
5991   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5992 $as_echo "no" >&6; }
5993 fi
5994 
5995 
5996   test -n "$AWK" && break
5997 done
5998 
5999 
6000     if test "x$AWK" = x; then
6001         if test "x" = x; then
6002           PROG_NAME=awk
6003         else
6004           PROG_NAME=
6005         fi
6006         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6007 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6008         as_fn_error $? "Cannot continue" "$LINENO" 5
6009     fi
6010 
6011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6012 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6013 if ${ac_cv_path_GREP+:} false; then :
6014   $as_echo_n "(cached) " >&6
6015 else
6016   if test -z "$GREP"; then
6017   ac_path_GREP_found=false
6018   # Loop through the user's path and test for each of PROGNAME-LIST
6019   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6020 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6021 do
6022   IFS=$as_save_IFS
6023   test -z "$as_dir" && as_dir=.
6024     for ac_prog in grep ggrep; do
6025     for ac_exec_ext in '' $ac_executable_extensions; do
6026       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6027       { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
6028 # Check for GNU ac_path_GREP and select it if it is found.
6029   # Check for GNU $ac_path_GREP
6030 case `"$ac_path_GREP" --version 2>&1` in
6031 *GNU*)
6032   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6033 *)
6034   ac_count=0
6035   $as_echo_n 0123456789 >"conftest.in"
6036   while :
6037   do
6038     cat "conftest.in" "conftest.in" >"conftest.tmp"
6039     mv "conftest.tmp" "conftest.in"
6040     cp "conftest.in" "conftest.nl"
6041     $as_echo 'GREP' >> "conftest.nl"
6042     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6043     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6044     as_fn_arith $ac_count + 1 && ac_count=$as_val
6045     if test $ac_count -gt ${ac_path_GREP_max-0}; then
6046       # Best one so far, save it but keep looking for a better one
6047       ac_cv_path_GREP="$ac_path_GREP"
6048       ac_path_GREP_max=$ac_count
6049     fi
6050     # 10*(2^10) chars as input seems more than enough
6051     test $ac_count -gt 10 && break
6052   done
6053   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6054 esac
6055 
6056       $ac_path_GREP_found && break 3
6057     done
6058   done
6059   done
6060 IFS=$as_save_IFS
6061   if test -z "$ac_cv_path_GREP"; then
6062     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6063   fi
6064 else
6065   ac_cv_path_GREP=$GREP
6066 fi
6067 
6068 fi
6069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6070 $as_echo "$ac_cv_path_GREP" >&6; }
6071  GREP="$ac_cv_path_GREP"
6072 
6073 
6074 
6075     if test "x$GREP" = x; then
6076         if test "x" = x; then
6077           PROG_NAME=grep
6078         else
6079           PROG_NAME=
6080         fi
6081         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6082 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6083         as_fn_error $? "Cannot continue" "$LINENO" 5
6084     fi
6085 
6086 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6087 $as_echo_n "checking for egrep... " >&6; }
6088 if ${ac_cv_path_EGREP+:} false; then :
6089   $as_echo_n "(cached) " >&6
6090 else
6091   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6092    then ac_cv_path_EGREP="$GREP -E"
6093    else
6094      if test -z "$EGREP"; then
6095   ac_path_EGREP_found=false
6096   # Loop through the user's path and test for each of PROGNAME-LIST
6097   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6098 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6099 do
6100   IFS=$as_save_IFS
6101   test -z "$as_dir" && as_dir=.
6102     for ac_prog in egrep; do
6103     for ac_exec_ext in '' $ac_executable_extensions; do
6104       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6105       { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
6106 # Check for GNU ac_path_EGREP and select it if it is found.
6107   # Check for GNU $ac_path_EGREP
6108 case `"$ac_path_EGREP" --version 2>&1` in
6109 *GNU*)
6110   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6111 *)
6112   ac_count=0
6113   $as_echo_n 0123456789 >"conftest.in"
6114   while :
6115   do
6116     cat "conftest.in" "conftest.in" >"conftest.tmp"
6117     mv "conftest.tmp" "conftest.in"
6118     cp "conftest.in" "conftest.nl"
6119     $as_echo 'EGREP' >> "conftest.nl"
6120     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6121     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6122     as_fn_arith $ac_count + 1 && ac_count=$as_val
6123     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6124       # Best one so far, save it but keep looking for a better one
6125       ac_cv_path_EGREP="$ac_path_EGREP"
6126       ac_path_EGREP_max=$ac_count
6127     fi
6128     # 10*(2^10) chars as input seems more than enough
6129     test $ac_count -gt 10 && break
6130   done
6131   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6132 esac
6133 
6134       $ac_path_EGREP_found && break 3
6135     done
6136   done
6137   done
6138 IFS=$as_save_IFS
6139   if test -z "$ac_cv_path_EGREP"; then
6140     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6141   fi
6142 else
6143   ac_cv_path_EGREP=$EGREP
6144 fi
6145 
6146    fi
6147 fi
6148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6149 $as_echo "$ac_cv_path_EGREP" >&6; }
6150  EGREP="$ac_cv_path_EGREP"
6151 
6152 
6153 
6154     if test "x$EGREP" = x; then
6155         if test "x" = x; then
6156           PROG_NAME=egrep
6157         else
6158           PROG_NAME=
6159         fi
6160         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6161 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6162         as_fn_error $? "Cannot continue" "$LINENO" 5
6163     fi
6164 
6165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
6166 $as_echo_n "checking for fgrep... " >&6; }
6167 if ${ac_cv_path_FGREP+:} false; then :
6168   $as_echo_n "(cached) " >&6
6169 else
6170   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
6171    then ac_cv_path_FGREP="$GREP -F"
6172    else
6173      if test -z "$FGREP"; then
6174   ac_path_FGREP_found=false
6175   # Loop through the user's path and test for each of PROGNAME-LIST
6176   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6177 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6178 do
6179   IFS=$as_save_IFS
6180   test -z "$as_dir" && as_dir=.
6181     for ac_prog in fgrep; do
6182     for ac_exec_ext in '' $ac_executable_extensions; do
6183       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6184       { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
6185 # Check for GNU ac_path_FGREP and select it if it is found.
6186   # Check for GNU $ac_path_FGREP
6187 case `"$ac_path_FGREP" --version 2>&1` in
6188 *GNU*)
6189   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6190 *)
6191   ac_count=0
6192   $as_echo_n 0123456789 >"conftest.in"
6193   while :
6194   do
6195     cat "conftest.in" "conftest.in" >"conftest.tmp"
6196     mv "conftest.tmp" "conftest.in"
6197     cp "conftest.in" "conftest.nl"
6198     $as_echo 'FGREP' >> "conftest.nl"
6199     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6200     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6201     as_fn_arith $ac_count + 1 && ac_count=$as_val
6202     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6203       # Best one so far, save it but keep looking for a better one
6204       ac_cv_path_FGREP="$ac_path_FGREP"
6205       ac_path_FGREP_max=$ac_count
6206     fi
6207     # 10*(2^10) chars as input seems more than enough
6208     test $ac_count -gt 10 && break
6209   done
6210   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6211 esac
6212 
6213       $ac_path_FGREP_found && break 3
6214     done
6215   done
6216   done
6217 IFS=$as_save_IFS
6218   if test -z "$ac_cv_path_FGREP"; then
6219     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6220   fi
6221 else
6222   ac_cv_path_FGREP=$FGREP
6223 fi
6224 
6225    fi
6226 fi
6227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6228 $as_echo "$ac_cv_path_FGREP" >&6; }
6229  FGREP="$ac_cv_path_FGREP"
6230 
6231 
6232 
6233     if test "x$FGREP" = x; then
6234         if test "x" = x; then
6235           PROG_NAME=fgrep
6236         else
6237           PROG_NAME=
6238         fi
6239         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6240 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6241         as_fn_error $? "Cannot continue" "$LINENO" 5
6242     fi
6243 
6244 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6245 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
6246 if ${ac_cv_path_SED+:} false; then :
6247   $as_echo_n "(cached) " >&6
6248 else
6249             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6250      for ac_i in 1 2 3 4 5 6 7; do
6251        ac_script="$ac_script$as_nl$ac_script"
6252      done
6253      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6254      { ac_script=; unset ac_script;}
6255      if test -z "$SED"; then
6256   ac_path_SED_found=false
6257   # Loop through the user's path and test for each of PROGNAME-LIST
6258   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6259 for as_dir in $PATH
6260 do
6261   IFS=$as_save_IFS
6262   test -z "$as_dir" && as_dir=.
6263     for ac_prog in sed gsed; do
6264     for ac_exec_ext in '' $ac_executable_extensions; do
6265       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6266       { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
6267 # Check for GNU ac_path_SED and select it if it is found.
6268   # Check for GNU $ac_path_SED
6269 case `"$ac_path_SED" --version 2>&1` in
6270 *GNU*)
6271   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6272 *)
6273   ac_count=0
6274   $as_echo_n 0123456789 >"conftest.in"
6275   while :
6276   do
6277     cat "conftest.in" "conftest.in" >"conftest.tmp"
6278     mv "conftest.tmp" "conftest.in"
6279     cp "conftest.in" "conftest.nl"
6280     $as_echo '' >> "conftest.nl"
6281     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6282     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6283     as_fn_arith $ac_count + 1 && ac_count=$as_val
6284     if test $ac_count -gt ${ac_path_SED_max-0}; then
6285       # Best one so far, save it but keep looking for a better one
6286       ac_cv_path_SED="$ac_path_SED"
6287       ac_path_SED_max=$ac_count
6288     fi
6289     # 10*(2^10) chars as input seems more than enough
6290     test $ac_count -gt 10 && break
6291   done
6292   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6293 esac
6294 
6295       $ac_path_SED_found && break 3
6296     done
6297   done
6298   done
6299 IFS=$as_save_IFS
6300   if test -z "$ac_cv_path_SED"; then
6301     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6302   fi
6303 else
6304   ac_cv_path_SED=$SED
6305 fi
6306 
6307 fi
6308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6309 $as_echo "$ac_cv_path_SED" >&6; }
6310  SED="$ac_cv_path_SED"
6311   rm -f conftest.sed
6312 
6313 
6314     if test "x$SED" = x; then
6315         if test "x" = x; then
6316           PROG_NAME=sed
6317         else
6318           PROG_NAME=
6319         fi
6320         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6321 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6322         as_fn_error $? "Cannot continue" "$LINENO" 5
6323     fi
6324 
6325 
6326 for ac_prog in nawk gawk awk
6327 do
6328   # Extract the first word of "$ac_prog", so it can be a program name with args.
6329 set dummy $ac_prog; ac_word=$2
6330 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6331 $as_echo_n "checking for $ac_word... " >&6; }
6332 if ${ac_cv_path_NAWK+:} false; then :
6333   $as_echo_n "(cached) " >&6
6334 else
6335   case $NAWK in
6336   [\\/]* | ?:[\\/]*)
6337   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
6338   ;;
6339   *)
6340   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6341 for as_dir in $PATH
6342 do
6343   IFS=$as_save_IFS
6344   test -z "$as_dir" && as_dir=.
6345     for ac_exec_ext in '' $ac_executable_extensions; do
6346   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6347     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
6348     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6349     break 2
6350   fi
6351 done
6352   done
6353 IFS=$as_save_IFS
6354 
6355   ;;
6356 esac
6357 fi
6358 NAWK=$ac_cv_path_NAWK
6359 if test -n "$NAWK"; then
6360   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6361 $as_echo "$NAWK" >&6; }
6362 else
6363   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6364 $as_echo "no" >&6; }
6365 fi
6366 
6367 
6368   test -n "$NAWK" && break
6369 done
6370 
6371 
6372     if test "x$NAWK" = x; then
6373         if test "x" = x; then
6374           PROG_NAME=nawk
6375         else
6376           PROG_NAME=
6377         fi
6378         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6379 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6380         as_fn_error $? "Cannot continue" "$LINENO" 5
6381     fi
6382 
6383 
6384 # Always force rm.
6385 RM="$RM -f"
6386 
6387 # pwd behaves differently on various platforms and some don't support the -L flag.
6388 # Always use the bash builtin pwd to get uniform behavior.
6389 THEPWDCMD=pwd
6390 
6391 # These are not required on all platforms
6392 # Extract the first word of "cygpath", so it can be a program name with args.
6393 set dummy cygpath; ac_word=$2
6394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6395 $as_echo_n "checking for $ac_word... " >&6; }
6396 if ${ac_cv_path_CYGPATH+:} false; then :
6397   $as_echo_n "(cached) " >&6
6398 else
6399   case $CYGPATH in
6400   [\\/]* | ?:[\\/]*)
6401   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
6402   ;;
6403   *)
6404   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6405 for as_dir in $PATH
6406 do
6407   IFS=$as_save_IFS
6408   test -z "$as_dir" && as_dir=.
6409     for ac_exec_ext in '' $ac_executable_extensions; do
6410   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6411     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
6412     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6413     break 2
6414   fi
6415 done
6416   done
6417 IFS=$as_save_IFS
6418 
6419   ;;
6420 esac
6421 fi
6422 CYGPATH=$ac_cv_path_CYGPATH
6423 if test -n "$CYGPATH"; then
6424   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
6425 $as_echo "$CYGPATH" >&6; }
6426 else
6427   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6428 $as_echo "no" >&6; }
6429 fi
6430 
6431 
6432 # Extract the first word of "readlink", so it can be a program name with args.
6433 set dummy readlink; ac_word=$2
6434 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6435 $as_echo_n "checking for $ac_word... " >&6; }
6436 if ${ac_cv_path_READLINK+:} false; then :
6437   $as_echo_n "(cached) " >&6
6438 else
6439   case $READLINK in
6440   [\\/]* | ?:[\\/]*)
6441   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
6442   ;;
6443   *)
6444   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6445 for as_dir in $PATH
6446 do
6447   IFS=$as_save_IFS
6448   test -z "$as_dir" && as_dir=.
6449     for ac_exec_ext in '' $ac_executable_extensions; do
6450   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6451     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
6452     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6453     break 2
6454   fi
6455 done
6456   done
6457 IFS=$as_save_IFS
6458 
6459   ;;
6460 esac
6461 fi
6462 READLINK=$ac_cv_path_READLINK
6463 if test -n "$READLINK"; then
6464   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
6465 $as_echo "$READLINK" >&6; }
6466 else
6467   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6468 $as_echo "no" >&6; }
6469 fi
6470 
6471 
6472 # Extract the first word of "df", so it can be a program name with args.
6473 set dummy df; ac_word=$2
6474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6475 $as_echo_n "checking for $ac_word... " >&6; }
6476 if ${ac_cv_path_DF+:} false; then :
6477   $as_echo_n "(cached) " >&6
6478 else
6479   case $DF in
6480   [\\/]* | ?:[\\/]*)
6481   ac_cv_path_DF="$DF" # Let the user override the test with a path.
6482   ;;
6483   *)
6484   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6485 for as_dir in $PATH
6486 do
6487   IFS=$as_save_IFS
6488   test -z "$as_dir" && as_dir=.
6489     for ac_exec_ext in '' $ac_executable_extensions; do
6490   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6491     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
6492     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6493     break 2
6494   fi
6495 done
6496   done
6497 IFS=$as_save_IFS
6498 
6499   ;;
6500 esac
6501 fi
6502 DF=$ac_cv_path_DF
6503 if test -n "$DF"; then
6504   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
6505 $as_echo "$DF" >&6; }
6506 else
6507   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6508 $as_echo "no" >&6; }
6509 fi
6510 
6511 
6512 # Extract the first word of "SetFile", so it can be a program name with args.
6513 set dummy SetFile; ac_word=$2
6514 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6515 $as_echo_n "checking for $ac_word... " >&6; }
6516 if ${ac_cv_path_SETFILE+:} false; then :
6517   $as_echo_n "(cached) " >&6
6518 else
6519   case $SETFILE in
6520   [\\/]* | ?:[\\/]*)
6521   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
6522   ;;
6523   *)
6524   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6525 for as_dir in $PATH
6526 do
6527   IFS=$as_save_IFS
6528   test -z "$as_dir" && as_dir=.
6529     for ac_exec_ext in '' $ac_executable_extensions; do
6530   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6531     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
6532     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6533     break 2
6534   fi
6535 done
6536   done
6537 IFS=$as_save_IFS
6538 
6539   ;;
6540 esac
6541 fi
6542 SETFILE=$ac_cv_path_SETFILE
6543 if test -n "$SETFILE"; then
6544   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
6545 $as_echo "$SETFILE" >&6; }
6546 else
6547   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6548 $as_echo "no" >&6; }
6549 fi
6550 
6551 
6552 
6553 
6554 # Now we can determine OpenJDK build and target platforms. This is required to
6555 # have early on.
6556 # Make sure we can run config.sub.
6557 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6558   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6559 
6560 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6561 $as_echo_n "checking build system type... " >&6; }
6562 if ${ac_cv_build+:} false; then :
6563   $as_echo_n "(cached) " >&6
6564 else
6565   ac_build_alias=$build_alias
6566 test "x$ac_build_alias" = x &&
6567   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6568 test "x$ac_build_alias" = x &&
6569   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6570 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6571   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6572 
6573 fi
6574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6575 $as_echo "$ac_cv_build" >&6; }
6576 case $ac_cv_build in
6577 *-*-*) ;;
6578 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
6579 esac
6580 build=$ac_cv_build
6581 ac_save_IFS=$IFS; IFS='-'
6582 set x $ac_cv_build
6583 shift
6584 build_cpu=$1
6585 build_vendor=$2
6586 shift; shift
6587 # Remember, the first character of IFS is used to create $*,
6588 # except with old shells:
6589 build_os=$*
6590 IFS=$ac_save_IFS
6591 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6592 
6593 
6594 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6595 $as_echo_n "checking host system type... " >&6; }
6596 if ${ac_cv_host+:} false; then :
6597   $as_echo_n "(cached) " >&6
6598 else
6599   if test "x$host_alias" = x; then
6600   ac_cv_host=$ac_cv_build
6601 else
6602   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6603     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6604 fi
6605 
6606 fi
6607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6608 $as_echo "$ac_cv_host" >&6; }
6609 case $ac_cv_host in
6610 *-*-*) ;;
6611 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6612 esac
6613 host=$ac_cv_host
6614 ac_save_IFS=$IFS; IFS='-'
6615 set x $ac_cv_host
6616 shift
6617 host_cpu=$1
6618 host_vendor=$2
6619 shift; shift
6620 # Remember, the first character of IFS is used to create $*,
6621 # except with old shells:
6622 host_os=$*
6623 IFS=$ac_save_IFS
6624 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6625 
6626 
6627 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6628 $as_echo_n "checking target system type... " >&6; }
6629 if ${ac_cv_target+:} false; then :
6630   $as_echo_n "(cached) " >&6
6631 else
6632   if test "x$target_alias" = x; then
6633   ac_cv_target=$ac_cv_host
6634 else
6635   ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6636     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6637 fi
6638 
6639 fi
6640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6641 $as_echo "$ac_cv_target" >&6; }
6642 case $ac_cv_target in
6643 *-*-*) ;;
6644 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6645 esac
6646 target=$ac_cv_target
6647 ac_save_IFS=$IFS; IFS='-'
6648 set x $ac_cv_target
6649 shift
6650 target_cpu=$1
6651 target_vendor=$2
6652 shift; shift
6653 # Remember, the first character of IFS is used to create $*,
6654 # except with old shells:
6655 target_os=$*
6656 IFS=$ac_save_IFS
6657 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6658 
6659 
6660 # The aliases save the names the user supplied, while $host etc.
6661 # will get canonicalized.
6662 test -n "$target_alias" &&
6663   test "$program_prefix$program_suffix$program_transform_name" = \
6664     NONENONEs,x,x, &&
6665   program_prefix=${target_alias}-
6666 
6667 # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
6668 # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
6669 # product you're building. The target of this build is called "host". Since this is confusing to most people, we
6670 # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
6671 # to use the configure naming style.
6672 
6673 
6674 
6675 
6676 
6677     # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
6678     # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
6679     # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
6680     # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
6681     OPENJDK_TARGET_AUTOCONF_NAME="$host"
6682     OPENJDK_BUILD_AUTOCONF_NAME="$build"
6683 
6684 
6685 
6686     # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6687 
6688   case "$build_os" in
6689     *linux*)
6690       VAR_OS=linux
6691       VAR_OS_API=posix
6692       VAR_OS_ENV=linux
6693       ;;
6694     *solaris*)
6695       VAR_OS=solaris
6696       VAR_OS_API=posix
6697       VAR_OS_ENV=solaris
6698       ;;
6699     *darwin*)
6700       VAR_OS=macosx
6701       VAR_OS_API=posix
6702       VAR_OS_ENV=macosx
6703       ;;
6704     *bsd*)
6705       VAR_OS=bsd
6706       VAR_OS_API=posix
6707       VAR_OS_ENV=bsd
6708       ;;
6709     *cygwin*)
6710       VAR_OS=windows
6711       VAR_OS_API=winapi
6712       VAR_OS_ENV=windows.cygwin
6713       ;;
6714     *mingw*)
6715       VAR_OS=windows
6716       VAR_OS_API=winapi
6717       VAR_OS_ENV=windows.msys
6718       ;;
6719     *)
6720       as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
6721       ;;
6722   esac
6723 
6724 
6725   # First argument is the cpu name from the trip/quad
6726   case "$build_cpu" in
6727     x86_64)
6728       VAR_CPU=x86_64
6729       VAR_CPU_ARCH=x86
6730       VAR_CPU_BITS=64
6731       VAR_CPU_ENDIAN=little
6732       ;;
6733     i?86)
6734       VAR_CPU=x86
6735       VAR_CPU_ARCH=x86
6736       VAR_CPU_BITS=32
6737       VAR_CPU_ENDIAN=little
6738       ;;
6739     arm*)
6740       VAR_CPU=arm
6741       VAR_CPU_ARCH=arm
6742       VAR_CPU_BITS=32
6743       VAR_CPU_ENDIAN=little
6744       ;;
6745     powerpc)
6746       VAR_CPU=ppc
6747       VAR_CPU_ARCH=ppc
6748       VAR_CPU_BITS=32
6749       VAR_CPU_ENDIAN=big
6750        ;;
6751     powerpc64)
6752       VAR_CPU=ppc64
6753       VAR_CPU_ARCH=ppc
6754       VAR_CPU_BITS=64
6755       VAR_CPU_ENDIAN=big
6756        ;;
6757     sparc)
6758       VAR_CPU=sparc
6759       VAR_CPU_ARCH=sparc
6760       VAR_CPU_BITS=32
6761       VAR_CPU_ENDIAN=big
6762        ;;
6763     sparcv9)
6764       VAR_CPU=sparcv9
6765       VAR_CPU_ARCH=sparc
6766       VAR_CPU_BITS=64
6767       VAR_CPU_ENDIAN=big
6768        ;;
6769     *)
6770       as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
6771       ;;
6772   esac
6773 
6774     # ..and setup our own variables. (Do this explicitely to facilitate searching)
6775     OPENJDK_BUILD_OS="$VAR_OS"
6776     OPENJDK_BUILD_OS_API="$VAR_OS_API"
6777     OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6778     OPENJDK_BUILD_CPU="$VAR_CPU"
6779     OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6780     OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6781     OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6782 
6783 
6784 
6785 
6786 
6787 
6788 
6789     { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
6790 $as_echo_n "checking openjdk-build os-cpu... " >&6; }
6791     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6792 $as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6793 
6794     # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6795 
6796   case "$host_os" in
6797     *linux*)
6798       VAR_OS=linux
6799       VAR_OS_API=posix
6800       VAR_OS_ENV=linux
6801       ;;
6802     *solaris*)
6803       VAR_OS=solaris
6804       VAR_OS_API=posix
6805       VAR_OS_ENV=solaris
6806       ;;
6807     *darwin*)
6808       VAR_OS=macosx
6809       VAR_OS_API=posix
6810       VAR_OS_ENV=macosx
6811       ;;
6812     *bsd*)
6813       VAR_OS=bsd
6814       VAR_OS_API=posix
6815       VAR_OS_ENV=bsd
6816       ;;
6817     *cygwin*)
6818       VAR_OS=windows
6819       VAR_OS_API=winapi
6820       VAR_OS_ENV=windows.cygwin
6821       ;;
6822     *mingw*)
6823       VAR_OS=windows
6824       VAR_OS_API=winapi
6825       VAR_OS_ENV=windows.msys
6826       ;;
6827     *)
6828       as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
6829       ;;
6830   esac
6831 
6832 
6833   # First argument is the cpu name from the trip/quad
6834   case "$host_cpu" in
6835     x86_64)
6836       VAR_CPU=x86_64
6837       VAR_CPU_ARCH=x86
6838       VAR_CPU_BITS=64
6839       VAR_CPU_ENDIAN=little
6840       ;;
6841     i?86)
6842       VAR_CPU=x86
6843       VAR_CPU_ARCH=x86
6844       VAR_CPU_BITS=32
6845       VAR_CPU_ENDIAN=little
6846       ;;
6847     arm*)
6848       VAR_CPU=arm
6849       VAR_CPU_ARCH=arm
6850       VAR_CPU_BITS=32
6851       VAR_CPU_ENDIAN=little
6852       ;;
6853     powerpc)
6854       VAR_CPU=ppc
6855       VAR_CPU_ARCH=ppc
6856       VAR_CPU_BITS=32
6857       VAR_CPU_ENDIAN=big
6858        ;;
6859     powerpc64)
6860       VAR_CPU=ppc64
6861       VAR_CPU_ARCH=ppc
6862       VAR_CPU_BITS=64
6863       VAR_CPU_ENDIAN=big
6864        ;;
6865     sparc)
6866       VAR_CPU=sparc
6867       VAR_CPU_ARCH=sparc
6868       VAR_CPU_BITS=32
6869       VAR_CPU_ENDIAN=big
6870        ;;
6871     sparcv9)
6872       VAR_CPU=sparcv9
6873       VAR_CPU_ARCH=sparc
6874       VAR_CPU_BITS=64
6875       VAR_CPU_ENDIAN=big
6876        ;;
6877     *)
6878       as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
6879       ;;
6880   esac
6881 
6882     # ... and setup our own variables. (Do this explicitely to facilitate searching)
6883     OPENJDK_TARGET_OS="$VAR_OS"
6884     OPENJDK_TARGET_OS_API="$VAR_OS_API"
6885     OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
6886     OPENJDK_TARGET_CPU="$VAR_CPU"
6887     OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
6888     OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
6889     OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6890 
6891 
6892 
6893 
6894 
6895 
6896 
6897     { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
6898 $as_echo_n "checking openjdk-target os-cpu... " >&6; }
6899     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
6900 $as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
6901 
6902 
6903 
6904 # Check whether --with-target-bits was given.
6905 if test "${with_target_bits+set}" = set; then :
6906   withval=$with_target_bits;
6907 fi
6908 
6909 
6910   # We have three types of compiles:
6911   # native  == normal compilation, target system == build system
6912   # cross   == traditional cross compilation, target system != build system; special toolchain needed
6913   # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
6914   #
6915   if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
6916     # We're doing a proper cross-compilation
6917     COMPILE_TYPE="cross"
6918   else
6919     COMPILE_TYPE="native"
6920   fi
6921 
6922   if test "x$with_target_bits" != x; then
6923     if test "x$COMPILE_TYPE" = "xcross"; then
6924       as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
6925     fi
6926 
6927     if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6928       # A reduced build is requested
6929       COMPILE_TYPE="reduced"
6930       OPENJDK_TARGET_CPU_BITS=32
6931       if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
6932         OPENJDK_TARGET_CPU=x86
6933       elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
6934         OPENJDK_TARGET_CPU=sparc
6935       else
6936         as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
6937       fi
6938     elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
6939       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
6940     elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
6941       { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
6942 $as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
6943     else
6944       as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
6945     fi
6946   fi
6947 
6948 
6949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
6950 $as_echo_n "checking compilation type... " >&6; }
6951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
6952 $as_echo "$COMPILE_TYPE" >&6; }
6953 
6954 
6955     if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
6956        REQUIRED_OS_NAME=SunOS
6957        REQUIRED_OS_VERSION=5.10
6958     fi
6959     if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
6960        REQUIRED_OS_NAME=Linux
6961        REQUIRED_OS_VERSION=2.6
6962     fi
6963     if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
6964         REQUIRED_OS_NAME=Windows
6965         if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
6966             REQUIRED_OS_VERSION=5.2
6967         else
6968             REQUIRED_OS_VERSION=5.1
6969         fi
6970     fi
6971     if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
6972         REQUIRED_OS_NAME=Darwin
6973         REQUIRED_OS_VERSION=11.2
6974     fi
6975 
6976 
6977 
6978 
6979 
6980     # Also store the legacy naming of the cpu.
6981     # Ie i586 and amd64 instead of x86 and x86_64
6982     OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
6983     if test "x$OPENJDK_TARGET_CPU" = xx86; then
6984       OPENJDK_TARGET_CPU_LEGACY="i586"
6985     elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6986       # On all platforms except MacOSX replace x86_64 with amd64.
6987       OPENJDK_TARGET_CPU_LEGACY="amd64"
6988     fi
6989 
6990 
6991     # And the second legacy naming of the cpu.
6992     # Ie i386 and amd64 instead of x86 and x86_64.
6993     OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
6994     if test "x$OPENJDK_TARGET_CPU" = xx86; then
6995       OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
6996     elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6997       OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
6998     fi
6999 
7000 
7001     # This is the name of the cpu (but using i386 and amd64 instead of
7002     # x86 and x86_64, respectively), preceeded by a /, to be used when
7003     # locating libraries. On macosx, it's empty, though.
7004     OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
7005     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
7006         OPENJDK_TARGET_CPU_LIBDIR=""
7007     fi
7008 
7009 
7010     # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
7011     # /amd64 or /sparcv9. This string is appended to some library paths, like this:
7012     # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
7013     OPENJDK_TARGET_CPU_ISADIR=""
7014     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7015       if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7016           OPENJDK_TARGET_CPU_ISADIR="/amd64"
7017       elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
7018           OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
7019       fi
7020     fi
7021 
7022 
7023     # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
7024     OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
7025     if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
7026       # On linux only, we replace x86 with i386.
7027       OPENJDK_TARGET_CPU_OSARCH="i386"
7028     elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7029       # On all platforms except macosx, we replace x86_64 with amd64.
7030       OPENJDK_TARGET_CPU_OSARCH="amd64"
7031     fi
7032 
7033 
7034     OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
7035     if test "x$OPENJDK_TARGET_CPU" = xx86; then
7036       OPENJDK_TARGET_CPU_JLI="i386"
7037     elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7038       # On all platforms except macosx, we replace x86_64 with amd64.
7039       OPENJDK_TARGET_CPU_JLI="amd64"
7040     fi
7041     # Now setup the -D flags for building libjli.
7042     OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
7043     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7044       if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
7045         OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
7046       elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
7047         OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
7048       fi
7049     fi
7050 
7051 
7052     # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
7053     if test "x$OPENJDK_TARGET_OS_API" = xposix; then
7054         OPENJDK_TARGET_OS_API_DIR="solaris"
7055     fi
7056     if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
7057         OPENJDK_TARGET_OS_API_DIR="windows"
7058     fi
7059 
7060 
7061     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7062         A_LP64="LP64:="
7063         # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
7064         # unpack200.exe
7065         if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
7066             ADD_LP64="-D_LP64=1"
7067         fi
7068     fi
7069     LP64=$A_LP64
7070 
7071 
7072     if test "x$COMPILE_TYPE" = "xcross"; then
7073       # FIXME: ... or should this include reduced builds..?
7074       DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
7075     else
7076       DEFINE_CROSS_COMPILE_ARCH=""
7077     fi
7078 
7079 
7080     # ZERO_ARCHDEF is used to enable architecture-specific code
7081     case "${OPENJDK_TARGET_CPU}" in
7082       ppc*)    ZERO_ARCHDEF=PPC   ;;
7083       s390*)   ZERO_ARCHDEF=S390  ;;
7084       sparc*)  ZERO_ARCHDEF=SPARC ;;
7085       x86_64*) ZERO_ARCHDEF=AMD64 ;;
7086       x86)     ZERO_ARCHDEF=IA32  ;;
7087       *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
7088     esac
7089 
7090 
7091 
7092 
7093 
7094 # Continue setting up basic stuff. Most remaining code require fundamental tools.
7095 
7096 # Locate the directory of this script.
7097 SCRIPT="$0"
7098 AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD -L`
7099 
7100 # Where is the source? It is located two levels above the configure script.
7101 CURDIR="$PWD"
7102 cd "$AUTOCONF_DIR/../.."
7103 SRC_ROOT="`$THEPWDCMD -L`"
7104 
7105 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7106   PATH_SEP=";"
7107 
7108   SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
7109   if test $SRC_ROOT_LENGTH -gt 100; then
7110       as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
7111   fi
7112 
7113   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7114     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
7115 $as_echo_n "checking cygwin release... " >&6; }
7116     CYGWIN_VERSION=`$UNAME -r`
7117     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
7118 $as_echo "$CYGWIN_VERSION" >&6; }
7119     WINDOWS_ENV_VENDOR='cygwin'
7120     WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
7121 
7122     CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
7123     if test "x$CYGWIN_VERSION_OK" = x; then
7124       { $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
7125 $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;}
7126       as_fn_error $? "Cannot continue" "$LINENO" 5
7127     fi
7128     if test "x$CYGPATH" = x; then
7129         as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
7130     fi
7131     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
7132 $as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
7133     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7134     cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
7135     # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
7136     CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
7137     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
7138 $as_echo "$CYGWIN_ROOT_PATH" >&6; }
7139     WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
7140     test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
7141     if test "x$test_cygdrive_prefix" = x; then
7142         as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
7143     fi
7144   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7145     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
7146 $as_echo_n "checking msys release... " >&6; }
7147     MSYS_VERSION=`$UNAME -r`
7148     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
7149 $as_echo "$MSYS_VERSION" >&6; }
7150 
7151     WINDOWS_ENV_VENDOR='msys'
7152     WINDOWS_ENV_VERSION="$MSYS_VERSION"
7153 
7154     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
7155 $as_echo_n "checking msys root directory as unix-style path... " >&6; }
7156     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7157     MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
7158 
7159   windows_path="$MSYS_ROOT_PATH"
7160   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7161     unix_path=`$CYGPATH -u "$windows_path"`
7162     MSYS_ROOT_PATH="$unix_path"
7163   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7164     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7165     MSYS_ROOT_PATH="$unix_path"
7166   fi
7167 
7168     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
7169 $as_echo "$MSYS_ROOT_PATH" >&6; }
7170     WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
7171   else
7172     as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
7173   fi
7174 
7175   # Test if windows or unix (cygwin/msys) find is first in path.
7176   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
7177 $as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
7178   FIND_BINARY_OUTPUT=`find --version 2>&1`
7179   if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
7180     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
7181 $as_echo "unix style" >&6; }
7182   elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
7183     { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
7184 $as_echo "Windows" >&6; }
7185     { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
7186 $as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
7187     { $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
7188 $as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
7189     as_fn_error $? "Cannot continue" "$LINENO" 5
7190   else
7191     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
7192 $as_echo "unknown" >&6; }
7193     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
7194 $as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
7195   fi
7196 
7197 else
7198   PATH_SEP=":"
7199 fi
7200 
7201 
7202 
7203 cd "$CURDIR"
7204 
7205 
7206   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7207 
7208   # Input might be given as Windows format, start by converting to
7209   # unix format.
7210   path="$SRC_ROOT"
7211   new_path=`$CYGPATH -u "$path"`
7212 
7213   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7214   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7215   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7216   # "foo.exe" is OK but "foo" is an error.
7217   #
7218   # This test is therefore slightly more accurate than "test -f" to check for file precense.
7219   # It is also a way to make sure we got the proper file name for the real test later on.
7220   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7221   if test "x$test_shortpath" = x; then
7222     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7223 $as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7224     as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
7225   fi
7226 
7227   # Call helper function which possibly converts this using DOS-style short mode.
7228   # If so, the updated path is stored in $new_path.
7229 
7230   input_path="$new_path"
7231   # Check if we need to convert this using DOS-style short mode. If the path
7232   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7233   # take no chances and rewrite it.
7234   # Note: m4 eats our [], so we need to use [ and ] instead.
7235   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7236   if test "x$has_forbidden_chars" != x; then
7237     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7238     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7239     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7240     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7241       # Going to short mode and back again did indeed matter. Since short mode is
7242       # case insensitive, let's make it lowercase to improve readability.
7243       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7244       # Now convert it back to Unix-stile (cygpath)
7245       input_path=`$CYGPATH -u "$shortmode_path"`
7246       new_path="$input_path"
7247     fi
7248   fi
7249 
7250   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7251   if test "x$test_cygdrive_prefix" = x; then
7252     # As a simple fix, exclude /usr/bin since it's not a real path.
7253     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7254       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7255       # a path prefixed by /cygdrive for fixpath to work.
7256       new_path="$CYGWIN_ROOT_PATH$input_path"
7257     fi
7258   fi
7259 
7260 
7261   if test "x$path" != "x$new_path"; then
7262     SRC_ROOT="$new_path"
7263     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7264 $as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7265   fi
7266 
7267   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7268 
7269   path="$SRC_ROOT"
7270   has_colon=`$ECHO $path | $GREP ^.:`
7271   new_path="$path"
7272   if test "x$has_colon" = x; then
7273     # Not in mixed or Windows style, start by that.
7274     new_path=`cmd //c echo $path`
7275   fi
7276 
7277 
7278   input_path="$new_path"
7279   # Check if we need to convert this using DOS-style short mode. If the path
7280   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7281   # take no chances and rewrite it.
7282   # Note: m4 eats our [], so we need to use [ and ] instead.
7283   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7284   if test "x$has_forbidden_chars" != x; then
7285     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7286     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7287   fi
7288 
7289 
7290   windows_path="$new_path"
7291   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7292     unix_path=`$CYGPATH -u "$windows_path"`
7293     new_path="$unix_path"
7294   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7295     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7296     new_path="$unix_path"
7297   fi
7298 
7299   if test "x$path" != "x$new_path"; then
7300     SRC_ROOT="$new_path"
7301     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7302 $as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7303   fi
7304 
7305   # Save the first 10 bytes of this path to the storage, so fixpath can work.
7306   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7307 
7308   else
7309     # We're on a posix platform. Hooray! :)
7310     path="$SRC_ROOT"
7311     has_space=`$ECHO "$path" | $GREP " "`
7312     if test "x$has_space" != x; then
7313       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7314 $as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7315       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7316     fi
7317 
7318     # Use eval to expand a potential ~
7319     eval path="$path"
7320     if test ! -f "$path" && test ! -d "$path"; then
7321       as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7322     fi
7323 
7324     SRC_ROOT="`cd "$path"; $THEPWDCMD -L`"
7325   fi
7326 
7327 
7328   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7329 
7330   # Input might be given as Windows format, start by converting to
7331   # unix format.
7332   path="$CURDIR"
7333   new_path=`$CYGPATH -u "$path"`
7334 
7335   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7336   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7337   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7338   # "foo.exe" is OK but "foo" is an error.
7339   #
7340   # This test is therefore slightly more accurate than "test -f" to check for file precense.
7341   # It is also a way to make sure we got the proper file name for the real test later on.
7342   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7343   if test "x$test_shortpath" = x; then
7344     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7345 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7346     as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
7347   fi
7348 
7349   # Call helper function which possibly converts this using DOS-style short mode.
7350   # If so, the updated path is stored in $new_path.
7351 
7352   input_path="$new_path"
7353   # Check if we need to convert this using DOS-style short mode. If the path
7354   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7355   # take no chances and rewrite it.
7356   # Note: m4 eats our [], so we need to use [ and ] instead.
7357   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7358   if test "x$has_forbidden_chars" != x; then
7359     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7360     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7361     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7362     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7363       # Going to short mode and back again did indeed matter. Since short mode is
7364       # case insensitive, let's make it lowercase to improve readability.
7365       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7366       # Now convert it back to Unix-stile (cygpath)
7367       input_path=`$CYGPATH -u "$shortmode_path"`
7368       new_path="$input_path"
7369     fi
7370   fi
7371 
7372   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7373   if test "x$test_cygdrive_prefix" = x; then
7374     # As a simple fix, exclude /usr/bin since it's not a real path.
7375     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7376       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7377       # a path prefixed by /cygdrive for fixpath to work.
7378       new_path="$CYGWIN_ROOT_PATH$input_path"
7379     fi
7380   fi
7381 
7382 
7383   if test "x$path" != "x$new_path"; then
7384     CURDIR="$new_path"
7385     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7386 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7387   fi
7388 
7389   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7390 
7391   path="$CURDIR"
7392   has_colon=`$ECHO $path | $GREP ^.:`
7393   new_path="$path"
7394   if test "x$has_colon" = x; then
7395     # Not in mixed or Windows style, start by that.
7396     new_path=`cmd //c echo $path`
7397   fi
7398 
7399 
7400   input_path="$new_path"
7401   # Check if we need to convert this using DOS-style short mode. If the path
7402   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7403   # take no chances and rewrite it.
7404   # Note: m4 eats our [], so we need to use [ and ] instead.
7405   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7406   if test "x$has_forbidden_chars" != x; then
7407     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7408     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7409   fi
7410 
7411 
7412   windows_path="$new_path"
7413   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7414     unix_path=`$CYGPATH -u "$windows_path"`
7415     new_path="$unix_path"
7416   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7417     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7418     new_path="$unix_path"
7419   fi
7420 
7421   if test "x$path" != "x$new_path"; then
7422     CURDIR="$new_path"
7423     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7424 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7425   fi
7426 
7427   # Save the first 10 bytes of this path to the storage, so fixpath can work.
7428   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7429 
7430   else
7431     # We're on a posix platform. Hooray! :)
7432     path="$CURDIR"
7433     has_space=`$ECHO "$path" | $GREP " "`
7434     if test "x$has_space" != x; then
7435       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7436 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7437       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7438     fi
7439 
7440     # Use eval to expand a potential ~
7441     eval path="$path"
7442     if test ! -f "$path" && test ! -d "$path"; then
7443       as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
7444     fi
7445 
7446     CURDIR="`cd "$path"; $THEPWDCMD -L`"
7447   fi
7448 
7449 
7450 if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
7451     # Add extra search paths on solaris for utilities like ar and as etc...
7452     PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
7453 fi
7454 
7455 # You can force the sys-root if the sys-root encoded into the cross compiler tools
7456 # is not correct.
7457 
7458 # Check whether --with-sys-root was given.
7459 if test "${with_sys_root+set}" = set; then :
7460   withval=$with_sys_root;
7461 fi
7462 
7463 
7464 if test "x$with_sys_root" != x; then
7465   SYS_ROOT=$with_sys_root
7466 else
7467   SYS_ROOT=/
7468 fi
7469 
7470 
7471 
7472 # Check whether --with-tools-dir was given.
7473 if test "${with_tools_dir+set}" = set; then :
7474   withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
7475 fi
7476 
7477 
7478 
7479 # Check whether --with-devkit was given.
7480 if test "${with_devkit+set}" = set; then :
7481   withval=$with_devkit;
7482     if test "x$with_sys_root" != x; then
7483       as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
7484     fi
7485     if test "x$with_tools_dir" != x; then
7486       as_fn_error $? "Cannot specify both --with-devkit and --with-tools-dir at the same time" "$LINENO" 5
7487     fi
7488     TOOLS_DIR=$with_devkit/bin
7489     SYS_ROOT=$with_devkit/$host_alias/libc
7490 
7491 fi
7492 
7493 
7494 
7495 
7496 # Setup default logging of stdout and stderr to build.log in the output root.
7497 BUILD_LOG='$(OUTPUT_ROOT)/build.log'
7498 BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
7499 BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
7500 
7501 
7502 
7503 
7504 
7505 # Check if it's a pure open build or if custom sources are to be used.
7506 
7507   # Check whether --enable-openjdk-only was given.
7508 if test "${enable_openjdk_only+set}" = set; then :
7509   enableval=$enable_openjdk_only;
7510 else
7511   enable_openjdk_only="no"
7512 fi
7513 
7514 
7515   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
7516 $as_echo_n "checking for presence of closed sources... " >&6; }
7517   if test -d "$SRC_ROOT/jdk/src/closed"; then
7518     CLOSED_SOURCE_PRESENT=yes
7519   else
7520     CLOSED_SOURCE_PRESENT=no
7521   fi
7522   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
7523 $as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
7524 
7525   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
7526 $as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
7527   SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
7528   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
7529 $as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
7530 
7531   if test "x$CLOSED_SOURCE_PRESENT" = xno; then
7532     OPENJDK=true
7533     if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7534       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
7535 $as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
7536     fi
7537   else
7538     if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7539       OPENJDK=true
7540     else
7541       OPENJDK=false
7542     fi
7543   fi
7544 
7545   if test "x$OPENJDK" = "xtrue"; then
7546     SET_OPENJDK="OPENJDK=true"
7547   fi
7548 
7549 
7550 
7551 
7552 # These are needed to be able to create a configuration name (and thus the output directory)
7553 
7554 ###############################################################################
7555 #
7556 # Check which variant of the JDK that we want to build.
7557 # Currently we have:
7558 #    normal:   standard edition
7559 # but the custom make system may add other variants
7560 #
7561 # Effectively the JDK variant gives a name to a specific set of
7562 # modules to compile into the JDK. In the future, these modules
7563 # might even be Jigsaw modules.
7564 #
7565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
7566 $as_echo_n "checking which variant of the JDK to build... " >&6; }
7567 
7568 # Check whether --with-jdk-variant was given.
7569 if test "${with_jdk_variant+set}" = set; then :
7570   withval=$with_jdk_variant;
7571 fi
7572 
7573 
7574 if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7575     JDK_VARIANT="normal"
7576 else
7577     as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7578 fi
7579 
7580 
7581 
7582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
7583 $as_echo "$JDK_VARIANT" >&6; }
7584 
7585 
7586 ###############################################################################
7587 #
7588 # Check which interpreter of the JVM we want to build.
7589 # Currently we have:
7590 #    template: Template interpreter (the default)
7591 #    cpp     : C++ interpreter
7592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
7593 $as_echo_n "checking which interpreter of the JVM to build... " >&6; }
7594 
7595 # Check whether --with-jvm-interpreter was given.
7596 if test "${with_jvm_interpreter+set}" = set; then :
7597   withval=$with_jvm_interpreter;
7598 fi
7599 
7600 
7601 if test "x$with_jvm_interpreter" = x; then
7602      with_jvm_interpreter="template"
7603 fi
7604 
7605 JVM_INTERPRETER="$with_jvm_interpreter"
7606 
7607 if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
7608    as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
7609 fi
7610 
7611 
7612 
7613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
7614 $as_echo "$with_jvm_interpreter" >&6; }
7615 
7616 
7617 
7618 ###############################################################################
7619 #
7620 # Check which variants of the JVM that we want to build.
7621 # Currently we have:
7622 #    server: normal interpreter and a tiered C1/C2 compiler
7623 #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
7624 #    minimal1: reduced form of client with optional VM services and features stripped out
7625 #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
7626 #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
7627 #    zero: no machine code interpreter, no compiler
7628 #    zeroshark: zero interpreter and shark/llvm compiler backend
7629 #    core: interpreter only, no compiler (only works on some platforms)
7630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
7631 $as_echo_n "checking which variants of the JVM to build... " >&6; }
7632 
7633 # Check whether --with-jvm-variants was given.
7634 if test "${with_jvm_variants+set}" = set; then :
7635   withval=$with_jvm_variants;
7636 fi
7637 
7638 
7639 if test "x$with_jvm_variants" = x; then
7640      with_jvm_variants="server"
7641 fi
7642 
7643 JVM_VARIANTS=",$with_jvm_variants,"
7644 TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//' -e 's/core,//'`
7645 
7646 if test "x$TEST_VARIANTS" != "x,"; then
7647    as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
7648 fi
7649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7650 $as_echo "$with_jvm_variants" >&6; }
7651 
7652 JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7653 JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7654 JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
7655 JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7656 JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7657 JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7658 JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
7659 
7660 if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7661     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7662         as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
7663     fi
7664 fi
7665 if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7666     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7667         as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
7668     fi
7669 fi
7670 if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7671     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7672         as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
7673     fi
7674 fi
7675 
7676 # Replace the commas with AND for use in the build directory name.
7677 ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
7678 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/' -e 's/core,/1/'`
7679 if test "x$COUNT_VARIANTS" != "x,1"; then
7680     BUILDING_MULTIPLE_JVM_VARIANTS=yes
7681 else
7682     BUILDING_MULTIPLE_JVM_VARIANTS=no
7683 fi
7684 
7685 
7686 
7687 
7688 
7689 
7690 
7691 
7692 
7693 
7694 INCLUDE_SA=true
7695 if test "x$JVM_VARIANT_ZERO" = xtrue ; then
7696     INCLUDE_SA=false
7697 fi
7698 if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
7699     INCLUDE_SA=false
7700 fi
7701 if test "x$VAR_CPU" = xppc64 ; then
7702     INCLUDE_SA=false
7703 fi
7704 
7705 
7706 if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7707    MACOSX_UNIVERSAL="true"
7708 fi
7709 
7710 
7711 
7712 
7713 
7714 ###############################################################################
7715 #
7716 # Set the debug level
7717 #    release: no debug information, all optimizations, no asserts.
7718 #    fastdebug: debug information (-g), all optimizations, all asserts
7719 #    slowdebug: debug information (-g), no optimizations, all asserts
7720 #
7721 DEBUG_LEVEL="release"
7722 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
7723 $as_echo_n "checking which debug level to use... " >&6; }
7724 # Check whether --enable-debug was given.
7725 if test "${enable_debug+set}" = set; then :
7726   enableval=$enable_debug;
7727         ENABLE_DEBUG="${enableval}"
7728         DEBUG_LEVEL="fastdebug"
7729 
7730 else
7731   ENABLE_DEBUG="no"
7732 fi
7733 
7734 
7735 
7736 # Check whether --with-debug-level was given.
7737 if test "${with_debug_level+set}" = set; then :
7738   withval=$with_debug_level;
7739         DEBUG_LEVEL="${withval}"
7740         if test "x$ENABLE_DEBUG" = xyes; then
7741                         as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
7742         fi
7743 
7744 fi
7745 
7746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
7747 $as_echo "$DEBUG_LEVEL" >&6; }
7748 
7749 if test "x$DEBUG_LEVEL" != xrelease && \
7750    test "x$DEBUG_LEVEL" != xfastdebug && \
7751    test "x$DEBUG_LEVEL" != xslowdebug; then
7752    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
7753 fi
7754 
7755 
7756 ###############################################################################
7757 #
7758 # Setup legacy vars/targets and new vars to deal with different debug levels.
7759 #
7760 
7761 case $DEBUG_LEVEL in
7762       release )
7763           VARIANT="OPT"
7764           FASTDEBUG="false"
7765           DEBUG_CLASSFILES="false"
7766           BUILD_VARIANT_RELEASE=""
7767           HOTSPOT_DEBUG_LEVEL="product"
7768           HOTSPOT_EXPORT="product"
7769            ;;
7770       fastdebug )
7771           VARIANT="DBG"
7772           FASTDEBUG="true"
7773           DEBUG_CLASSFILES="true"
7774           BUILD_VARIANT_RELEASE="-fastdebug"
7775           HOTSPOT_DEBUG_LEVEL="fastdebug"
7776           HOTSPOT_EXPORT="fastdebug"
7777            ;;
7778       slowdebug )
7779           VARIANT="DBG"
7780           FASTDEBUG="false"
7781           DEBUG_CLASSFILES="true"
7782           BUILD_VARIANT_RELEASE="-debug"
7783           HOTSPOT_DEBUG_LEVEL="jvmg"
7784           HOTSPOT_EXPORT="debug"
7785            ;;
7786 esac
7787 
7788 #####
7789 # Generate the legacy makefile targets for hotspot.
7790 # The hotspot api for selecting the build artifacts, really, needs to be improved.
7791 # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
7792 # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
7793 # But until then ...
7794 HOTSPOT_TARGET=""
7795 
7796 if test "x$JVM_VARIANT_SERVER" = xtrue; then
7797     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
7798 fi
7799 
7800 if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7801     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
7802 fi
7803 
7804 if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7805     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
7806 fi
7807 
7808 if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7809     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
7810 fi
7811 
7812 if test "x$JVM_VARIANT_ZERO" = xtrue; then
7813     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
7814 fi
7815 
7816 if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
7817     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
7818 fi
7819 
7820 if test "x$JVM_VARIANT_CORE" = xtrue; then
7821     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
7822 fi
7823 
7824 HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
7825 
7826 # On Macosx universal binaries are produced, but they only contain
7827 # 64 bit intel. This invalidates control of which jvms are built
7828 # from configure, but only server is valid anyway. Fix this
7829 # when hotspot makefiles are rewritten.
7830 if test "x$MACOSX_UNIVERSAL" = xtrue; then
7831     HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
7832 fi
7833 
7834 #####
7835 
7836 
7837 
7838 
7839 
7840 
7841 
7842 
7843 # With basic setup done, call the custom early hook.
7844 
7845 
7846 # To properly create a configuration name, we need to have the OpenJDK target
7847 # and options (variants and debug level) parsed.
7848 
7849 
7850 
7851 # Check whether --with-conf-name was given.
7852 if test "${with_conf_name+set}" = set; then :
7853   withval=$with_conf_name;  CONF_NAME=${with_conf_name}
7854 fi
7855 
7856 
7857 # Test from where we are running configure, in or outside of src root.
7858 if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
7859         || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
7860         || test "x$CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
7861     # We are running configure from the src root.
7862     # Create a default ./build/target-variant-debuglevel output root.
7863     if test "x${CONF_NAME}" = x; then
7864         CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
7865     fi
7866     OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
7867     $MKDIR -p "$OUTPUT_ROOT"
7868     if test ! -d "$OUTPUT_ROOT"; then
7869         as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
7870     fi
7871 else
7872     # We are running configure from outside of the src dir.
7873     # Then use the current directory as output dir!
7874     # If configuration is situated in normal build directory, just use the build
7875     # directory name as configuration name, otherwise use the complete path.
7876     if test "x${CONF_NAME}" = x; then
7877         CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
7878     fi
7879     OUTPUT_ROOT="$CURDIR"
7880 
7881     # WARNING: This might be a bad thing to do. You need to be sure you want to
7882     # have a configuration in this directory. Do some sanity checks!
7883 
7884     if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
7885       # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
7886       # other files
7887       files_present=`$LS $OUTPUT_ROOT`
7888       # Configure has already touched config.log and confdefs.h in the current dir when this check
7889       # is performed.
7890       filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
7891                                              | $TR -d '\n'`
7892       if test "x$filtered_files" != x; then
7893         { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
7894 $as_echo "$as_me: Current directory is $CURDIR." >&6;}
7895         { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
7896 $as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
7897         { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
7898 $as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
7899         { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
7900 $as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
7901         { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
7902 $as_echo "$as_me: seriously mess up just about everything." >&6;}
7903         { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
7904 $as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
7905         { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
7906 $as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
7907         as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
7908       fi
7909     fi
7910 fi
7911 { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
7912 $as_echo_n "checking what configuration name to use... " >&6; }
7913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
7914 $as_echo "$CONF_NAME" >&6; }
7915 
7916 
7917   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7918 
7919   # Input might be given as Windows format, start by converting to
7920   # unix format.
7921   path="$OUTPUT_ROOT"
7922   new_path=`$CYGPATH -u "$path"`
7923 
7924   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7925   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7926   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7927   # "foo.exe" is OK but "foo" is an error.
7928   #
7929   # This test is therefore slightly more accurate than "test -f" to check for file precense.
7930   # It is also a way to make sure we got the proper file name for the real test later on.
7931   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7932   if test "x$test_shortpath" = x; then
7933     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
7934 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
7935     as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
7936   fi
7937 
7938   # Call helper function which possibly converts this using DOS-style short mode.
7939   # If so, the updated path is stored in $new_path.
7940 
7941   input_path="$new_path"
7942   # Check if we need to convert this using DOS-style short mode. If the path
7943   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7944   # take no chances and rewrite it.
7945   # Note: m4 eats our [], so we need to use [ and ] instead.
7946   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7947   if test "x$has_forbidden_chars" != x; then
7948     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7949     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7950     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7951     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7952       # Going to short mode and back again did indeed matter. Since short mode is
7953       # case insensitive, let's make it lowercase to improve readability.
7954       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7955       # Now convert it back to Unix-stile (cygpath)
7956       input_path=`$CYGPATH -u "$shortmode_path"`
7957       new_path="$input_path"
7958     fi
7959   fi
7960 
7961   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7962   if test "x$test_cygdrive_prefix" = x; then
7963     # As a simple fix, exclude /usr/bin since it's not a real path.
7964     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7965       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7966       # a path prefixed by /cygdrive for fixpath to work.
7967       new_path="$CYGWIN_ROOT_PATH$input_path"
7968     fi
7969   fi
7970 
7971 
7972   if test "x$path" != "x$new_path"; then
7973     OUTPUT_ROOT="$new_path"
7974     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
7975 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
7976   fi
7977 
7978   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7979 
7980   path="$OUTPUT_ROOT"
7981   has_colon=`$ECHO $path | $GREP ^.:`
7982   new_path="$path"
7983   if test "x$has_colon" = x; then
7984     # Not in mixed or Windows style, start by that.
7985     new_path=`cmd //c echo $path`
7986   fi
7987 
7988 
7989   input_path="$new_path"
7990   # Check if we need to convert this using DOS-style short mode. If the path
7991   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7992   # take no chances and rewrite it.
7993   # Note: m4 eats our [], so we need to use [ and ] instead.
7994   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7995   if test "x$has_forbidden_chars" != x; then
7996     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7997     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7998   fi
7999 
8000 
8001   windows_path="$new_path"
8002   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8003     unix_path=`$CYGPATH -u "$windows_path"`
8004     new_path="$unix_path"
8005   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8006     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8007     new_path="$unix_path"
8008   fi
8009 
8010   if test "x$path" != "x$new_path"; then
8011     OUTPUT_ROOT="$new_path"
8012     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8013 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8014   fi
8015 
8016   # Save the first 10 bytes of this path to the storage, so fixpath can work.
8017   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8018 
8019   else
8020     # We're on a posix platform. Hooray! :)
8021     path="$OUTPUT_ROOT"
8022     has_space=`$ECHO "$path" | $GREP " "`
8023     if test "x$has_space" != x; then
8024       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8025 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8026       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
8027     fi
8028 
8029     # Use eval to expand a potential ~
8030     eval path="$path"
8031     if test ! -f "$path" && test ! -d "$path"; then
8032       as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
8033     fi
8034 
8035     OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
8036   fi
8037 
8038 
8039 SPEC=$OUTPUT_ROOT/spec.gmk
8040 
8041 CONF_NAME=$CONF_NAME
8042 
8043 OUTPUT_ROOT=$OUTPUT_ROOT
8044 
8045 
8046 # Most of the probed defines are put into config.h
8047 ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
8048 
8049 # The spec.gmk file contains all variables for the make system.
8050 ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
8051 
8052 # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
8053 ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
8054 
8055 # The bootcycle-spec.gmk file contains support for boot cycle builds.
8056 ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
8057 
8058 # The compare.sh is used to compare the build output to other builds.
8059 ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
8060 
8061 # Spec.sh is currently used by compare-objects.sh
8062 ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
8063 
8064 # The generated Makefile knows where the spec.gmk is and where the source is.
8065 # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
8066 # which will look for generated configurations
8067 ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
8068 
8069 
8070 # Save the arguments given to us
8071 echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
8072 
8073 
8074 # Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
8075 
8076     for ac_prog in apt-get yum port pkgutil pkgadd
8077 do
8078   # Extract the first word of "$ac_prog", so it can be a program name with args.
8079 set dummy $ac_prog; ac_word=$2
8080 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8081 $as_echo_n "checking for $ac_word... " >&6; }
8082 if ${ac_cv_prog_PKGHANDLER+:} false; then :
8083   $as_echo_n "(cached) " >&6
8084 else
8085   if test -n "$PKGHANDLER"; then
8086   ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
8087 else
8088 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8089 for as_dir in $PATH
8090 do
8091   IFS=$as_save_IFS
8092   test -z "$as_dir" && as_dir=.
8093     for ac_exec_ext in '' $ac_executable_extensions; do
8094   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8095     ac_cv_prog_PKGHANDLER="$ac_prog"
8096     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8097     break 2
8098   fi
8099 done
8100   done
8101 IFS=$as_save_IFS
8102 
8103 fi
8104 fi
8105 PKGHANDLER=$ac_cv_prog_PKGHANDLER
8106 if test -n "$PKGHANDLER"; then
8107   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
8108 $as_echo "$PKGHANDLER" >&6; }
8109 else
8110   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8111 $as_echo "no" >&6; }
8112 fi
8113 
8114 
8115   test -n "$PKGHANDLER" && break
8116 done
8117 
8118 
8119 
8120 # Setup tools that requires more complex handling, or that is not needed by the configure script.
8121 
8122 
8123   # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
8124   if test "x$MAKE" != x; then
8125     # User has supplied a make, test it.
8126     if test ! -f "$MAKE"; then
8127       as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
8128     fi
8129 
8130   MAKE_CANDIDATE=""$MAKE""
8131   DESCRIPTION="user supplied MAKE=$MAKE"
8132   if test "x$MAKE_CANDIDATE" != x; then
8133     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8134 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8135     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8136     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8137     if test "x$IS_GNU_MAKE" = x; then
8138       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8139 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8140     else
8141       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8142       if test "x$IS_MODERN_MAKE" = x; then
8143         { $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
8144 $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;}
8145       else
8146         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8147           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8148             MAKE_EXPECTED_ENV='cygwin'
8149           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8150             MAKE_EXPECTED_ENV='msys'
8151           else
8152             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8153           fi
8154           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8155           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8156         else
8157           # Not relevant for non-Windows
8158           IS_MAKE_CORRECT_ENV=true
8159         fi
8160         if test "x$IS_MAKE_CORRECT_ENV" = x; then
8161           { $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
8162 $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;}
8163         else
8164           FOUND_MAKE=$MAKE_CANDIDATE
8165 
8166   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8167 
8168   # First separate the path from the arguments. This will split at the first
8169   # space.
8170   complete="$FOUND_MAKE"
8171   path="${complete%% *}"
8172   tmp="$complete EOL"
8173   arguments="${tmp#* }"
8174 
8175   # Input might be given as Windows format, start by converting to
8176   # unix format.
8177   new_path=`$CYGPATH -u "$path"`
8178 
8179   # Now try to locate executable using which
8180   new_path=`$WHICH "$new_path" 2> /dev/null`
8181   # bat and cmd files are not always considered executable in cygwin causing which
8182   # to not find them
8183   if test "x$new_path" = x \
8184            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8185            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8186     new_path=`$CYGPATH -u "$path"`
8187   fi
8188   if test "x$new_path" = x; then
8189     # Oops. Which didn't find the executable.
8190     # The splitting of arguments from the executable at a space might have been incorrect,
8191     # since paths with space are more likely in Windows. Give it another try with the whole
8192     # argument.
8193     path="$complete"
8194     arguments="EOL"
8195     new_path=`$CYGPATH -u "$path"`
8196     new_path=`$WHICH "$new_path" 2> /dev/null`
8197     # bat and cmd files are not always considered executable in cygwin causing which
8198     # to not find them
8199     if test "x$new_path" = x \
8200              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8201              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8202       new_path=`$CYGPATH -u "$path"`
8203     fi
8204     if test "x$new_path" = x; then
8205       # It's still not found. Now this is an unrecoverable error.
8206       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8207 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8208       has_space=`$ECHO "$complete" | $GREP " "`
8209       if test "x$has_space" != x; then
8210         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8211 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8212       fi
8213       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8214     fi
8215   fi
8216 
8217   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8218   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8219   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8220   # "foo.exe" is OK but "foo" is an error.
8221   #
8222   # This test is therefore slightly more accurate than "test -f" to check for file precense.
8223   # It is also a way to make sure we got the proper file name for the real test later on.
8224   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8225   if test "x$test_shortpath" = x; then
8226     # Short path failed, file does not exist as specified.
8227     # Try adding .exe or .cmd
8228     if test -f "${new_path}.exe"; then
8229        input_to_shortpath="${new_path}.exe"
8230     elif test -f "${new_path}.cmd"; then
8231        input_to_shortpath="${new_path}.cmd"
8232     else
8233       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8234 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8235       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8236 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8237       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8238     fi
8239   else
8240     input_to_shortpath="$new_path"
8241   fi
8242 
8243   # Call helper function which possibly converts this using DOS-style short mode.
8244   # If so, the updated path is stored in $new_path.
8245   new_path="$input_to_shortpath"
8246 
8247   input_path="$input_to_shortpath"
8248   # Check if we need to convert this using DOS-style short mode. If the path
8249   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8250   # take no chances and rewrite it.
8251   # Note: m4 eats our [], so we need to use [ and ] instead.
8252   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8253   if test "x$has_forbidden_chars" != x; then
8254     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8255     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8256     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8257     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8258       # Going to short mode and back again did indeed matter. Since short mode is
8259       # case insensitive, let's make it lowercase to improve readability.
8260       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8261       # Now convert it back to Unix-stile (cygpath)
8262       input_path=`$CYGPATH -u "$shortmode_path"`
8263       new_path="$input_path"
8264     fi
8265   fi
8266 
8267   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8268   if test "x$test_cygdrive_prefix" = x; then
8269     # As a simple fix, exclude /usr/bin since it's not a real path.
8270     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8271       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8272       # a path prefixed by /cygdrive for fixpath to work.
8273       new_path="$CYGWIN_ROOT_PATH$input_path"
8274     fi
8275   fi
8276 
8277   # remove trailing .exe if any
8278   new_path="${new_path/%.exe/}"
8279 
8280   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8281 
8282   # First separate the path from the arguments. This will split at the first
8283   # space.
8284   complete="$FOUND_MAKE"
8285   path="${complete%% *}"
8286   tmp="$complete EOL"
8287   arguments="${tmp#* }"
8288 
8289   # Input might be given as Windows format, start by converting to
8290   # unix format.
8291   new_path="$path"
8292 
8293   windows_path="$new_path"
8294   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8295     unix_path=`$CYGPATH -u "$windows_path"`
8296     new_path="$unix_path"
8297   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8298     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8299     new_path="$unix_path"
8300   fi
8301 
8302 
8303   # Now try to locate executable using which
8304   new_path=`$WHICH "$new_path" 2> /dev/null`
8305 
8306   if test "x$new_path" = x; then
8307     # Oops. Which didn't find the executable.
8308     # The splitting of arguments from the executable at a space might have been incorrect,
8309     # since paths with space are more likely in Windows. Give it another try with the whole
8310     # argument.
8311     path="$complete"
8312     arguments="EOL"
8313     new_path="$path"
8314 
8315   windows_path="$new_path"
8316   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8317     unix_path=`$CYGPATH -u "$windows_path"`
8318     new_path="$unix_path"
8319   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8320     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8321     new_path="$unix_path"
8322   fi
8323 
8324 
8325     new_path=`$WHICH "$new_path" 2> /dev/null`
8326 
8327     if test "x$new_path" = x; then
8328       # It's still not found. Now this is an unrecoverable error.
8329       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8330 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8331       has_space=`$ECHO "$complete" | $GREP " "`
8332       if test "x$has_space" != x; then
8333         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8334 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8335       fi
8336       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8337     fi
8338   fi
8339 
8340   # Now new_path has a complete unix path to the binary
8341   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8342     # Keep paths in /bin as-is, but remove trailing .exe if any
8343     new_path="${new_path/%.exe/}"
8344     # Do not save /bin paths to all_fixpath_prefixes!
8345   else
8346     # Not in mixed or Windows style, start by that.
8347     new_path=`cmd //c echo $new_path`
8348 
8349   input_path="$new_path"
8350   # Check if we need to convert this using DOS-style short mode. If the path
8351   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8352   # take no chances and rewrite it.
8353   # Note: m4 eats our [], so we need to use [ and ] instead.
8354   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8355   if test "x$has_forbidden_chars" != x; then
8356     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8357     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8358   fi
8359 
8360     # Output is in $new_path
8361 
8362   windows_path="$new_path"
8363   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8364     unix_path=`$CYGPATH -u "$windows_path"`
8365     new_path="$unix_path"
8366   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8367     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8368     new_path="$unix_path"
8369   fi
8370 
8371     # remove trailing .exe if any
8372     new_path="${new_path/%.exe/}"
8373 
8374     # Save the first 10 bytes of this path to the storage, so fixpath can work.
8375     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8376   fi
8377 
8378   else
8379     # We're on a posix platform. Hooray! :)
8380     # First separate the path from the arguments. This will split at the first
8381     # space.
8382     complete="$FOUND_MAKE"
8383     path="${complete%% *}"
8384     tmp="$complete EOL"
8385     arguments="${tmp#* }"
8386 
8387     # Cannot rely on the command "which" here since it doesn't always work.
8388     is_absolute_path=`$ECHO "$path" | $GREP ^/`
8389     if test -z "$is_absolute_path"; then
8390       # Path to executable is not absolute. Find it.
8391       IFS_save="$IFS"
8392       IFS=:
8393       for p in $PATH; do
8394         if test -f "$p/$path" && test -x "$p/$path"; then
8395           new_path="$p/$path"
8396           break
8397         fi
8398       done
8399       IFS="$IFS_save"
8400     else
8401       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8402 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8403       new_path="$path"
8404     fi
8405 
8406     if test "x$new_path" = x; then
8407         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8408 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8409         has_space=`$ECHO "$complete" | $GREP " "`
8410         if test "x$has_space" != x; then
8411           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8412 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8413         fi
8414         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8415       fi
8416   fi
8417 
8418       # Now join together the path and the arguments once again
8419       if test "x$arguments" != xEOL; then
8420         new_complete="$new_path ${arguments% *}"
8421       else
8422         new_complete="$new_path"
8423       fi
8424 
8425   if test "x$complete" != "x$new_complete"; then
8426       FOUND_MAKE="$new_complete"
8427       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8428 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8429     fi
8430 
8431         fi
8432       fi
8433     fi
8434   fi
8435 
8436     if test "x$FOUND_MAKE" = x; then
8437       as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
8438     fi
8439   else
8440     # Try our hardest to locate a correct version of GNU make
8441     for ac_prog in gmake
8442 do
8443   # Extract the first word of "$ac_prog", so it can be a program name with args.
8444 set dummy $ac_prog; ac_word=$2
8445 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8446 $as_echo_n "checking for $ac_word... " >&6; }
8447 if ${ac_cv_path_CHECK_GMAKE+:} false; then :
8448   $as_echo_n "(cached) " >&6
8449 else
8450   case $CHECK_GMAKE in
8451   [\\/]* | ?:[\\/]*)
8452   ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
8453   ;;
8454   *)
8455   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8456 for as_dir in $PATH
8457 do
8458   IFS=$as_save_IFS
8459   test -z "$as_dir" && as_dir=.
8460     for ac_exec_ext in '' $ac_executable_extensions; do
8461   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8462     ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8463     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8464     break 2
8465   fi
8466 done
8467   done
8468 IFS=$as_save_IFS
8469 
8470   ;;
8471 esac
8472 fi
8473 CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
8474 if test -n "$CHECK_GMAKE"; then
8475   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
8476 $as_echo "$CHECK_GMAKE" >&6; }
8477 else
8478   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8479 $as_echo "no" >&6; }
8480 fi
8481 
8482 
8483   test -n "$CHECK_GMAKE" && break
8484 done
8485 
8486 
8487   MAKE_CANDIDATE=""$CHECK_GMAKE""
8488   DESCRIPTION="gmake in PATH"
8489   if test "x$MAKE_CANDIDATE" != x; then
8490     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8491 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8492     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8493     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8494     if test "x$IS_GNU_MAKE" = x; then
8495       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8496 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8497     else
8498       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8499       if test "x$IS_MODERN_MAKE" = x; then
8500         { $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
8501 $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;}
8502       else
8503         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8504           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8505             MAKE_EXPECTED_ENV='cygwin'
8506           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8507             MAKE_EXPECTED_ENV='msys'
8508           else
8509             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8510           fi
8511           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8512           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8513         else
8514           # Not relevant for non-Windows
8515           IS_MAKE_CORRECT_ENV=true
8516         fi
8517         if test "x$IS_MAKE_CORRECT_ENV" = x; then
8518           { $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
8519 $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;}
8520         else
8521           FOUND_MAKE=$MAKE_CANDIDATE
8522 
8523   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8524 
8525   # First separate the path from the arguments. This will split at the first
8526   # space.
8527   complete="$FOUND_MAKE"
8528   path="${complete%% *}"
8529   tmp="$complete EOL"
8530   arguments="${tmp#* }"
8531 
8532   # Input might be given as Windows format, start by converting to
8533   # unix format.
8534   new_path=`$CYGPATH -u "$path"`
8535 
8536   # Now try to locate executable using which
8537   new_path=`$WHICH "$new_path" 2> /dev/null`
8538   # bat and cmd files are not always considered executable in cygwin causing which
8539   # to not find them
8540   if test "x$new_path" = x \
8541            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8542            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8543     new_path=`$CYGPATH -u "$path"`
8544   fi
8545   if test "x$new_path" = x; then
8546     # Oops. Which didn't find the executable.
8547     # The splitting of arguments from the executable at a space might have been incorrect,
8548     # since paths with space are more likely in Windows. Give it another try with the whole
8549     # argument.
8550     path="$complete"
8551     arguments="EOL"
8552     new_path=`$CYGPATH -u "$path"`
8553     new_path=`$WHICH "$new_path" 2> /dev/null`
8554     # bat and cmd files are not always considered executable in cygwin causing which
8555     # to not find them
8556     if test "x$new_path" = x \
8557              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8558              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8559       new_path=`$CYGPATH -u "$path"`
8560     fi
8561     if test "x$new_path" = x; then
8562       # It's still not found. Now this is an unrecoverable error.
8563       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8564 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8565       has_space=`$ECHO "$complete" | $GREP " "`
8566       if test "x$has_space" != x; then
8567         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8568 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8569       fi
8570       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8571     fi
8572   fi
8573 
8574   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8575   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8576   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8577   # "foo.exe" is OK but "foo" is an error.
8578   #
8579   # This test is therefore slightly more accurate than "test -f" to check for file precense.
8580   # It is also a way to make sure we got the proper file name for the real test later on.
8581   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8582   if test "x$test_shortpath" = x; then
8583     # Short path failed, file does not exist as specified.
8584     # Try adding .exe or .cmd
8585     if test -f "${new_path}.exe"; then
8586        input_to_shortpath="${new_path}.exe"
8587     elif test -f "${new_path}.cmd"; then
8588        input_to_shortpath="${new_path}.cmd"
8589     else
8590       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8591 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8592       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8593 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8594       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8595     fi
8596   else
8597     input_to_shortpath="$new_path"
8598   fi
8599 
8600   # Call helper function which possibly converts this using DOS-style short mode.
8601   # If so, the updated path is stored in $new_path.
8602   new_path="$input_to_shortpath"
8603 
8604   input_path="$input_to_shortpath"
8605   # Check if we need to convert this using DOS-style short mode. If the path
8606   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8607   # take no chances and rewrite it.
8608   # Note: m4 eats our [], so we need to use [ and ] instead.
8609   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8610   if test "x$has_forbidden_chars" != x; then
8611     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8612     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8613     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8614     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8615       # Going to short mode and back again did indeed matter. Since short mode is
8616       # case insensitive, let's make it lowercase to improve readability.
8617       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8618       # Now convert it back to Unix-stile (cygpath)
8619       input_path=`$CYGPATH -u "$shortmode_path"`
8620       new_path="$input_path"
8621     fi
8622   fi
8623 
8624   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8625   if test "x$test_cygdrive_prefix" = x; then
8626     # As a simple fix, exclude /usr/bin since it's not a real path.
8627     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8628       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8629       # a path prefixed by /cygdrive for fixpath to work.
8630       new_path="$CYGWIN_ROOT_PATH$input_path"
8631     fi
8632   fi
8633 
8634   # remove trailing .exe if any
8635   new_path="${new_path/%.exe/}"
8636 
8637   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8638 
8639   # First separate the path from the arguments. This will split at the first
8640   # space.
8641   complete="$FOUND_MAKE"
8642   path="${complete%% *}"
8643   tmp="$complete EOL"
8644   arguments="${tmp#* }"
8645 
8646   # Input might be given as Windows format, start by converting to
8647   # unix format.
8648   new_path="$path"
8649 
8650   windows_path="$new_path"
8651   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8652     unix_path=`$CYGPATH -u "$windows_path"`
8653     new_path="$unix_path"
8654   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8655     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8656     new_path="$unix_path"
8657   fi
8658 
8659 
8660   # Now try to locate executable using which
8661   new_path=`$WHICH "$new_path" 2> /dev/null`
8662 
8663   if test "x$new_path" = x; then
8664     # Oops. Which didn't find the executable.
8665     # The splitting of arguments from the executable at a space might have been incorrect,
8666     # since paths with space are more likely in Windows. Give it another try with the whole
8667     # argument.
8668     path="$complete"
8669     arguments="EOL"
8670     new_path="$path"
8671 
8672   windows_path="$new_path"
8673   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8674     unix_path=`$CYGPATH -u "$windows_path"`
8675     new_path="$unix_path"
8676   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8677     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8678     new_path="$unix_path"
8679   fi
8680 
8681 
8682     new_path=`$WHICH "$new_path" 2> /dev/null`
8683 
8684     if test "x$new_path" = x; then
8685       # It's still not found. Now this is an unrecoverable error.
8686       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8687 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8688       has_space=`$ECHO "$complete" | $GREP " "`
8689       if test "x$has_space" != x; then
8690         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8691 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8692       fi
8693       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8694     fi
8695   fi
8696 
8697   # Now new_path has a complete unix path to the binary
8698   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8699     # Keep paths in /bin as-is, but remove trailing .exe if any
8700     new_path="${new_path/%.exe/}"
8701     # Do not save /bin paths to all_fixpath_prefixes!
8702   else
8703     # Not in mixed or Windows style, start by that.
8704     new_path=`cmd //c echo $new_path`
8705 
8706   input_path="$new_path"
8707   # Check if we need to convert this using DOS-style short mode. If the path
8708   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8709   # take no chances and rewrite it.
8710   # Note: m4 eats our [], so we need to use [ and ] instead.
8711   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8712   if test "x$has_forbidden_chars" != x; then
8713     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8714     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8715   fi
8716 
8717     # Output is in $new_path
8718 
8719   windows_path="$new_path"
8720   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8721     unix_path=`$CYGPATH -u "$windows_path"`
8722     new_path="$unix_path"
8723   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8724     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8725     new_path="$unix_path"
8726   fi
8727 
8728     # remove trailing .exe if any
8729     new_path="${new_path/%.exe/}"
8730 
8731     # Save the first 10 bytes of this path to the storage, so fixpath can work.
8732     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8733   fi
8734 
8735   else
8736     # We're on a posix platform. Hooray! :)
8737     # First separate the path from the arguments. This will split at the first
8738     # space.
8739     complete="$FOUND_MAKE"
8740     path="${complete%% *}"
8741     tmp="$complete EOL"
8742     arguments="${tmp#* }"
8743 
8744     # Cannot rely on the command "which" here since it doesn't always work.
8745     is_absolute_path=`$ECHO "$path" | $GREP ^/`
8746     if test -z "$is_absolute_path"; then
8747       # Path to executable is not absolute. Find it.
8748       IFS_save="$IFS"
8749       IFS=:
8750       for p in $PATH; do
8751         if test -f "$p/$path" && test -x "$p/$path"; then
8752           new_path="$p/$path"
8753           break
8754         fi
8755       done
8756       IFS="$IFS_save"
8757     else
8758       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8759 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8760       new_path="$path"
8761     fi
8762 
8763     if test "x$new_path" = x; then
8764         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8765 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8766         has_space=`$ECHO "$complete" | $GREP " "`
8767         if test "x$has_space" != x; then
8768           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8769 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8770         fi
8771         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8772       fi
8773   fi
8774 
8775       # Now join together the path and the arguments once again
8776       if test "x$arguments" != xEOL; then
8777         new_complete="$new_path ${arguments% *}"
8778       else
8779         new_complete="$new_path"
8780       fi
8781 
8782   if test "x$complete" != "x$new_complete"; then
8783       FOUND_MAKE="$new_complete"
8784       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8785 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8786     fi
8787 
8788         fi
8789       fi
8790     fi
8791   fi
8792 
8793 
8794     if test "x$FOUND_MAKE" = x; then
8795       for ac_prog in make
8796 do
8797   # Extract the first word of "$ac_prog", so it can be a program name with args.
8798 set dummy $ac_prog; ac_word=$2
8799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8800 $as_echo_n "checking for $ac_word... " >&6; }
8801 if ${ac_cv_path_CHECK_MAKE+:} false; then :
8802   $as_echo_n "(cached) " >&6
8803 else
8804   case $CHECK_MAKE in
8805   [\\/]* | ?:[\\/]*)
8806   ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
8807   ;;
8808   *)
8809   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8810 for as_dir in $PATH
8811 do
8812   IFS=$as_save_IFS
8813   test -z "$as_dir" && as_dir=.
8814     for ac_exec_ext in '' $ac_executable_extensions; do
8815   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8816     ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
8817     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8818     break 2
8819   fi
8820 done
8821   done
8822 IFS=$as_save_IFS
8823 
8824   ;;
8825 esac
8826 fi
8827 CHECK_MAKE=$ac_cv_path_CHECK_MAKE
8828 if test -n "$CHECK_MAKE"; then
8829   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
8830 $as_echo "$CHECK_MAKE" >&6; }
8831 else
8832   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8833 $as_echo "no" >&6; }
8834 fi
8835 
8836 
8837   test -n "$CHECK_MAKE" && break
8838 done
8839 
8840 
8841   MAKE_CANDIDATE=""$CHECK_MAKE""
8842   DESCRIPTION="make in PATH"
8843   if test "x$MAKE_CANDIDATE" != x; then
8844     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8845 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8846     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8847     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8848     if test "x$IS_GNU_MAKE" = x; then
8849       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8850 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8851     else
8852       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8853       if test "x$IS_MODERN_MAKE" = x; then
8854         { $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
8855 $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;}
8856       else
8857         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8858           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8859             MAKE_EXPECTED_ENV='cygwin'
8860           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8861             MAKE_EXPECTED_ENV='msys'
8862           else
8863             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8864           fi
8865           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8866           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8867         else
8868           # Not relevant for non-Windows
8869           IS_MAKE_CORRECT_ENV=true
8870         fi
8871         if test "x$IS_MAKE_CORRECT_ENV" = x; then
8872           { $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
8873 $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;}
8874         else
8875           FOUND_MAKE=$MAKE_CANDIDATE
8876 
8877   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8878 
8879   # First separate the path from the arguments. This will split at the first
8880   # space.
8881   complete="$FOUND_MAKE"
8882   path="${complete%% *}"
8883   tmp="$complete EOL"
8884   arguments="${tmp#* }"
8885 
8886   # Input might be given as Windows format, start by converting to
8887   # unix format.
8888   new_path=`$CYGPATH -u "$path"`
8889 
8890   # Now try to locate executable using which
8891   new_path=`$WHICH "$new_path" 2> /dev/null`
8892   # bat and cmd files are not always considered executable in cygwin causing which
8893   # to not find them
8894   if test "x$new_path" = x \
8895            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8896            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8897     new_path=`$CYGPATH -u "$path"`
8898   fi
8899   if test "x$new_path" = x; then
8900     # Oops. Which didn't find the executable.
8901     # The splitting of arguments from the executable at a space might have been incorrect,
8902     # since paths with space are more likely in Windows. Give it another try with the whole
8903     # argument.
8904     path="$complete"
8905     arguments="EOL"
8906     new_path=`$CYGPATH -u "$path"`
8907     new_path=`$WHICH "$new_path" 2> /dev/null`
8908     # bat and cmd files are not always considered executable in cygwin causing which
8909     # to not find them
8910     if test "x$new_path" = x \
8911              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8912              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8913       new_path=`$CYGPATH -u "$path"`
8914     fi
8915     if test "x$new_path" = x; then
8916       # It's still not found. Now this is an unrecoverable error.
8917       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8918 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8919       has_space=`$ECHO "$complete" | $GREP " "`
8920       if test "x$has_space" != x; then
8921         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8922 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8923       fi
8924       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8925     fi
8926   fi
8927 
8928   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8929   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8930   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8931   # "foo.exe" is OK but "foo" is an error.
8932   #
8933   # This test is therefore slightly more accurate than "test -f" to check for file precense.
8934   # It is also a way to make sure we got the proper file name for the real test later on.
8935   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8936   if test "x$test_shortpath" = x; then
8937     # Short path failed, file does not exist as specified.
8938     # Try adding .exe or .cmd
8939     if test -f "${new_path}.exe"; then
8940        input_to_shortpath="${new_path}.exe"
8941     elif test -f "${new_path}.cmd"; then
8942        input_to_shortpath="${new_path}.cmd"
8943     else
8944       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8945 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8946       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8947 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8948       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8949     fi
8950   else
8951     input_to_shortpath="$new_path"
8952   fi
8953 
8954   # Call helper function which possibly converts this using DOS-style short mode.
8955   # If so, the updated path is stored in $new_path.
8956   new_path="$input_to_shortpath"
8957 
8958   input_path="$input_to_shortpath"
8959   # Check if we need to convert this using DOS-style short mode. If the path
8960   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8961   # take no chances and rewrite it.
8962   # Note: m4 eats our [], so we need to use [ and ] instead.
8963   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8964   if test "x$has_forbidden_chars" != x; then
8965     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8966     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8967     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8968     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8969       # Going to short mode and back again did indeed matter. Since short mode is
8970       # case insensitive, let's make it lowercase to improve readability.
8971       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8972       # Now convert it back to Unix-stile (cygpath)
8973       input_path=`$CYGPATH -u "$shortmode_path"`
8974       new_path="$input_path"
8975     fi
8976   fi
8977 
8978   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8979   if test "x$test_cygdrive_prefix" = x; then
8980     # As a simple fix, exclude /usr/bin since it's not a real path.
8981     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8982       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8983       # a path prefixed by /cygdrive for fixpath to work.
8984       new_path="$CYGWIN_ROOT_PATH$input_path"
8985     fi
8986   fi
8987 
8988   # remove trailing .exe if any
8989   new_path="${new_path/%.exe/}"
8990 
8991   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8992 
8993   # First separate the path from the arguments. This will split at the first
8994   # space.
8995   complete="$FOUND_MAKE"
8996   path="${complete%% *}"
8997   tmp="$complete EOL"
8998   arguments="${tmp#* }"
8999 
9000   # Input might be given as Windows format, start by converting to
9001   # unix format.
9002   new_path="$path"
9003 
9004   windows_path="$new_path"
9005   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9006     unix_path=`$CYGPATH -u "$windows_path"`
9007     new_path="$unix_path"
9008   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9009     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9010     new_path="$unix_path"
9011   fi
9012 
9013 
9014   # Now try to locate executable using which
9015   new_path=`$WHICH "$new_path" 2> /dev/null`
9016 
9017   if test "x$new_path" = x; then
9018     # Oops. Which didn't find the executable.
9019     # The splitting of arguments from the executable at a space might have been incorrect,
9020     # since paths with space are more likely in Windows. Give it another try with the whole
9021     # argument.
9022     path="$complete"
9023     arguments="EOL"
9024     new_path="$path"
9025 
9026   windows_path="$new_path"
9027   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9028     unix_path=`$CYGPATH -u "$windows_path"`
9029     new_path="$unix_path"
9030   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9031     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9032     new_path="$unix_path"
9033   fi
9034 
9035 
9036     new_path=`$WHICH "$new_path" 2> /dev/null`
9037 
9038     if test "x$new_path" = x; then
9039       # It's still not found. Now this is an unrecoverable error.
9040       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9041 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9042       has_space=`$ECHO "$complete" | $GREP " "`
9043       if test "x$has_space" != x; then
9044         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9045 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9046       fi
9047       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9048     fi
9049   fi
9050 
9051   # Now new_path has a complete unix path to the binary
9052   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9053     # Keep paths in /bin as-is, but remove trailing .exe if any
9054     new_path="${new_path/%.exe/}"
9055     # Do not save /bin paths to all_fixpath_prefixes!
9056   else
9057     # Not in mixed or Windows style, start by that.
9058     new_path=`cmd //c echo $new_path`
9059 
9060   input_path="$new_path"
9061   # Check if we need to convert this using DOS-style short mode. If the path
9062   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9063   # take no chances and rewrite it.
9064   # Note: m4 eats our [], so we need to use [ and ] instead.
9065   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9066   if test "x$has_forbidden_chars" != x; then
9067     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9068     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9069   fi
9070 
9071     # Output is in $new_path
9072 
9073   windows_path="$new_path"
9074   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9075     unix_path=`$CYGPATH -u "$windows_path"`
9076     new_path="$unix_path"
9077   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9078     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9079     new_path="$unix_path"
9080   fi
9081 
9082     # remove trailing .exe if any
9083     new_path="${new_path/%.exe/}"
9084 
9085     # Save the first 10 bytes of this path to the storage, so fixpath can work.
9086     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9087   fi
9088 
9089   else
9090     # We're on a posix platform. Hooray! :)
9091     # First separate the path from the arguments. This will split at the first
9092     # space.
9093     complete="$FOUND_MAKE"
9094     path="${complete%% *}"
9095     tmp="$complete EOL"
9096     arguments="${tmp#* }"
9097 
9098     # Cannot rely on the command "which" here since it doesn't always work.
9099     is_absolute_path=`$ECHO "$path" | $GREP ^/`
9100     if test -z "$is_absolute_path"; then
9101       # Path to executable is not absolute. Find it.
9102       IFS_save="$IFS"
9103       IFS=:
9104       for p in $PATH; do
9105         if test -f "$p/$path" && test -x "$p/$path"; then
9106           new_path="$p/$path"
9107           break
9108         fi
9109       done
9110       IFS="$IFS_save"
9111     else
9112       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9113 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9114       new_path="$path"
9115     fi
9116 
9117     if test "x$new_path" = x; then
9118         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9119 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9120         has_space=`$ECHO "$complete" | $GREP " "`
9121         if test "x$has_space" != x; then
9122           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9123 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9124         fi
9125         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9126       fi
9127   fi
9128 
9129       # Now join together the path and the arguments once again
9130       if test "x$arguments" != xEOL; then
9131         new_complete="$new_path ${arguments% *}"
9132       else
9133         new_complete="$new_path"
9134       fi
9135 
9136   if test "x$complete" != "x$new_complete"; then
9137       FOUND_MAKE="$new_complete"
9138       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9139 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9140     fi
9141 
9142         fi
9143       fi
9144     fi
9145   fi
9146 
9147     fi
9148 
9149     if test "x$FOUND_MAKE" = x; then
9150       if test "x$TOOLS_DIR" != x; then
9151         # We have a tools-dir, check that as well before giving up.
9152         OLD_PATH=$PATH
9153         PATH=$TOOLS_DIR:$PATH
9154         for ac_prog in gmake
9155 do
9156   # Extract the first word of "$ac_prog", so it can be a program name with args.
9157 set dummy $ac_prog; ac_word=$2
9158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9159 $as_echo_n "checking for $ac_word... " >&6; }
9160 if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
9161   $as_echo_n "(cached) " >&6
9162 else
9163   case $CHECK_TOOLSDIR_GMAKE in
9164   [\\/]* | ?:[\\/]*)
9165   ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
9166   ;;
9167   *)
9168   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9169 for as_dir in $PATH
9170 do
9171   IFS=$as_save_IFS
9172   test -z "$as_dir" && as_dir=.
9173     for ac_exec_ext in '' $ac_executable_extensions; do
9174   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9175     ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
9176     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9177     break 2
9178   fi
9179 done
9180   done
9181 IFS=$as_save_IFS
9182 
9183   ;;
9184 esac
9185 fi
9186 CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
9187 if test -n "$CHECK_TOOLSDIR_GMAKE"; then
9188   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
9189 $as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
9190 else
9191   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9192 $as_echo "no" >&6; }
9193 fi
9194 
9195 
9196   test -n "$CHECK_TOOLSDIR_GMAKE" && break
9197 done
9198 
9199 
9200   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
9201   DESCRIPTION="gmake in tools-dir"
9202   if test "x$MAKE_CANDIDATE" != x; then
9203     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9204 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9205     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9206     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9207     if test "x$IS_GNU_MAKE" = x; then
9208       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9209 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9210     else
9211       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9212       if test "x$IS_MODERN_MAKE" = x; then
9213         { $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
9214 $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;}
9215       else
9216         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9217           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9218             MAKE_EXPECTED_ENV='cygwin'
9219           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9220             MAKE_EXPECTED_ENV='msys'
9221           else
9222             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9223           fi
9224           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9225           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9226         else
9227           # Not relevant for non-Windows
9228           IS_MAKE_CORRECT_ENV=true
9229         fi
9230         if test "x$IS_MAKE_CORRECT_ENV" = x; then
9231           { $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
9232 $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;}
9233         else
9234           FOUND_MAKE=$MAKE_CANDIDATE
9235 
9236   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9237 
9238   # First separate the path from the arguments. This will split at the first
9239   # space.
9240   complete="$FOUND_MAKE"
9241   path="${complete%% *}"
9242   tmp="$complete EOL"
9243   arguments="${tmp#* }"
9244 
9245   # Input might be given as Windows format, start by converting to
9246   # unix format.
9247   new_path=`$CYGPATH -u "$path"`
9248 
9249   # Now try to locate executable using which
9250   new_path=`$WHICH "$new_path" 2> /dev/null`
9251   # bat and cmd files are not always considered executable in cygwin causing which
9252   # to not find them
9253   if test "x$new_path" = x \
9254            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9255            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9256     new_path=`$CYGPATH -u "$path"`
9257   fi
9258   if test "x$new_path" = x; then
9259     # Oops. Which didn't find the executable.
9260     # The splitting of arguments from the executable at a space might have been incorrect,
9261     # since paths with space are more likely in Windows. Give it another try with the whole
9262     # argument.
9263     path="$complete"
9264     arguments="EOL"
9265     new_path=`$CYGPATH -u "$path"`
9266     new_path=`$WHICH "$new_path" 2> /dev/null`
9267     # bat and cmd files are not always considered executable in cygwin causing which
9268     # to not find them
9269     if test "x$new_path" = x \
9270              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9271              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9272       new_path=`$CYGPATH -u "$path"`
9273     fi
9274     if test "x$new_path" = x; then
9275       # It's still not found. Now this is an unrecoverable error.
9276       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9277 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9278       has_space=`$ECHO "$complete" | $GREP " "`
9279       if test "x$has_space" != x; then
9280         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9281 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9282       fi
9283       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9284     fi
9285   fi
9286 
9287   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9288   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9289   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9290   # "foo.exe" is OK but "foo" is an error.
9291   #
9292   # This test is therefore slightly more accurate than "test -f" to check for file precense.
9293   # It is also a way to make sure we got the proper file name for the real test later on.
9294   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9295   if test "x$test_shortpath" = x; then
9296     # Short path failed, file does not exist as specified.
9297     # Try adding .exe or .cmd
9298     if test -f "${new_path}.exe"; then
9299        input_to_shortpath="${new_path}.exe"
9300     elif test -f "${new_path}.cmd"; then
9301        input_to_shortpath="${new_path}.cmd"
9302     else
9303       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9304 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9305       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9306 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9307       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9308     fi
9309   else
9310     input_to_shortpath="$new_path"
9311   fi
9312 
9313   # Call helper function which possibly converts this using DOS-style short mode.
9314   # If so, the updated path is stored in $new_path.
9315   new_path="$input_to_shortpath"
9316 
9317   input_path="$input_to_shortpath"
9318   # Check if we need to convert this using DOS-style short mode. If the path
9319   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9320   # take no chances and rewrite it.
9321   # Note: m4 eats our [], so we need to use [ and ] instead.
9322   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9323   if test "x$has_forbidden_chars" != x; then
9324     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9325     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9326     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9327     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9328       # Going to short mode and back again did indeed matter. Since short mode is
9329       # case insensitive, let's make it lowercase to improve readability.
9330       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9331       # Now convert it back to Unix-stile (cygpath)
9332       input_path=`$CYGPATH -u "$shortmode_path"`
9333       new_path="$input_path"
9334     fi
9335   fi
9336 
9337   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9338   if test "x$test_cygdrive_prefix" = x; then
9339     # As a simple fix, exclude /usr/bin since it's not a real path.
9340     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9341       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9342       # a path prefixed by /cygdrive for fixpath to work.
9343       new_path="$CYGWIN_ROOT_PATH$input_path"
9344     fi
9345   fi
9346 
9347   # remove trailing .exe if any
9348   new_path="${new_path/%.exe/}"
9349 
9350   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9351 
9352   # First separate the path from the arguments. This will split at the first
9353   # space.
9354   complete="$FOUND_MAKE"
9355   path="${complete%% *}"
9356   tmp="$complete EOL"
9357   arguments="${tmp#* }"
9358 
9359   # Input might be given as Windows format, start by converting to
9360   # unix format.
9361   new_path="$path"
9362 
9363   windows_path="$new_path"
9364   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9365     unix_path=`$CYGPATH -u "$windows_path"`
9366     new_path="$unix_path"
9367   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9368     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9369     new_path="$unix_path"
9370   fi
9371 
9372 
9373   # Now try to locate executable using which
9374   new_path=`$WHICH "$new_path" 2> /dev/null`
9375 
9376   if test "x$new_path" = x; then
9377     # Oops. Which didn't find the executable.
9378     # The splitting of arguments from the executable at a space might have been incorrect,
9379     # since paths with space are more likely in Windows. Give it another try with the whole
9380     # argument.
9381     path="$complete"
9382     arguments="EOL"
9383     new_path="$path"
9384 
9385   windows_path="$new_path"
9386   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9387     unix_path=`$CYGPATH -u "$windows_path"`
9388     new_path="$unix_path"
9389   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9390     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9391     new_path="$unix_path"
9392   fi
9393 
9394 
9395     new_path=`$WHICH "$new_path" 2> /dev/null`
9396 
9397     if test "x$new_path" = x; then
9398       # It's still not found. Now this is an unrecoverable error.
9399       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9400 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9401       has_space=`$ECHO "$complete" | $GREP " "`
9402       if test "x$has_space" != x; then
9403         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9404 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9405       fi
9406       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9407     fi
9408   fi
9409 
9410   # Now new_path has a complete unix path to the binary
9411   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9412     # Keep paths in /bin as-is, but remove trailing .exe if any
9413     new_path="${new_path/%.exe/}"
9414     # Do not save /bin paths to all_fixpath_prefixes!
9415   else
9416     # Not in mixed or Windows style, start by that.
9417     new_path=`cmd //c echo $new_path`
9418 
9419   input_path="$new_path"
9420   # Check if we need to convert this using DOS-style short mode. If the path
9421   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9422   # take no chances and rewrite it.
9423   # Note: m4 eats our [], so we need to use [ and ] instead.
9424   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9425   if test "x$has_forbidden_chars" != x; then
9426     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9427     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9428   fi
9429 
9430     # Output is in $new_path
9431 
9432   windows_path="$new_path"
9433   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9434     unix_path=`$CYGPATH -u "$windows_path"`
9435     new_path="$unix_path"
9436   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9437     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9438     new_path="$unix_path"
9439   fi
9440 
9441     # remove trailing .exe if any
9442     new_path="${new_path/%.exe/}"
9443 
9444     # Save the first 10 bytes of this path to the storage, so fixpath can work.
9445     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9446   fi
9447 
9448   else
9449     # We're on a posix platform. Hooray! :)
9450     # First separate the path from the arguments. This will split at the first
9451     # space.
9452     complete="$FOUND_MAKE"
9453     path="${complete%% *}"
9454     tmp="$complete EOL"
9455     arguments="${tmp#* }"
9456 
9457     # Cannot rely on the command "which" here since it doesn't always work.
9458     is_absolute_path=`$ECHO "$path" | $GREP ^/`
9459     if test -z "$is_absolute_path"; then
9460       # Path to executable is not absolute. Find it.
9461       IFS_save="$IFS"
9462       IFS=:
9463       for p in $PATH; do
9464         if test -f "$p/$path" && test -x "$p/$path"; then
9465           new_path="$p/$path"
9466           break
9467         fi
9468       done
9469       IFS="$IFS_save"
9470     else
9471       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9472 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9473       new_path="$path"
9474     fi
9475 
9476     if test "x$new_path" = x; then
9477         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9478 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9479         has_space=`$ECHO "$complete" | $GREP " "`
9480         if test "x$has_space" != x; then
9481           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9482 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9483         fi
9484         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9485       fi
9486   fi
9487 
9488       # Now join together the path and the arguments once again
9489       if test "x$arguments" != xEOL; then
9490         new_complete="$new_path ${arguments% *}"
9491       else
9492         new_complete="$new_path"
9493       fi
9494 
9495   if test "x$complete" != "x$new_complete"; then
9496       FOUND_MAKE="$new_complete"
9497       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9498 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9499     fi
9500 
9501         fi
9502       fi
9503     fi
9504   fi
9505 
9506         if test "x$FOUND_MAKE" = x; then
9507           for ac_prog in make
9508 do
9509   # Extract the first word of "$ac_prog", so it can be a program name with args.
9510 set dummy $ac_prog; ac_word=$2
9511 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9512 $as_echo_n "checking for $ac_word... " >&6; }
9513 if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
9514   $as_echo_n "(cached) " >&6
9515 else
9516   case $CHECK_TOOLSDIR_MAKE in
9517   [\\/]* | ?:[\\/]*)
9518   ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
9519   ;;
9520   *)
9521   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9522 for as_dir in $PATH
9523 do
9524   IFS=$as_save_IFS
9525   test -z "$as_dir" && as_dir=.
9526     for ac_exec_ext in '' $ac_executable_extensions; do
9527   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9528     ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
9529     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9530     break 2
9531   fi
9532 done
9533   done
9534 IFS=$as_save_IFS
9535 
9536   ;;
9537 esac
9538 fi
9539 CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
9540 if test -n "$CHECK_TOOLSDIR_MAKE"; then
9541   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
9542 $as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
9543 else
9544   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9545 $as_echo "no" >&6; }
9546 fi
9547 
9548 
9549   test -n "$CHECK_TOOLSDIR_MAKE" && break
9550 done
9551 
9552 
9553   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
9554   DESCRIPTION="make in tools-dir"
9555   if test "x$MAKE_CANDIDATE" != x; then
9556     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9557 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9558     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9559     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9560     if test "x$IS_GNU_MAKE" = x; then
9561       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9562 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9563     else
9564       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9565       if test "x$IS_MODERN_MAKE" = x; then
9566         { $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
9567 $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;}
9568       else
9569         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9570           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9571             MAKE_EXPECTED_ENV='cygwin'
9572           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9573             MAKE_EXPECTED_ENV='msys'
9574           else
9575             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9576           fi
9577           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9578           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9579         else
9580           # Not relevant for non-Windows
9581           IS_MAKE_CORRECT_ENV=true
9582         fi
9583         if test "x$IS_MAKE_CORRECT_ENV" = x; then
9584           { $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
9585 $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;}
9586         else
9587           FOUND_MAKE=$MAKE_CANDIDATE
9588 
9589   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9590 
9591   # First separate the path from the arguments. This will split at the first
9592   # space.
9593   complete="$FOUND_MAKE"
9594   path="${complete%% *}"
9595   tmp="$complete EOL"
9596   arguments="${tmp#* }"
9597 
9598   # Input might be given as Windows format, start by converting to
9599   # unix format.
9600   new_path=`$CYGPATH -u "$path"`
9601 
9602   # Now try to locate executable using which
9603   new_path=`$WHICH "$new_path" 2> /dev/null`
9604   # bat and cmd files are not always considered executable in cygwin causing which
9605   # to not find them
9606   if test "x$new_path" = x \
9607            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9608            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9609     new_path=`$CYGPATH -u "$path"`
9610   fi
9611   if test "x$new_path" = x; then
9612     # Oops. Which didn't find the executable.
9613     # The splitting of arguments from the executable at a space might have been incorrect,
9614     # since paths with space are more likely in Windows. Give it another try with the whole
9615     # argument.
9616     path="$complete"
9617     arguments="EOL"
9618     new_path=`$CYGPATH -u "$path"`
9619     new_path=`$WHICH "$new_path" 2> /dev/null`
9620     # bat and cmd files are not always considered executable in cygwin causing which
9621     # to not find them
9622     if test "x$new_path" = x \
9623              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9624              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9625       new_path=`$CYGPATH -u "$path"`
9626     fi
9627     if test "x$new_path" = x; then
9628       # It's still not found. Now this is an unrecoverable error.
9629       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9630 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9631       has_space=`$ECHO "$complete" | $GREP " "`
9632       if test "x$has_space" != x; then
9633         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9634 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9635       fi
9636       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9637     fi
9638   fi
9639 
9640   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9641   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9642   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9643   # "foo.exe" is OK but "foo" is an error.
9644   #
9645   # This test is therefore slightly more accurate than "test -f" to check for file precense.
9646   # It is also a way to make sure we got the proper file name for the real test later on.
9647   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9648   if test "x$test_shortpath" = x; then
9649     # Short path failed, file does not exist as specified.
9650     # Try adding .exe or .cmd
9651     if test -f "${new_path}.exe"; then
9652        input_to_shortpath="${new_path}.exe"
9653     elif test -f "${new_path}.cmd"; then
9654        input_to_shortpath="${new_path}.cmd"
9655     else
9656       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9657 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9658       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9659 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9660       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9661     fi
9662   else
9663     input_to_shortpath="$new_path"
9664   fi
9665 
9666   # Call helper function which possibly converts this using DOS-style short mode.
9667   # If so, the updated path is stored in $new_path.
9668   new_path="$input_to_shortpath"
9669 
9670   input_path="$input_to_shortpath"
9671   # Check if we need to convert this using DOS-style short mode. If the path
9672   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9673   # take no chances and rewrite it.
9674   # Note: m4 eats our [], so we need to use [ and ] instead.
9675   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9676   if test "x$has_forbidden_chars" != x; then
9677     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9678     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9679     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9680     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9681       # Going to short mode and back again did indeed matter. Since short mode is
9682       # case insensitive, let's make it lowercase to improve readability.
9683       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9684       # Now convert it back to Unix-stile (cygpath)
9685       input_path=`$CYGPATH -u "$shortmode_path"`
9686       new_path="$input_path"
9687     fi
9688   fi
9689 
9690   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9691   if test "x$test_cygdrive_prefix" = x; then
9692     # As a simple fix, exclude /usr/bin since it's not a real path.
9693     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9694       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9695       # a path prefixed by /cygdrive for fixpath to work.
9696       new_path="$CYGWIN_ROOT_PATH$input_path"
9697     fi
9698   fi
9699 
9700   # remove trailing .exe if any
9701   new_path="${new_path/%.exe/}"
9702 
9703   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9704 
9705   # First separate the path from the arguments. This will split at the first
9706   # space.
9707   complete="$FOUND_MAKE"
9708   path="${complete%% *}"
9709   tmp="$complete EOL"
9710   arguments="${tmp#* }"
9711 
9712   # Input might be given as Windows format, start by converting to
9713   # unix format.
9714   new_path="$path"
9715 
9716   windows_path="$new_path"
9717   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9718     unix_path=`$CYGPATH -u "$windows_path"`
9719     new_path="$unix_path"
9720   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9721     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9722     new_path="$unix_path"
9723   fi
9724 
9725 
9726   # Now try to locate executable using which
9727   new_path=`$WHICH "$new_path" 2> /dev/null`
9728 
9729   if test "x$new_path" = x; then
9730     # Oops. Which didn't find the executable.
9731     # The splitting of arguments from the executable at a space might have been incorrect,
9732     # since paths with space are more likely in Windows. Give it another try with the whole
9733     # argument.
9734     path="$complete"
9735     arguments="EOL"
9736     new_path="$path"
9737 
9738   windows_path="$new_path"
9739   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9740     unix_path=`$CYGPATH -u "$windows_path"`
9741     new_path="$unix_path"
9742   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9743     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9744     new_path="$unix_path"
9745   fi
9746 
9747 
9748     new_path=`$WHICH "$new_path" 2> /dev/null`
9749 
9750     if test "x$new_path" = x; then
9751       # It's still not found. Now this is an unrecoverable error.
9752       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9753 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9754       has_space=`$ECHO "$complete" | $GREP " "`
9755       if test "x$has_space" != x; then
9756         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9757 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9758       fi
9759       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9760     fi
9761   fi
9762 
9763   # Now new_path has a complete unix path to the binary
9764   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9765     # Keep paths in /bin as-is, but remove trailing .exe if any
9766     new_path="${new_path/%.exe/}"
9767     # Do not save /bin paths to all_fixpath_prefixes!
9768   else
9769     # Not in mixed or Windows style, start by that.
9770     new_path=`cmd //c echo $new_path`
9771 
9772   input_path="$new_path"
9773   # Check if we need to convert this using DOS-style short mode. If the path
9774   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9775   # take no chances and rewrite it.
9776   # Note: m4 eats our [], so we need to use [ and ] instead.
9777   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9778   if test "x$has_forbidden_chars" != x; then
9779     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9780     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9781   fi
9782 
9783     # Output is in $new_path
9784 
9785   windows_path="$new_path"
9786   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9787     unix_path=`$CYGPATH -u "$windows_path"`
9788     new_path="$unix_path"
9789   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9790     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9791     new_path="$unix_path"
9792   fi
9793 
9794     # remove trailing .exe if any
9795     new_path="${new_path/%.exe/}"
9796 
9797     # Save the first 10 bytes of this path to the storage, so fixpath can work.
9798     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9799   fi
9800 
9801   else
9802     # We're on a posix platform. Hooray! :)
9803     # First separate the path from the arguments. This will split at the first
9804     # space.
9805     complete="$FOUND_MAKE"
9806     path="${complete%% *}"
9807     tmp="$complete EOL"
9808     arguments="${tmp#* }"
9809 
9810     # Cannot rely on the command "which" here since it doesn't always work.
9811     is_absolute_path=`$ECHO "$path" | $GREP ^/`
9812     if test -z "$is_absolute_path"; then
9813       # Path to executable is not absolute. Find it.
9814       IFS_save="$IFS"
9815       IFS=:
9816       for p in $PATH; do
9817         if test -f "$p/$path" && test -x "$p/$path"; then
9818           new_path="$p/$path"
9819           break
9820         fi
9821       done
9822       IFS="$IFS_save"
9823     else
9824       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9825 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9826       new_path="$path"
9827     fi
9828 
9829     if test "x$new_path" = x; then
9830         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9831 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9832         has_space=`$ECHO "$complete" | $GREP " "`
9833         if test "x$has_space" != x; then
9834           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9835 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9836         fi
9837         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9838       fi
9839   fi
9840 
9841       # Now join together the path and the arguments once again
9842       if test "x$arguments" != xEOL; then
9843         new_complete="$new_path ${arguments% *}"
9844       else
9845         new_complete="$new_path"
9846       fi
9847 
9848   if test "x$complete" != "x$new_complete"; then
9849       FOUND_MAKE="$new_complete"
9850       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9851 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9852     fi
9853 
9854         fi
9855       fi
9856     fi
9857   fi
9858 
9859         fi
9860         PATH=$OLD_PATH
9861       fi
9862     fi
9863 
9864     if test "x$FOUND_MAKE" = x; then
9865       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
9866     fi
9867   fi
9868 
9869   MAKE=$FOUND_MAKE
9870 
9871   { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
9872 $as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
9873 
9874 
9875 
9876     # Test if find supports -delete
9877     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
9878 $as_echo_n "checking if find supports -delete... " >&6; }
9879     FIND_DELETE="-delete"
9880 
9881     DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
9882 
9883     echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
9884 
9885     TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
9886     if test -f $DELETEDIR/TestIfFindSupportsDelete; then
9887         # No, it does not.
9888         rm $DELETEDIR/TestIfFindSupportsDelete
9889         FIND_DELETE="-exec rm \{\} \+"
9890         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9891 $as_echo "no" >&6; }
9892     else
9893         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9894 $as_echo "yes" >&6; }
9895     fi
9896     rmdir $DELETEDIR
9897 
9898 
9899 
9900 # These tools might not be installed by default,
9901 # need hint on how to install them.
9902 
9903     for ac_prog in unzip
9904 do
9905   # Extract the first word of "$ac_prog", so it can be a program name with args.
9906 set dummy $ac_prog; ac_word=$2
9907 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9908 $as_echo_n "checking for $ac_word... " >&6; }
9909 if ${ac_cv_path_UNZIP+:} false; then :
9910   $as_echo_n "(cached) " >&6
9911 else
9912   case $UNZIP in
9913   [\\/]* | ?:[\\/]*)
9914   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
9915   ;;
9916   *)
9917   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9918 for as_dir in $PATH
9919 do
9920   IFS=$as_save_IFS
9921   test -z "$as_dir" && as_dir=.
9922     for ac_exec_ext in '' $ac_executable_extensions; do
9923   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9924     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
9925     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9926     break 2
9927   fi
9928 done
9929   done
9930 IFS=$as_save_IFS
9931 
9932   ;;
9933 esac
9934 fi
9935 UNZIP=$ac_cv_path_UNZIP
9936 if test -n "$UNZIP"; then
9937   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
9938 $as_echo "$UNZIP" >&6; }
9939 else
9940   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9941 $as_echo "no" >&6; }
9942 fi
9943 
9944 
9945   test -n "$UNZIP" && break
9946 done
9947 
9948 
9949     if test "x$UNZIP" = x; then
9950         if test "xunzip" = x; then
9951           PROG_NAME=unzip
9952         else
9953           PROG_NAME=unzip
9954         fi
9955         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
9956 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
9957         as_fn_error $? "Cannot continue" "$LINENO" 5
9958     fi
9959 
9960 
9961 
9962     for ac_prog in zip
9963 do
9964   # Extract the first word of "$ac_prog", so it can be a program name with args.
9965 set dummy $ac_prog; ac_word=$2
9966 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9967 $as_echo_n "checking for $ac_word... " >&6; }
9968 if ${ac_cv_path_ZIP+:} false; then :
9969   $as_echo_n "(cached) " >&6
9970 else
9971   case $ZIP in
9972   [\\/]* | ?:[\\/]*)
9973   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
9974   ;;
9975   *)
9976   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9977 for as_dir in $PATH
9978 do
9979   IFS=$as_save_IFS
9980   test -z "$as_dir" && as_dir=.
9981     for ac_exec_ext in '' $ac_executable_extensions; do
9982   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9983     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
9984     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9985     break 2
9986   fi
9987 done
9988   done
9989 IFS=$as_save_IFS
9990 
9991   ;;
9992 esac
9993 fi
9994 ZIP=$ac_cv_path_ZIP
9995 if test -n "$ZIP"; then
9996   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
9997 $as_echo "$ZIP" >&6; }
9998 else
9999   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10000 $as_echo "no" >&6; }
10001 fi
10002 
10003 
10004   test -n "$ZIP" && break
10005 done
10006 
10007 
10008     if test "x$ZIP" = x; then
10009         if test "xzip" = x; then
10010           PROG_NAME=zip
10011         else
10012           PROG_NAME=zip
10013         fi
10014         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10015 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10016         as_fn_error $? "Cannot continue" "$LINENO" 5
10017     fi
10018 
10019 
10020 
10021 # Non-required basic tools
10022 
10023 # Extract the first word of "ldd", so it can be a program name with args.
10024 set dummy ldd; ac_word=$2
10025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10026 $as_echo_n "checking for $ac_word... " >&6; }
10027 if ${ac_cv_path_LDD+:} false; then :
10028   $as_echo_n "(cached) " >&6
10029 else
10030   case $LDD in
10031   [\\/]* | ?:[\\/]*)
10032   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
10033   ;;
10034   *)
10035   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10036 for as_dir in $PATH
10037 do
10038   IFS=$as_save_IFS
10039   test -z "$as_dir" && as_dir=.
10040     for ac_exec_ext in '' $ac_executable_extensions; do
10041   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10042     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
10043     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10044     break 2
10045   fi
10046 done
10047   done
10048 IFS=$as_save_IFS
10049 
10050   ;;
10051 esac
10052 fi
10053 LDD=$ac_cv_path_LDD
10054 if test -n "$LDD"; then
10055   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
10056 $as_echo "$LDD" >&6; }
10057 else
10058   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10059 $as_echo "no" >&6; }
10060 fi
10061 
10062 
10063 if test "x$LDD" = "x"; then
10064     # List shared lib dependencies is used for
10065     # debug output and checking for forbidden dependencies.
10066     # We can build without it.
10067     LDD="true"
10068 fi
10069 # Extract the first word of "otool", so it can be a program name with args.
10070 set dummy otool; ac_word=$2
10071 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10072 $as_echo_n "checking for $ac_word... " >&6; }
10073 if ${ac_cv_path_OTOOL+:} false; then :
10074   $as_echo_n "(cached) " >&6
10075 else
10076   case $OTOOL in
10077   [\\/]* | ?:[\\/]*)
10078   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
10079   ;;
10080   *)
10081   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10082 for as_dir in $PATH
10083 do
10084   IFS=$as_save_IFS
10085   test -z "$as_dir" && as_dir=.
10086     for ac_exec_ext in '' $ac_executable_extensions; do
10087   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10088     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
10089     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10090     break 2
10091   fi
10092 done
10093   done
10094 IFS=$as_save_IFS
10095 
10096   ;;
10097 esac
10098 fi
10099 OTOOL=$ac_cv_path_OTOOL
10100 if test -n "$OTOOL"; then
10101   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
10102 $as_echo "$OTOOL" >&6; }
10103 else
10104   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10105 $as_echo "no" >&6; }
10106 fi
10107 
10108 
10109 if test "x$OTOOL" = "x"; then
10110    OTOOL="true"
10111 fi
10112 for ac_prog in readelf greadelf
10113 do
10114   # Extract the first word of "$ac_prog", so it can be a program name with args.
10115 set dummy $ac_prog; ac_word=$2
10116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10117 $as_echo_n "checking for $ac_word... " >&6; }
10118 if ${ac_cv_path_READELF+:} false; then :
10119   $as_echo_n "(cached) " >&6
10120 else
10121   case $READELF in
10122   [\\/]* | ?:[\\/]*)
10123   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
10124   ;;
10125   *)
10126   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10127 for as_dir in $PATH
10128 do
10129   IFS=$as_save_IFS
10130   test -z "$as_dir" && as_dir=.
10131     for ac_exec_ext in '' $ac_executable_extensions; do
10132   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10133     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
10134     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10135     break 2
10136   fi
10137 done
10138   done
10139 IFS=$as_save_IFS
10140 
10141   ;;
10142 esac
10143 fi
10144 READELF=$ac_cv_path_READELF
10145 if test -n "$READELF"; then
10146   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
10147 $as_echo "$READELF" >&6; }
10148 else
10149   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10150 $as_echo "no" >&6; }
10151 fi
10152 
10153 
10154   test -n "$READELF" && break
10155 done
10156 
10157 # Extract the first word of "hg", so it can be a program name with args.
10158 set dummy hg; ac_word=$2
10159 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10160 $as_echo_n "checking for $ac_word... " >&6; }
10161 if ${ac_cv_path_HG+:} false; then :
10162   $as_echo_n "(cached) " >&6
10163 else
10164   case $HG in
10165   [\\/]* | ?:[\\/]*)
10166   ac_cv_path_HG="$HG" # Let the user override the test with a path.
10167   ;;
10168   *)
10169   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10170 for as_dir in $PATH
10171 do
10172   IFS=$as_save_IFS
10173   test -z "$as_dir" && as_dir=.
10174     for ac_exec_ext in '' $ac_executable_extensions; do
10175   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10176     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
10177     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10178     break 2
10179   fi
10180 done
10181   done
10182 IFS=$as_save_IFS
10183 
10184   ;;
10185 esac
10186 fi
10187 HG=$ac_cv_path_HG
10188 if test -n "$HG"; then
10189   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
10190 $as_echo "$HG" >&6; }
10191 else
10192   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10193 $as_echo "no" >&6; }
10194 fi
10195 
10196 
10197 # Extract the first word of "stat", so it can be a program name with args.
10198 set dummy stat; ac_word=$2
10199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10200 $as_echo_n "checking for $ac_word... " >&6; }
10201 if ${ac_cv_path_STAT+:} false; then :
10202   $as_echo_n "(cached) " >&6
10203 else
10204   case $STAT in
10205   [\\/]* | ?:[\\/]*)
10206   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
10207   ;;
10208   *)
10209   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10210 for as_dir in $PATH
10211 do
10212   IFS=$as_save_IFS
10213   test -z "$as_dir" && as_dir=.
10214     for ac_exec_ext in '' $ac_executable_extensions; do
10215   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10216     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
10217     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10218     break 2
10219   fi
10220 done
10221   done
10222 IFS=$as_save_IFS
10223 
10224   ;;
10225 esac
10226 fi
10227 STAT=$ac_cv_path_STAT
10228 if test -n "$STAT"; then
10229   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
10230 $as_echo "$STAT" >&6; }
10231 else
10232   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10233 $as_echo "no" >&6; }
10234 fi
10235 
10236 
10237 # Extract the first word of "time", so it can be a program name with args.
10238 set dummy time; ac_word=$2
10239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10240 $as_echo_n "checking for $ac_word... " >&6; }
10241 if ${ac_cv_path_TIME+:} false; then :
10242   $as_echo_n "(cached) " >&6
10243 else
10244   case $TIME in
10245   [\\/]* | ?:[\\/]*)
10246   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
10247   ;;
10248   *)
10249   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10250 for as_dir in $PATH
10251 do
10252   IFS=$as_save_IFS
10253   test -z "$as_dir" && as_dir=.
10254     for ac_exec_ext in '' $ac_executable_extensions; do
10255   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10256     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
10257     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10258     break 2
10259   fi
10260 done
10261   done
10262 IFS=$as_save_IFS
10263 
10264   ;;
10265 esac
10266 fi
10267 TIME=$ac_cv_path_TIME
10268 if test -n "$TIME"; then
10269   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
10270 $as_echo "$TIME" >&6; }
10271 else
10272   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10273 $as_echo "no" >&6; }
10274 fi
10275 
10276 
10277 
10278 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
10279 
10280     for ac_prog in comm
10281 do
10282   # Extract the first word of "$ac_prog", so it can be a program name with args.
10283 set dummy $ac_prog; ac_word=$2
10284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10285 $as_echo_n "checking for $ac_word... " >&6; }
10286 if ${ac_cv_path_COMM+:} false; then :
10287   $as_echo_n "(cached) " >&6
10288 else
10289   case $COMM in
10290   [\\/]* | ?:[\\/]*)
10291   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
10292   ;;
10293   *)
10294   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10295 for as_dir in $PATH
10296 do
10297   IFS=$as_save_IFS
10298   test -z "$as_dir" && as_dir=.
10299     for ac_exec_ext in '' $ac_executable_extensions; do
10300   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10301     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
10302     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10303     break 2
10304   fi
10305 done
10306   done
10307 IFS=$as_save_IFS
10308 
10309   ;;
10310 esac
10311 fi
10312 COMM=$ac_cv_path_COMM
10313 if test -n "$COMM"; then
10314   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
10315 $as_echo "$COMM" >&6; }
10316 else
10317   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10318 $as_echo "no" >&6; }
10319 fi
10320 
10321 
10322   test -n "$COMM" && break
10323 done
10324 
10325 
10326     if test "x$COMM" = x; then
10327         if test "xcomm" = x; then
10328           PROG_NAME=comm
10329         else
10330           PROG_NAME=comm
10331         fi
10332         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10333 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10334         as_fn_error $? "Cannot continue" "$LINENO" 5
10335     fi
10336 
10337 
10338 fi
10339 
10340 if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
10341 
10342     for ac_prog in xattr
10343 do
10344   # Extract the first word of "$ac_prog", so it can be a program name with args.
10345 set dummy $ac_prog; ac_word=$2
10346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10347 $as_echo_n "checking for $ac_word... " >&6; }
10348 if ${ac_cv_path_XATTR+:} false; then :
10349   $as_echo_n "(cached) " >&6
10350 else
10351   case $XATTR in
10352   [\\/]* | ?:[\\/]*)
10353   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
10354   ;;
10355   *)
10356   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10357 for as_dir in $PATH
10358 do
10359   IFS=$as_save_IFS
10360   test -z "$as_dir" && as_dir=.
10361     for ac_exec_ext in '' $ac_executable_extensions; do
10362   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10363     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
10364     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10365     break 2
10366   fi
10367 done
10368   done
10369 IFS=$as_save_IFS
10370 
10371   ;;
10372 esac
10373 fi
10374 XATTR=$ac_cv_path_XATTR
10375 if test -n "$XATTR"; then
10376   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
10377 $as_echo "$XATTR" >&6; }
10378 else
10379   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10380 $as_echo "no" >&6; }
10381 fi
10382 
10383 
10384   test -n "$XATTR" && break
10385 done
10386 
10387 
10388     if test "x$XATTR" = x; then
10389         if test "xxattr" = x; then
10390           PROG_NAME=xattr
10391         else
10392           PROG_NAME=xattr
10393         fi
10394         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10395 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10396         as_fn_error $? "Cannot continue" "$LINENO" 5
10397     fi
10398 
10399 
10400   # Extract the first word of "codesign", so it can be a program name with args.
10401 set dummy codesign; ac_word=$2
10402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10403 $as_echo_n "checking for $ac_word... " >&6; }
10404 if ${ac_cv_path_CODESIGN+:} false; then :
10405   $as_echo_n "(cached) " >&6
10406 else
10407   case $CODESIGN in
10408   [\\/]* | ?:[\\/]*)
10409   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
10410   ;;
10411   *)
10412   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10413 for as_dir in $PATH
10414 do
10415   IFS=$as_save_IFS
10416   test -z "$as_dir" && as_dir=.
10417     for ac_exec_ext in '' $ac_executable_extensions; do
10418   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10419     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
10420     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10421     break 2
10422   fi
10423 done
10424   done
10425 IFS=$as_save_IFS
10426 
10427   ;;
10428 esac
10429 fi
10430 CODESIGN=$ac_cv_path_CODESIGN
10431 if test -n "$CODESIGN"; then
10432   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
10433 $as_echo "$CODESIGN" >&6; }
10434 else
10435   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10436 $as_echo "no" >&6; }
10437 fi
10438 
10439 
10440   if test "x$CODESIGN" != "x"; then
10441     # Verify that the openjdk_codesign certificate is present
10442     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
10443 $as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
10444     rm -f codesign-testfile
10445     touch codesign-testfile
10446     codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
10447     rm -f codesign-testfile
10448     if test "x$CODESIGN" = x; then
10449       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10450 $as_echo "no" >&6; }
10451     else
10452       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10453 $as_echo "yes" >&6; }
10454     fi
10455   fi
10456 fi
10457 
10458 
10459 # Check if pkg-config is available.
10460 
10461 
10462 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10463         if test -n "$ac_tool_prefix"; then
10464   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10465 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10466 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10467 $as_echo_n "checking for $ac_word... " >&6; }
10468 if ${ac_cv_path_PKG_CONFIG+:} false; then :
10469   $as_echo_n "(cached) " >&6
10470 else
10471   case $PKG_CONFIG in
10472   [\\/]* | ?:[\\/]*)
10473   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10474   ;;
10475   *)
10476   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10477 for as_dir in $PATH
10478 do
10479   IFS=$as_save_IFS
10480   test -z "$as_dir" && as_dir=.
10481     for ac_exec_ext in '' $ac_executable_extensions; do
10482   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10483     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10484     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10485     break 2
10486   fi
10487 done
10488   done
10489 IFS=$as_save_IFS
10490 
10491   ;;
10492 esac
10493 fi
10494 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10495 if test -n "$PKG_CONFIG"; then
10496   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10497 $as_echo "$PKG_CONFIG" >&6; }
10498 else
10499   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10500 $as_echo "no" >&6; }
10501 fi
10502 
10503 
10504 fi
10505 if test -z "$ac_cv_path_PKG_CONFIG"; then
10506   ac_pt_PKG_CONFIG=$PKG_CONFIG
10507   # Extract the first word of "pkg-config", so it can be a program name with args.
10508 set dummy pkg-config; ac_word=$2
10509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10510 $as_echo_n "checking for $ac_word... " >&6; }
10511 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10512   $as_echo_n "(cached) " >&6
10513 else
10514   case $ac_pt_PKG_CONFIG in
10515   [\\/]* | ?:[\\/]*)
10516   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10517   ;;
10518   *)
10519   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10520 for as_dir in $PATH
10521 do
10522   IFS=$as_save_IFS
10523   test -z "$as_dir" && as_dir=.
10524     for ac_exec_ext in '' $ac_executable_extensions; do
10525   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10526     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10527     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10528     break 2
10529   fi
10530 done
10531   done
10532 IFS=$as_save_IFS
10533 
10534   ;;
10535 esac
10536 fi
10537 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10538 if test -n "$ac_pt_PKG_CONFIG"; then
10539   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10540 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
10541 else
10542   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10543 $as_echo "no" >&6; }
10544 fi
10545 
10546   if test "x$ac_pt_PKG_CONFIG" = x; then
10547     PKG_CONFIG=""
10548   else
10549     case $cross_compiling:$ac_tool_warned in
10550 yes:)
10551 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10552 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10553 ac_tool_warned=yes ;;
10554 esac
10555     PKG_CONFIG=$ac_pt_PKG_CONFIG
10556   fi
10557 else
10558   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10559 fi
10560 
10561 fi
10562 if test -n "$PKG_CONFIG"; then
10563         _pkg_min_version=0.9.0
10564         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10565 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10566         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10567                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10568 $as_echo "yes" >&6; }
10569         else
10570                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10571 $as_echo "no" >&6; }
10572                 PKG_CONFIG=""
10573         fi
10574 
10575 fi
10576 
10577 # After basic tools have been setup, we can check build os specific details.
10578 
10579 ###############################################################################
10580 
10581 # Note that this is the build platform OS version!
10582 
10583 OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
10584 OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
10585 OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
10586 OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
10587 
10588 
10589 
10590 
10591 
10592 # Setup builddeps, for automatic downloading of tools we need.
10593 # This is needed before we can call BDEPS_CHECK_MODULE, which is done in
10594 # boot-jdk setup, but we need to have basic tools setup first.
10595 
10596 
10597 # Check whether --with-builddeps-conf was given.
10598 if test "${with_builddeps_conf+set}" = set; then :
10599   withval=$with_builddeps_conf;
10600 fi
10601 
10602 
10603 
10604 # Check whether --with-builddeps-server was given.
10605 if test "${with_builddeps_server+set}" = set; then :
10606   withval=$with_builddeps_server;
10607 fi
10608 
10609 
10610 
10611 # Check whether --with-builddeps-dir was given.
10612 if test "${with_builddeps_dir+set}" = set; then :
10613   withval=$with_builddeps_dir;
10614 else
10615   with_builddeps_dir=/localhome/builddeps
10616 fi
10617 
10618 
10619 
10620 # Check whether --with-builddeps-group was given.
10621 if test "${with_builddeps_group+set}" = set; then :
10622   withval=$with_builddeps_group;
10623 fi
10624 
10625 
10626 
10627 
10628     if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10629         if test "x$with_builddeps_conf" != x; then
10630             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
10631 $as_echo_n "checking for supplied builddeps configuration file... " >&6; }
10632             builddepsfile=$with_builddeps_conf
10633             if test -s $builddepsfile; then
10634                 . $builddepsfile
10635                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
10636 $as_echo "loaded!" >&6; }
10637             else
10638                as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
10639            fi
10640         else
10641             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
10642 $as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
10643             builddepsfile=`mktemp`
10644             touch $builddepsfile
10645             # Put all found confs into a single file.
10646             find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
10647             # Source the file to acquire the variables
10648             if test -s $builddepsfile; then
10649                 . $builddepsfile
10650                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
10651 $as_echo "found at least one!" >&6; }
10652             else
10653                as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
10654            fi
10655         fi
10656         # Create build and target names that use _ instead of "-" and ".".
10657         # This is necessary to use them in variable names.
10658         build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10659         target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10660         # Extract rewrite information for build and target
10661         eval rewritten_build=\${REWRITE_${build_var}}
10662         if test "x$rewritten_build" = x; then
10663             rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
10664             echo Build stays the same $rewritten_build
10665         else
10666             echo Rewriting build for builddeps into $rewritten_build
10667         fi
10668         eval rewritten_target=\${REWRITE_${target_var}}
10669         if test "x$rewritten_target" = x; then
10670             rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
10671             echo Target stays the same $rewritten_target
10672         else
10673             echo Rewriting target for builddeps into $rewritten_target
10674         fi
10675         rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
10676         rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
10677     fi
10678     for ac_prog in 7z unzip
10679 do
10680   # Extract the first word of "$ac_prog", so it can be a program name with args.
10681 set dummy $ac_prog; ac_word=$2
10682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10683 $as_echo_n "checking for $ac_word... " >&6; }
10684 if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
10685   $as_echo_n "(cached) " >&6
10686 else
10687   if test -n "$BDEPS_UNZIP"; then
10688   ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
10689 else
10690 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10691 for as_dir in $PATH
10692 do
10693   IFS=$as_save_IFS
10694   test -z "$as_dir" && as_dir=.
10695     for ac_exec_ext in '' $ac_executable_extensions; do
10696   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10697     ac_cv_prog_BDEPS_UNZIP="$ac_prog"
10698     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10699     break 2
10700   fi
10701 done
10702   done
10703 IFS=$as_save_IFS
10704 
10705 fi
10706 fi
10707 BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
10708 if test -n "$BDEPS_UNZIP"; then
10709   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
10710 $as_echo "$BDEPS_UNZIP" >&6; }
10711 else
10712   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10713 $as_echo "no" >&6; }
10714 fi
10715 
10716 
10717   test -n "$BDEPS_UNZIP" && break
10718 done
10719 
10720     if test "x$BDEPS_UNZIP" = x7z; then
10721         BDEPS_UNZIP="7z x"
10722     fi
10723 
10724     for ac_prog in wget lftp ftp
10725 do
10726   # Extract the first word of "$ac_prog", so it can be a program name with args.
10727 set dummy $ac_prog; ac_word=$2
10728 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10729 $as_echo_n "checking for $ac_word... " >&6; }
10730 if ${ac_cv_prog_BDEPS_FTP+:} false; then :
10731   $as_echo_n "(cached) " >&6
10732 else
10733   if test -n "$BDEPS_FTP"; then
10734   ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
10735 else
10736 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10737 for as_dir in $PATH
10738 do
10739   IFS=$as_save_IFS
10740   test -z "$as_dir" && as_dir=.
10741     for ac_exec_ext in '' $ac_executable_extensions; do
10742   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10743     ac_cv_prog_BDEPS_FTP="$ac_prog"
10744     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10745     break 2
10746   fi
10747 done
10748   done
10749 IFS=$as_save_IFS
10750 
10751 fi
10752 fi
10753 BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
10754 if test -n "$BDEPS_FTP"; then
10755   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
10756 $as_echo "$BDEPS_FTP" >&6; }
10757 else
10758   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10759 $as_echo "no" >&6; }
10760 fi
10761 
10762 
10763   test -n "$BDEPS_FTP" && break
10764 done
10765 
10766 
10767 
10768 ###############################################################################
10769 #
10770 # Determine OpenJDK variants, options and version numbers.
10771 #
10772 ###############################################################################
10773 
10774 # We need build & target for this.
10775 
10776 
10777 ###############################################################################
10778 #
10779 # Should we build a JDK/JVM with headful support (ie a graphical ui)?
10780 # We always build headless support.
10781 #
10782 { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
10783 $as_echo_n "checking headful support... " >&6; }
10784 # Check whether --enable-headful was given.
10785 if test "${enable_headful+set}" = set; then :
10786   enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
10787 else
10788   SUPPORT_HEADFUL=yes
10789 fi
10790 
10791 
10792 SUPPORT_HEADLESS=yes
10793 BUILD_HEADLESS="BUILD_HEADLESS:=true"
10794 
10795 if test "x$SUPPORT_HEADFUL" = xyes; then
10796     # We are building both headful and headless.
10797     headful_msg="inlude support for both headful and headless"
10798 fi
10799 
10800 if test "x$SUPPORT_HEADFUL" = xno; then
10801     # Thus we are building headless only.
10802     BUILD_HEADLESS="BUILD_HEADLESS:=true"
10803     headful_msg="headless only"
10804 fi
10805 
10806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
10807 $as_echo "$headful_msg" >&6; }
10808 
10809 
10810 
10811 
10812 
10813 # Control wether Hotspot runs Queens test after build.
10814 # Check whether --enable-hotspot-test-in-build was given.
10815 if test "${enable_hotspot_test_in_build+set}" = set; then :
10816   enableval=$enable_hotspot_test_in_build;
10817 else
10818   enable_hotspot_test_in_build=no
10819 fi
10820 
10821 if test "x$enable_hotspot_test_in_build" = "xyes"; then
10822     TEST_IN_BUILD=true
10823 else
10824     TEST_IN_BUILD=false
10825 fi
10826 
10827 
10828 ###############################################################################
10829 #
10830 # Choose cacerts source file
10831 #
10832 
10833 # Check whether --with-cacerts-file was given.
10834 if test "${with_cacerts_file+set}" = set; then :
10835   withval=$with_cacerts_file;
10836 fi
10837 
10838 if test "x$with_cacerts_file" != x; then
10839     CACERTS_FILE=$with_cacerts_file
10840 else
10841     if test "x$OPENJDK" = "xtrue"; then
10842         CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
10843     else
10844         CACERTS_FILE=${SRC_ROOT}/jdk/src/closed/share/lib/security/cacerts.internal
10845     fi
10846 fi
10847 
10848 
10849 ###############################################################################
10850 #
10851 # Enable or disable unlimited crypto
10852 #
10853 # Check whether --enable-unlimited-crypto was given.
10854 if test "${enable_unlimited_crypto+set}" = set; then :
10855   enableval=$enable_unlimited_crypto;
10856 else
10857   enable_unlimited_crypto=no
10858 fi
10859 
10860 if test "x$enable_unlimited_crypto" = "xyes"; then
10861     UNLIMITED_CRYPTO=true
10862 else
10863     UNLIMITED_CRYPTO=false
10864 fi
10865 
10866 
10867 ###############################################################################
10868 #
10869 # Enable or disable the elliptic curve crypto implementation
10870 #
10871 
10872 
10873 ###############################################################################
10874 #
10875 # Compress jars
10876 #
10877 COMPRESS_JARS=false
10878 
10879 
10880 
10881 
10882 # Source the version numbers
10883 . $AUTOCONF_DIR/version-numbers
10884 
10885 # Get the settings from parameters
10886 
10887 # Check whether --with-milestone was given.
10888 if test "${with_milestone+set}" = set; then :
10889   withval=$with_milestone;
10890 fi
10891 
10892 if test "x$with_milestone" = xyes; then
10893   as_fn_error $? "Milestone must have a value" "$LINENO" 5
10894 elif test "x$with_milestone" != x; then
10895     MILESTONE="$with_milestone"
10896 fi
10897 if test "x$MILESTONE" = x; then
10898   MILESTONE=internal
10899 fi
10900 
10901 
10902 # Check whether --with-update-version was given.
10903 if test "${with_update_version+set}" = set; then :
10904   withval=$with_update_version;
10905 fi
10906 
10907 if test "x$with_update_version" = xyes; then
10908   as_fn_error $? "Update version must have a value" "$LINENO" 5
10909 elif test "x$with_update_version" != x; then
10910   JDK_UPDATE_VERSION="$with_update_version"
10911 fi
10912 
10913 
10914 # Check whether --with-build-number was given.
10915 if test "${with_build_number+set}" = set; then :
10916   withval=$with_build_number;
10917 fi
10918 
10919 if test "x$with_build_number" = xyes; then
10920   as_fn_error $? "Build number must have a value" "$LINENO" 5
10921 elif test "x$with_build_number" != x; then
10922   JDK_BUILD_NUMBER="$with_build_number"
10923 fi
10924 if test "x$JDK_BUILD_NUMBER" = x; then
10925   JDK_BUILD_NUMBER=b00
10926 fi
10927 
10928 
10929 # Check whether --with-user-release-suffix was given.
10930 if test "${with_user_release_suffix+set}" = set; then :
10931   withval=$with_user_release_suffix;
10932 fi
10933 
10934 if test "x$with_user_release_suffix" = xyes; then
10935   as_fn_error $? "Release suffix must have a value" "$LINENO" 5
10936 elif test "x$with_user_release_suffix" != x; then
10937   USER_RELEASE_SUFFIX="$with_user_release_suffix"
10938 else
10939   BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
10940   # Avoid [:alnum:] since it depends on the locale.
10941   CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
10942   USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10943 fi
10944 
10945 
10946 # Now set the JDK version, milestone, build number etc.
10947 
10948 
10949 
10950 
10951 
10952 
10953 
10954 
10955 
10956 
10957 
10958 
10959 
10960 
10961 COPYRIGHT_YEAR=`date +'%Y'`
10962 
10963 
10964 if test "x$JDK_UPDATE_VERSION" != x; then
10965   JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
10966 else
10967   JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
10968 fi
10969 
10970 
10971 COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
10972 
10973 
10974 
10975 ###############################################################################
10976 #
10977 # Setup BootJDK, used to bootstrap the build.
10978 #
10979 ###############################################################################
10980 
10981 
10982 BOOT_JDK_FOUND=no
10983 
10984 # Check whether --with-boot-jdk was given.
10985 if test "${with_boot_jdk+set}" = set; then :
10986   withval=$with_boot_jdk;
10987 fi
10988 
10989 
10990 # We look for the Boot JDK through various means, going from more certain to
10991 # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
10992 # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
10993 # must check if this is indeed valid; otherwise we'll continue looking.
10994 
10995 # Test: Is bootjdk explicitely set by command line arguments?
10996 
10997   if test "x$BOOT_JDK_FOUND" = xno; then
10998     # Now execute the test
10999 
11000 if test "x$with_boot_jdk" != x; then
11001     BOOT_JDK=$with_boot_jdk
11002     BOOT_JDK_FOUND=maybe
11003     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
11004 $as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
11005 fi
11006 
11007 
11008     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11009     if test "x$BOOT_JDK_FOUND" = xmaybe; then
11010       # Do we have a bin/java?
11011       if test ! -x "$BOOT_JDK/bin/java"; then
11012         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11013 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11014         BOOT_JDK_FOUND=no
11015       else
11016         # Do we have a bin/javac?
11017         if test ! -x "$BOOT_JDK/bin/javac"; then
11018           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11019 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11020           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11021 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11022           BOOT_JDK_FOUND=no
11023         else
11024           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11025           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11026             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11027 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11028             BOOT_JDK_FOUND=no
11029           else
11030             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11031             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11032 
11033             # Extra M4 quote needed to protect [] in grep expression.
11034             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11035             if test "x$FOUND_VERSION_78" = x; then
11036               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11037 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11038               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11039 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11040               BOOT_JDK_FOUND=no
11041             else
11042               # We're done! :-)
11043               BOOT_JDK_FOUND=yes
11044 
11045   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11046 
11047   # Input might be given as Windows format, start by converting to
11048   # unix format.
11049   path="$BOOT_JDK"
11050   new_path=`$CYGPATH -u "$path"`
11051 
11052   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11053   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11054   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11055   # "foo.exe" is OK but "foo" is an error.
11056   #
11057   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11058   # It is also a way to make sure we got the proper file name for the real test later on.
11059   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11060   if test "x$test_shortpath" = x; then
11061     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11062 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11063     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11064   fi
11065 
11066   # Call helper function which possibly converts this using DOS-style short mode.
11067   # If so, the updated path is stored in $new_path.
11068 
11069   input_path="$new_path"
11070   # Check if we need to convert this using DOS-style short mode. If the path
11071   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11072   # take no chances and rewrite it.
11073   # Note: m4 eats our [], so we need to use [ and ] instead.
11074   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11075   if test "x$has_forbidden_chars" != x; then
11076     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11077     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11078     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11079     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11080       # Going to short mode and back again did indeed matter. Since short mode is
11081       # case insensitive, let's make it lowercase to improve readability.
11082       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11083       # Now convert it back to Unix-stile (cygpath)
11084       input_path=`$CYGPATH -u "$shortmode_path"`
11085       new_path="$input_path"
11086     fi
11087   fi
11088 
11089   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11090   if test "x$test_cygdrive_prefix" = x; then
11091     # As a simple fix, exclude /usr/bin since it's not a real path.
11092     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11093       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11094       # a path prefixed by /cygdrive for fixpath to work.
11095       new_path="$CYGWIN_ROOT_PATH$input_path"
11096     fi
11097   fi
11098 
11099 
11100   if test "x$path" != "x$new_path"; then
11101     BOOT_JDK="$new_path"
11102     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11103 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11104   fi
11105 
11106   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11107 
11108   path="$BOOT_JDK"
11109   has_colon=`$ECHO $path | $GREP ^.:`
11110   new_path="$path"
11111   if test "x$has_colon" = x; then
11112     # Not in mixed or Windows style, start by that.
11113     new_path=`cmd //c echo $path`
11114   fi
11115 
11116 
11117   input_path="$new_path"
11118   # Check if we need to convert this using DOS-style short mode. If the path
11119   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11120   # take no chances and rewrite it.
11121   # Note: m4 eats our [], so we need to use [ and ] instead.
11122   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11123   if test "x$has_forbidden_chars" != x; then
11124     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11125     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11126   fi
11127 
11128 
11129   windows_path="$new_path"
11130   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11131     unix_path=`$CYGPATH -u "$windows_path"`
11132     new_path="$unix_path"
11133   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11134     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11135     new_path="$unix_path"
11136   fi
11137 
11138   if test "x$path" != "x$new_path"; then
11139     BOOT_JDK="$new_path"
11140     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11141 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11142   fi
11143 
11144   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11145   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11146 
11147   else
11148     # We're on a posix platform. Hooray! :)
11149     path="$BOOT_JDK"
11150     has_space=`$ECHO "$path" | $GREP " "`
11151     if test "x$has_space" != x; then
11152       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11153 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11154       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11155     fi
11156 
11157     # Use eval to expand a potential ~
11158     eval path="$path"
11159     if test ! -f "$path" && test ! -d "$path"; then
11160       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11161     fi
11162 
11163     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11164   fi
11165 
11166               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11167 $as_echo_n "checking for Boot JDK... " >&6; }
11168               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11169 $as_echo "$BOOT_JDK" >&6; }
11170               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11171 $as_echo_n "checking Boot JDK version... " >&6; }
11172               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11173               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11174 $as_echo "$BOOT_JDK_VERSION" >&6; }
11175             fi # end check jdk version
11176           fi # end check rt.jar
11177         fi # end check javac
11178       fi # end check java
11179     fi # end check boot jdk found
11180   fi
11181 
11182 if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
11183   # Having specified an argument which is incorrect will produce an instant failure;
11184   # we should not go on looking
11185   as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
11186 fi
11187 
11188 # Test: Is bootjdk available from builddeps?
11189 
11190   if test "x$BOOT_JDK_FOUND" = xno; then
11191     # Now execute the test
11192 
11193 
11194 
11195     if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
11196         # Source the builddeps file again, to make sure it uses the latest variables!
11197         . $builddepsfile
11198         # Look for a target and build machine specific resource!
11199         eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
11200         if test "x$resource" = x; then
11201             # Ok, lets instead look for a target specific resource
11202             eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
11203         fi
11204         if test "x$resource" = x; then
11205             # Ok, lets instead look for a build specific resource
11206             eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
11207         fi
11208         if test "x$resource" = x; then
11209             # Ok, lets instead look for a generic resource
11210             # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
11211             resource=${builddep_bootjdk}
11212         fi
11213         if test "x$resource" != x; then
11214             { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
11215 $as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
11216             # If the resource in the builddeps.conf file is an existing directory,
11217             # for example /java/linux/cups
11218             if test -d ${resource}; then
11219                depdir=${resource}
11220             else
11221 
11222 # bootjdk is for example mymodule
11223 # $resource is for example libs/general/libmymod_1_2_3.zip
11224 # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
11225 # $with_builddeps_dir is for example /localhome/builddeps
11226 # depdir is the name of the variable into which we store the depdir, eg MYMOD
11227 # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
11228 # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
11229     filename=`basename $resource`
11230     filebase=`echo $filename | sed 's/\.[^\.]*$//'`
11231     filebase=${filename%%.*}
11232     extension=${filename#*.}
11233     installdir=$with_builddeps_dir/$filebase
11234     if test ! -f $installdir/$filename.unpacked; then
11235         { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
11236 $as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
11237         if test ! -d $installdir; then
11238             mkdir -p $installdir
11239         fi
11240         if test ! -d $installdir; then
11241             as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
11242         fi
11243         tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
11244         touch $tmpfile
11245         if test ! -f $tmpfile; then
11246             as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
11247         fi
11248 
11249     # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
11250     # $tmpfile is the local file name for the downloaded file.
11251     VALID_TOOL=no
11252     if test "x$BDEPS_FTP" = xwget; then
11253        VALID_TOOL=yes
11254        wget -O $tmpfile $with_builddeps_server/$resource
11255     fi
11256     if test "x$BDEPS_FTP" = xlftp; then
11257        VALID_TOOL=yes
11258        lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
11259     fi
11260     if test "x$BDEPS_FTP" = xftp; then
11261         VALID_TOOL=yes
11262         FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
11263         FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
11264         FTPUSERPWD=${FTPSERVER%%@*}
11265         if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
11266             FTPUSER=${userpwd%%:*}
11267             FTPPWD=${userpwd#*@}
11268             FTPSERVER=${FTPSERVER#*@}
11269         else
11270             FTPUSER=ftp
11271             FTPPWD=ftp
11272         fi
11273         # the "pass" command does not work on some
11274         # ftp clients (read ftp.exe) but if it works,
11275         # passive mode is better!
11276         (\
11277             echo "user $FTPUSER $FTPPWD"        ;\
11278             echo "pass"                         ;\
11279             echo "bin"                          ;\
11280             echo "get $FTPPATH $tmpfile"              ;\
11281         ) | ftp -in $FTPSERVER
11282     fi
11283     if test "x$VALID_TOOL" != xyes; then
11284        as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
11285     fi
11286 
11287         mv $tmpfile $installdir/$filename
11288         if test ! -s $installdir/$filename; then
11289             as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
11290         fi
11291         case "$extension" in
11292             zip)  echo "Unzipping $installdir/$filename..."
11293                (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
11294             ;;
11295             tar.gz) echo "Untaring $installdir/$filename..."
11296                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11297             ;;
11298             tgz) echo "Untaring $installdir/$filename..."
11299                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11300             ;;
11301             *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
11302             ;;
11303         esac
11304     fi
11305     if test -f $installdir/$filename.unpacked; then
11306         depdir=$installdir
11307     fi
11308 
11309             fi
11310             # Source the builddeps file again, because in the previous command, the depdir
11311             # was updated to point at the current build dependency install directory.
11312             . $builddepsfile
11313             # Now extract variables from the builddeps.conf files.
11314             theroot=${builddep_bootjdk_ROOT}
11315             thecflags=${builddep_bootjdk_CFLAGS}
11316             thelibs=${builddep_bootjdk_LIBS}
11317             if test "x$depdir" = x; then
11318                 as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
11319             fi
11320             BOOT_JDK=$depdir
11321             if test "x$theroot" != x; then
11322                BOOT_JDK="$theroot"
11323             fi
11324             if test "x$thecflags" != x; then
11325                BOOT_JDK_CFLAGS="$thecflags"
11326             fi
11327             if test "x$thelibs" != x; then
11328                BOOT_JDK_LIBS="$thelibs"
11329             fi
11330             BOOT_JDK_FOUND=maybe
11331             else BOOT_JDK_FOUND=no
11332 
11333         fi
11334         else BOOT_JDK_FOUND=no
11335 
11336     fi
11337 
11338 
11339 
11340     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11341     if test "x$BOOT_JDK_FOUND" = xmaybe; then
11342       # Do we have a bin/java?
11343       if test ! -x "$BOOT_JDK/bin/java"; then
11344         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11345 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11346         BOOT_JDK_FOUND=no
11347       else
11348         # Do we have a bin/javac?
11349         if test ! -x "$BOOT_JDK/bin/javac"; then
11350           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11351 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11352           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11353 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11354           BOOT_JDK_FOUND=no
11355         else
11356           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11357           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11358             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11359 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11360             BOOT_JDK_FOUND=no
11361           else
11362             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11363             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11364 
11365             # Extra M4 quote needed to protect [] in grep expression.
11366             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11367             if test "x$FOUND_VERSION_78" = x; then
11368               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11369 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11370               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11371 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11372               BOOT_JDK_FOUND=no
11373             else
11374               # We're done! :-)
11375               BOOT_JDK_FOUND=yes
11376 
11377   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11378 
11379   # Input might be given as Windows format, start by converting to
11380   # unix format.
11381   path="$BOOT_JDK"
11382   new_path=`$CYGPATH -u "$path"`
11383 
11384   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11385   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11386   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11387   # "foo.exe" is OK but "foo" is an error.
11388   #
11389   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11390   # It is also a way to make sure we got the proper file name for the real test later on.
11391   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11392   if test "x$test_shortpath" = x; then
11393     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11394 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11395     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11396   fi
11397 
11398   # Call helper function which possibly converts this using DOS-style short mode.
11399   # If so, the updated path is stored in $new_path.
11400 
11401   input_path="$new_path"
11402   # Check if we need to convert this using DOS-style short mode. If the path
11403   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11404   # take no chances and rewrite it.
11405   # Note: m4 eats our [], so we need to use [ and ] instead.
11406   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11407   if test "x$has_forbidden_chars" != x; then
11408     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11409     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11410     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11411     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11412       # Going to short mode and back again did indeed matter. Since short mode is
11413       # case insensitive, let's make it lowercase to improve readability.
11414       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11415       # Now convert it back to Unix-stile (cygpath)
11416       input_path=`$CYGPATH -u "$shortmode_path"`
11417       new_path="$input_path"
11418     fi
11419   fi
11420 
11421   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11422   if test "x$test_cygdrive_prefix" = x; then
11423     # As a simple fix, exclude /usr/bin since it's not a real path.
11424     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11425       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11426       # a path prefixed by /cygdrive for fixpath to work.
11427       new_path="$CYGWIN_ROOT_PATH$input_path"
11428     fi
11429   fi
11430 
11431 
11432   if test "x$path" != "x$new_path"; then
11433     BOOT_JDK="$new_path"
11434     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11435 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11436   fi
11437 
11438   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11439 
11440   path="$BOOT_JDK"
11441   has_colon=`$ECHO $path | $GREP ^.:`
11442   new_path="$path"
11443   if test "x$has_colon" = x; then
11444     # Not in mixed or Windows style, start by that.
11445     new_path=`cmd //c echo $path`
11446   fi
11447 
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     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11458   fi
11459 
11460 
11461   windows_path="$new_path"
11462   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11463     unix_path=`$CYGPATH -u "$windows_path"`
11464     new_path="$unix_path"
11465   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11466     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11467     new_path="$unix_path"
11468   fi
11469 
11470   if test "x$path" != "x$new_path"; then
11471     BOOT_JDK="$new_path"
11472     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11473 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11474   fi
11475 
11476   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11477   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11478 
11479   else
11480     # We're on a posix platform. Hooray! :)
11481     path="$BOOT_JDK"
11482     has_space=`$ECHO "$path" | $GREP " "`
11483     if test "x$has_space" != x; then
11484       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11485 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11486       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11487     fi
11488 
11489     # Use eval to expand a potential ~
11490     eval path="$path"
11491     if test ! -f "$path" && test ! -d "$path"; then
11492       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11493     fi
11494 
11495     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11496   fi
11497 
11498               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11499 $as_echo_n "checking for Boot JDK... " >&6; }
11500               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11501 $as_echo "$BOOT_JDK" >&6; }
11502               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11503 $as_echo_n "checking Boot JDK version... " >&6; }
11504               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11505               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11506 $as_echo "$BOOT_JDK_VERSION" >&6; }
11507             fi # end check jdk version
11508           fi # end check rt.jar
11509         fi # end check javac
11510       fi # end check java
11511     fi # end check boot jdk found
11512   fi
11513 
11514 
11515 # Test: Is $JAVA_HOME set?
11516 
11517   if test "x$BOOT_JDK_FOUND" = xno; then
11518     # Now execute the test
11519 
11520     if test "x$JAVA_HOME" != x; then
11521         JAVA_HOME_PROCESSED="$JAVA_HOME"
11522 
11523   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11524 
11525   # Input might be given as Windows format, start by converting to
11526   # unix format.
11527   path="$JAVA_HOME_PROCESSED"
11528   new_path=`$CYGPATH -u "$path"`
11529 
11530   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11531   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11532   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11533   # "foo.exe" is OK but "foo" is an error.
11534   #
11535   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11536   # It is also a way to make sure we got the proper file name for the real test later on.
11537   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11538   if test "x$test_shortpath" = x; then
11539     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11540 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11541     as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
11542   fi
11543 
11544   # Call helper function which possibly converts this using DOS-style short mode.
11545   # If so, the updated path is stored in $new_path.
11546 
11547   input_path="$new_path"
11548   # Check if we need to convert this using DOS-style short mode. If the path
11549   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11550   # take no chances and rewrite it.
11551   # Note: m4 eats our [], so we need to use [ and ] instead.
11552   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11553   if test "x$has_forbidden_chars" != x; then
11554     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11555     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11556     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11557     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11558       # Going to short mode and back again did indeed matter. Since short mode is
11559       # case insensitive, let's make it lowercase to improve readability.
11560       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11561       # Now convert it back to Unix-stile (cygpath)
11562       input_path=`$CYGPATH -u "$shortmode_path"`
11563       new_path="$input_path"
11564     fi
11565   fi
11566 
11567   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11568   if test "x$test_cygdrive_prefix" = x; then
11569     # As a simple fix, exclude /usr/bin since it's not a real path.
11570     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11571       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11572       # a path prefixed by /cygdrive for fixpath to work.
11573       new_path="$CYGWIN_ROOT_PATH$input_path"
11574     fi
11575   fi
11576 
11577 
11578   if test "x$path" != "x$new_path"; then
11579     JAVA_HOME_PROCESSED="$new_path"
11580     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11581 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11582   fi
11583 
11584   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11585 
11586   path="$JAVA_HOME_PROCESSED"
11587   has_colon=`$ECHO $path | $GREP ^.:`
11588   new_path="$path"
11589   if test "x$has_colon" = x; then
11590     # Not in mixed or Windows style, start by that.
11591     new_path=`cmd //c echo $path`
11592   fi
11593 
11594 
11595   input_path="$new_path"
11596   # Check if we need to convert this using DOS-style short mode. If the path
11597   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11598   # take no chances and rewrite it.
11599   # Note: m4 eats our [], so we need to use [ and ] instead.
11600   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11601   if test "x$has_forbidden_chars" != x; then
11602     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11603     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11604   fi
11605 
11606 
11607   windows_path="$new_path"
11608   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11609     unix_path=`$CYGPATH -u "$windows_path"`
11610     new_path="$unix_path"
11611   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11612     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11613     new_path="$unix_path"
11614   fi
11615 
11616   if test "x$path" != "x$new_path"; then
11617     JAVA_HOME_PROCESSED="$new_path"
11618     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11619 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11620   fi
11621 
11622   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11623   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11624 
11625   else
11626     # We're on a posix platform. Hooray! :)
11627     path="$JAVA_HOME_PROCESSED"
11628     has_space=`$ECHO "$path" | $GREP " "`
11629     if test "x$has_space" != x; then
11630       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11631 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11632       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11633     fi
11634 
11635     # Use eval to expand a potential ~
11636     eval path="$path"
11637     if test ! -f "$path" && test ! -d "$path"; then
11638       as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
11639     fi
11640 
11641     JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
11642   fi
11643 
11644         if test ! -d "$JAVA_HOME_PROCESSED"; then
11645             { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
11646 $as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
11647         else
11648           # Aha, the user has set a JAVA_HOME
11649           # let us use that as the Boot JDK.
11650           BOOT_JDK="$JAVA_HOME_PROCESSED"
11651           BOOT_JDK_FOUND=maybe
11652           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
11653 $as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
11654         fi
11655     fi
11656 
11657 
11658     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11659     if test "x$BOOT_JDK_FOUND" = xmaybe; then
11660       # Do we have a bin/java?
11661       if test ! -x "$BOOT_JDK/bin/java"; then
11662         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11663 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11664         BOOT_JDK_FOUND=no
11665       else
11666         # Do we have a bin/javac?
11667         if test ! -x "$BOOT_JDK/bin/javac"; then
11668           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11669 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11670           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11671 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11672           BOOT_JDK_FOUND=no
11673         else
11674           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11675           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11676             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11677 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11678             BOOT_JDK_FOUND=no
11679           else
11680             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11681             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11682 
11683             # Extra M4 quote needed to protect [] in grep expression.
11684             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11685             if test "x$FOUND_VERSION_78" = x; then
11686               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11687 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11688               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11689 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11690               BOOT_JDK_FOUND=no
11691             else
11692               # We're done! :-)
11693               BOOT_JDK_FOUND=yes
11694 
11695   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11696 
11697   # Input might be given as Windows format, start by converting to
11698   # unix format.
11699   path="$BOOT_JDK"
11700   new_path=`$CYGPATH -u "$path"`
11701 
11702   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11703   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11704   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11705   # "foo.exe" is OK but "foo" is an error.
11706   #
11707   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11708   # It is also a way to make sure we got the proper file name for the real test later on.
11709   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11710   if test "x$test_shortpath" = x; then
11711     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11712 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11713     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11714   fi
11715 
11716   # Call helper function which possibly converts this using DOS-style short mode.
11717   # If so, the updated path is stored in $new_path.
11718 
11719   input_path="$new_path"
11720   # Check if we need to convert this using DOS-style short mode. If the path
11721   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11722   # take no chances and rewrite it.
11723   # Note: m4 eats our [], so we need to use [ and ] instead.
11724   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11725   if test "x$has_forbidden_chars" != x; then
11726     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11727     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11728     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11729     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11730       # Going to short mode and back again did indeed matter. Since short mode is
11731       # case insensitive, let's make it lowercase to improve readability.
11732       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11733       # Now convert it back to Unix-stile (cygpath)
11734       input_path=`$CYGPATH -u "$shortmode_path"`
11735       new_path="$input_path"
11736     fi
11737   fi
11738 
11739   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11740   if test "x$test_cygdrive_prefix" = x; then
11741     # As a simple fix, exclude /usr/bin since it's not a real path.
11742     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11743       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11744       # a path prefixed by /cygdrive for fixpath to work.
11745       new_path="$CYGWIN_ROOT_PATH$input_path"
11746     fi
11747   fi
11748 
11749 
11750   if test "x$path" != "x$new_path"; then
11751     BOOT_JDK="$new_path"
11752     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11753 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11754   fi
11755 
11756   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11757 
11758   path="$BOOT_JDK"
11759   has_colon=`$ECHO $path | $GREP ^.:`
11760   new_path="$path"
11761   if test "x$has_colon" = x; then
11762     # Not in mixed or Windows style, start by that.
11763     new_path=`cmd //c echo $path`
11764   fi
11765 
11766 
11767   input_path="$new_path"
11768   # Check if we need to convert this using DOS-style short mode. If the path
11769   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11770   # take no chances and rewrite it.
11771   # Note: m4 eats our [], so we need to use [ and ] instead.
11772   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11773   if test "x$has_forbidden_chars" != x; then
11774     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11775     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11776   fi
11777 
11778 
11779   windows_path="$new_path"
11780   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11781     unix_path=`$CYGPATH -u "$windows_path"`
11782     new_path="$unix_path"
11783   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11784     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11785     new_path="$unix_path"
11786   fi
11787 
11788   if test "x$path" != "x$new_path"; then
11789     BOOT_JDK="$new_path"
11790     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11791 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11792   fi
11793 
11794   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11795   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11796 
11797   else
11798     # We're on a posix platform. Hooray! :)
11799     path="$BOOT_JDK"
11800     has_space=`$ECHO "$path" | $GREP " "`
11801     if test "x$has_space" != x; then
11802       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11803 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11804       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11805     fi
11806 
11807     # Use eval to expand a potential ~
11808     eval path="$path"
11809     if test ! -f "$path" && test ! -d "$path"; then
11810       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11811     fi
11812 
11813     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11814   fi
11815 
11816               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11817 $as_echo_n "checking for Boot JDK... " >&6; }
11818               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11819 $as_echo "$BOOT_JDK" >&6; }
11820               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11821 $as_echo_n "checking Boot JDK version... " >&6; }
11822               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11823               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11824 $as_echo "$BOOT_JDK_VERSION" >&6; }
11825             fi # end check jdk version
11826           fi # end check rt.jar
11827         fi # end check javac
11828       fi # end check java
11829     fi # end check boot jdk found
11830   fi
11831 
11832 
11833 # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
11834 
11835   if test "x$BOOT_JDK_FOUND" = xno; then
11836     # Now execute the test
11837 
11838     if test -x /usr/libexec/java_home; then
11839         BOOT_JDK=`/usr/libexec/java_home`
11840         BOOT_JDK_FOUND=maybe
11841         { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
11842 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
11843     fi
11844 
11845 
11846     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11847     if test "x$BOOT_JDK_FOUND" = xmaybe; then
11848       # Do we have a bin/java?
11849       if test ! -x "$BOOT_JDK/bin/java"; then
11850         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11851 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11852         BOOT_JDK_FOUND=no
11853       else
11854         # Do we have a bin/javac?
11855         if test ! -x "$BOOT_JDK/bin/javac"; then
11856           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11857 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11858           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11859 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11860           BOOT_JDK_FOUND=no
11861         else
11862           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11863           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11864             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11865 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11866             BOOT_JDK_FOUND=no
11867           else
11868             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11869             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11870 
11871             # Extra M4 quote needed to protect [] in grep expression.
11872             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11873             if test "x$FOUND_VERSION_78" = x; then
11874               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11875 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11876               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11877 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11878               BOOT_JDK_FOUND=no
11879             else
11880               # We're done! :-)
11881               BOOT_JDK_FOUND=yes
11882 
11883   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11884 
11885   # Input might be given as Windows format, start by converting to
11886   # unix format.
11887   path="$BOOT_JDK"
11888   new_path=`$CYGPATH -u "$path"`
11889 
11890   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11891   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11892   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11893   # "foo.exe" is OK but "foo" is an error.
11894   #
11895   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11896   # It is also a way to make sure we got the proper file name for the real test later on.
11897   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11898   if test "x$test_shortpath" = x; then
11899     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11900 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11901     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11902   fi
11903 
11904   # Call helper function which possibly converts this using DOS-style short mode.
11905   # If so, the updated path is stored in $new_path.
11906 
11907   input_path="$new_path"
11908   # Check if we need to convert this using DOS-style short mode. If the path
11909   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11910   # take no chances and rewrite it.
11911   # Note: m4 eats our [], so we need to use [ and ] instead.
11912   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11913   if test "x$has_forbidden_chars" != x; then
11914     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11915     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11916     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11917     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11918       # Going to short mode and back again did indeed matter. Since short mode is
11919       # case insensitive, let's make it lowercase to improve readability.
11920       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11921       # Now convert it back to Unix-stile (cygpath)
11922       input_path=`$CYGPATH -u "$shortmode_path"`
11923       new_path="$input_path"
11924     fi
11925   fi
11926 
11927   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11928   if test "x$test_cygdrive_prefix" = x; then
11929     # As a simple fix, exclude /usr/bin since it's not a real path.
11930     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11931       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11932       # a path prefixed by /cygdrive for fixpath to work.
11933       new_path="$CYGWIN_ROOT_PATH$input_path"
11934     fi
11935   fi
11936 
11937 
11938   if test "x$path" != "x$new_path"; then
11939     BOOT_JDK="$new_path"
11940     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11941 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11942   fi
11943 
11944   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11945 
11946   path="$BOOT_JDK"
11947   has_colon=`$ECHO $path | $GREP ^.:`
11948   new_path="$path"
11949   if test "x$has_colon" = x; then
11950     # Not in mixed or Windows style, start by that.
11951     new_path=`cmd //c echo $path`
11952   fi
11953 
11954 
11955   input_path="$new_path"
11956   # Check if we need to convert this using DOS-style short mode. If the path
11957   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11958   # take no chances and rewrite it.
11959   # Note: m4 eats our [], so we need to use [ and ] instead.
11960   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11961   if test "x$has_forbidden_chars" != x; then
11962     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11963     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11964   fi
11965 
11966 
11967   windows_path="$new_path"
11968   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11969     unix_path=`$CYGPATH -u "$windows_path"`
11970     new_path="$unix_path"
11971   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11972     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11973     new_path="$unix_path"
11974   fi
11975 
11976   if test "x$path" != "x$new_path"; then
11977     BOOT_JDK="$new_path"
11978     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11979 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11980   fi
11981 
11982   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11983   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11984 
11985   else
11986     # We're on a posix platform. Hooray! :)
11987     path="$BOOT_JDK"
11988     has_space=`$ECHO "$path" | $GREP " "`
11989     if test "x$has_space" != x; then
11990       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11991 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11992       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11993     fi
11994 
11995     # Use eval to expand a potential ~
11996     eval path="$path"
11997     if test ! -f "$path" && test ! -d "$path"; then
11998       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11999     fi
12000 
12001     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12002   fi
12003 
12004               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12005 $as_echo_n "checking for Boot JDK... " >&6; }
12006               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12007 $as_echo "$BOOT_JDK" >&6; }
12008               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12009 $as_echo_n "checking Boot JDK version... " >&6; }
12010               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12011               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12012 $as_echo "$BOOT_JDK_VERSION" >&6; }
12013             fi # end check jdk version
12014           fi # end check rt.jar
12015         fi # end check javac
12016       fi # end check java
12017     fi # end check boot jdk found
12018   fi
12019 
12020 
12021 # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
12022 
12023   if test "x$BOOT_JDK_FOUND" = xno; then
12024     # Now execute the test
12025 
12026     # Extract the first word of "javac", so it can be a program name with args.
12027 set dummy javac; ac_word=$2
12028 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12029 $as_echo_n "checking for $ac_word... " >&6; }
12030 if ${ac_cv_path_JAVAC_CHECK+:} false; then :
12031   $as_echo_n "(cached) " >&6
12032 else
12033   case $JAVAC_CHECK in
12034   [\\/]* | ?:[\\/]*)
12035   ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
12036   ;;
12037   *)
12038   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12039 for as_dir in $PATH
12040 do
12041   IFS=$as_save_IFS
12042   test -z "$as_dir" && as_dir=.
12043     for ac_exec_ext in '' $ac_executable_extensions; do
12044   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12045     ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
12046     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12047     break 2
12048   fi
12049 done
12050   done
12051 IFS=$as_save_IFS
12052 
12053   ;;
12054 esac
12055 fi
12056 JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
12057 if test -n "$JAVAC_CHECK"; then
12058   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
12059 $as_echo "$JAVAC_CHECK" >&6; }
12060 else
12061   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12062 $as_echo "no" >&6; }
12063 fi
12064 
12065 
12066     # Extract the first word of "java", so it can be a program name with args.
12067 set dummy java; ac_word=$2
12068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12069 $as_echo_n "checking for $ac_word... " >&6; }
12070 if ${ac_cv_path_JAVA_CHECK+:} false; then :
12071   $as_echo_n "(cached) " >&6
12072 else
12073   case $JAVA_CHECK in
12074   [\\/]* | ?:[\\/]*)
12075   ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
12076   ;;
12077   *)
12078   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12079 for as_dir in $PATH
12080 do
12081   IFS=$as_save_IFS
12082   test -z "$as_dir" && as_dir=.
12083     for ac_exec_ext in '' $ac_executable_extensions; do
12084   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12085     ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
12086     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12087     break 2
12088   fi
12089 done
12090   done
12091 IFS=$as_save_IFS
12092 
12093   ;;
12094 esac
12095 fi
12096 JAVA_CHECK=$ac_cv_path_JAVA_CHECK
12097 if test -n "$JAVA_CHECK"; then
12098   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
12099 $as_echo "$JAVA_CHECK" >&6; }
12100 else
12101   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12102 $as_echo "no" >&6; }
12103 fi
12104 
12105 
12106     BINARY="$JAVAC_CHECK"
12107     if test "x$JAVAC_CHECK" = x; then
12108         BINARY="$JAVA_CHECK"
12109     fi
12110     if test "x$BINARY" != x; then
12111         # So there is a java(c) binary, it might be part of a JDK.
12112         # Lets find the JDK/JRE directory by following symbolic links.
12113         # Linux/GNU systems often have links from /usr/bin/java to
12114         # /etc/alternatives/java to the real JDK binary.
12115 
12116     if test "x$OPENJDK_BUILD_OS" != xwindows; then
12117         # Follow a chain of symbolic links. Use readlink
12118         # where it exists, else fall back to horribly
12119         # complicated shell code.
12120         if test "x$READLINK_TESTED" != yes; then
12121             # On MacOSX there is a readlink tool with a different
12122             # purpose than the GNU readlink tool. Check the found readlink.
12123             ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
12124             if test "x$ISGNU" = x; then
12125                  # A readlink that we do not know how to use.
12126                  # Are there other non-GNU readlinks out there?
12127                  READLINK_TESTED=yes
12128                  READLINK=
12129             fi
12130         fi
12131 
12132         if test "x$READLINK" != x; then
12133             BINARY=`$READLINK -f $BINARY`
12134         else
12135             # Save the current directory for restoring afterwards
12136             STARTDIR=$PWD
12137             COUNTER=0
12138             sym_link_dir=`$DIRNAME $BINARY`
12139             sym_link_file=`$BASENAME $BINARY`
12140             cd $sym_link_dir
12141             # Use -P flag to resolve symlinks in directories.
12142             cd `$THEPWDCMD -P`
12143             sym_link_dir=`$THEPWDCMD -P`
12144             # Resolve file symlinks
12145             while test $COUNTER -lt 20; do
12146                 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
12147                 if test "x$ISLINK" == x; then
12148                     # This is not a symbolic link! We are done!
12149                     break
12150                 fi
12151                 # Again resolve directory symlinks since the target of the just found
12152                 # link could be in a different directory
12153                 cd `$DIRNAME $ISLINK`
12154                 sym_link_dir=`$THEPWDCMD -P`
12155                 sym_link_file=`$BASENAME $ISLINK`
12156                 let COUNTER=COUNTER+1
12157             done
12158             cd $STARTDIR
12159             BINARY=$sym_link_dir/$sym_link_file
12160         fi
12161     fi
12162 
12163         BOOT_JDK=`dirname "$BINARY"`
12164         BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
12165         if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
12166             # Looks like we found ourselves an JDK
12167             BOOT_JDK_FOUND=maybe
12168             { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
12169 $as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
12170         fi
12171     fi
12172 
12173 
12174     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12175     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12176       # Do we have a bin/java?
12177       if test ! -x "$BOOT_JDK/bin/java"; then
12178         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12179 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12180         BOOT_JDK_FOUND=no
12181       else
12182         # Do we have a bin/javac?
12183         if test ! -x "$BOOT_JDK/bin/javac"; then
12184           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12185 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12186           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12187 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12188           BOOT_JDK_FOUND=no
12189         else
12190           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12191           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12192             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12193 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12194             BOOT_JDK_FOUND=no
12195           else
12196             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12197             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12198 
12199             # Extra M4 quote needed to protect [] in grep expression.
12200             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12201             if test "x$FOUND_VERSION_78" = x; then
12202               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12203 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12204               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12205 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12206               BOOT_JDK_FOUND=no
12207             else
12208               # We're done! :-)
12209               BOOT_JDK_FOUND=yes
12210 
12211   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12212 
12213   # Input might be given as Windows format, start by converting to
12214   # unix format.
12215   path="$BOOT_JDK"
12216   new_path=`$CYGPATH -u "$path"`
12217 
12218   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12219   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12220   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12221   # "foo.exe" is OK but "foo" is an error.
12222   #
12223   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12224   # It is also a way to make sure we got the proper file name for the real test later on.
12225   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12226   if test "x$test_shortpath" = x; then
12227     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12228 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12229     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12230   fi
12231 
12232   # Call helper function which possibly converts this using DOS-style short mode.
12233   # If so, the updated path is stored in $new_path.
12234 
12235   input_path="$new_path"
12236   # Check if we need to convert this using DOS-style short mode. If the path
12237   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12238   # take no chances and rewrite it.
12239   # Note: m4 eats our [], so we need to use [ and ] instead.
12240   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12241   if test "x$has_forbidden_chars" != x; then
12242     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12243     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12244     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12245     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12246       # Going to short mode and back again did indeed matter. Since short mode is
12247       # case insensitive, let's make it lowercase to improve readability.
12248       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12249       # Now convert it back to Unix-stile (cygpath)
12250       input_path=`$CYGPATH -u "$shortmode_path"`
12251       new_path="$input_path"
12252     fi
12253   fi
12254 
12255   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12256   if test "x$test_cygdrive_prefix" = x; then
12257     # As a simple fix, exclude /usr/bin since it's not a real path.
12258     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12259       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12260       # a path prefixed by /cygdrive for fixpath to work.
12261       new_path="$CYGWIN_ROOT_PATH$input_path"
12262     fi
12263   fi
12264 
12265 
12266   if test "x$path" != "x$new_path"; then
12267     BOOT_JDK="$new_path"
12268     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12269 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12270   fi
12271 
12272   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12273 
12274   path="$BOOT_JDK"
12275   has_colon=`$ECHO $path | $GREP ^.:`
12276   new_path="$path"
12277   if test "x$has_colon" = x; then
12278     # Not in mixed or Windows style, start by that.
12279     new_path=`cmd //c echo $path`
12280   fi
12281 
12282 
12283   input_path="$new_path"
12284   # Check if we need to convert this using DOS-style short mode. If the path
12285   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12286   # take no chances and rewrite it.
12287   # Note: m4 eats our [], so we need to use [ and ] instead.
12288   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12289   if test "x$has_forbidden_chars" != x; then
12290     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12291     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12292   fi
12293 
12294 
12295   windows_path="$new_path"
12296   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12297     unix_path=`$CYGPATH -u "$windows_path"`
12298     new_path="$unix_path"
12299   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12300     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12301     new_path="$unix_path"
12302   fi
12303 
12304   if test "x$path" != "x$new_path"; then
12305     BOOT_JDK="$new_path"
12306     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12307 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12308   fi
12309 
12310   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12311   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12312 
12313   else
12314     # We're on a posix platform. Hooray! :)
12315     path="$BOOT_JDK"
12316     has_space=`$ECHO "$path" | $GREP " "`
12317     if test "x$has_space" != x; then
12318       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12319 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12320       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12321     fi
12322 
12323     # Use eval to expand a potential ~
12324     eval path="$path"
12325     if test ! -f "$path" && test ! -d "$path"; then
12326       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12327     fi
12328 
12329     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12330   fi
12331 
12332               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12333 $as_echo_n "checking for Boot JDK... " >&6; }
12334               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12335 $as_echo "$BOOT_JDK" >&6; }
12336               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12337 $as_echo_n "checking Boot JDK version... " >&6; }
12338               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12339               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12340 $as_echo "$BOOT_JDK_VERSION" >&6; }
12341             fi # end check jdk version
12342           fi # end check rt.jar
12343         fi # end check javac
12344       fi # end check java
12345     fi # end check boot jdk found
12346   fi
12347 
12348 
12349 # Test: Is there a JDK installed in default, well-known locations?
12350 
12351   if test "x$BOOT_JDK_FOUND" = xno; then
12352     # Now execute the test
12353 
12354   if test "x$OPENJDK_TARGET_OS" = xwindows; then
12355 
12356   if test "x$BOOT_JDK_FOUND" = xno; then
12357     # Now execute the test
12358 
12359   if test "x$ProgramW6432" != x; then
12360     VIRTUAL_DIR="$ProgramW6432/Java"
12361 
12362   windows_path="$VIRTUAL_DIR"
12363   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12364     unix_path=`$CYGPATH -u "$windows_path"`
12365     VIRTUAL_DIR="$unix_path"
12366   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12367     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12368     VIRTUAL_DIR="$unix_path"
12369   fi
12370 
12371 
12372   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12373   BOOT_JDK_SUFFIX=""
12374   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12375   if test "x$ALL_JDKS_FOUND" != x; then
12376     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12377 
12378   if test "x$BOOT_JDK_FOUND" = xno; then
12379     # Now execute the test
12380 
12381         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12382         if test -d "$BOOT_JDK"; then
12383           BOOT_JDK_FOUND=maybe
12384           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12385 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12386         fi
12387 
12388 
12389     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12390     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12391       # Do we have a bin/java?
12392       if test ! -x "$BOOT_JDK/bin/java"; then
12393         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12394 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12395         BOOT_JDK_FOUND=no
12396       else
12397         # Do we have a bin/javac?
12398         if test ! -x "$BOOT_JDK/bin/javac"; then
12399           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12400 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12401           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12402 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12403           BOOT_JDK_FOUND=no
12404         else
12405           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12406           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12407             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12408 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12409             BOOT_JDK_FOUND=no
12410           else
12411             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12412             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12413 
12414             # Extra M4 quote needed to protect [] in grep expression.
12415             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12416             if test "x$FOUND_VERSION_78" = x; then
12417               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12418 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12419               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12420 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12421               BOOT_JDK_FOUND=no
12422             else
12423               # We're done! :-)
12424               BOOT_JDK_FOUND=yes
12425 
12426   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12427 
12428   # Input might be given as Windows format, start by converting to
12429   # unix format.
12430   path="$BOOT_JDK"
12431   new_path=`$CYGPATH -u "$path"`
12432 
12433   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12434   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12435   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12436   # "foo.exe" is OK but "foo" is an error.
12437   #
12438   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12439   # It is also a way to make sure we got the proper file name for the real test later on.
12440   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12441   if test "x$test_shortpath" = x; then
12442     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12443 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12444     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12445   fi
12446 
12447   # Call helper function which possibly converts this using DOS-style short mode.
12448   # If so, the updated path is stored in $new_path.
12449 
12450   input_path="$new_path"
12451   # Check if we need to convert this using DOS-style short mode. If the path
12452   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12453   # take no chances and rewrite it.
12454   # Note: m4 eats our [], so we need to use [ and ] instead.
12455   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12456   if test "x$has_forbidden_chars" != x; then
12457     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12458     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12459     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12460     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12461       # Going to short mode and back again did indeed matter. Since short mode is
12462       # case insensitive, let's make it lowercase to improve readability.
12463       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12464       # Now convert it back to Unix-stile (cygpath)
12465       input_path=`$CYGPATH -u "$shortmode_path"`
12466       new_path="$input_path"
12467     fi
12468   fi
12469 
12470   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12471   if test "x$test_cygdrive_prefix" = x; then
12472     # As a simple fix, exclude /usr/bin since it's not a real path.
12473     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12474       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12475       # a path prefixed by /cygdrive for fixpath to work.
12476       new_path="$CYGWIN_ROOT_PATH$input_path"
12477     fi
12478   fi
12479 
12480 
12481   if test "x$path" != "x$new_path"; then
12482     BOOT_JDK="$new_path"
12483     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12484 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12485   fi
12486 
12487   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12488 
12489   path="$BOOT_JDK"
12490   has_colon=`$ECHO $path | $GREP ^.:`
12491   new_path="$path"
12492   if test "x$has_colon" = x; then
12493     # Not in mixed or Windows style, start by that.
12494     new_path=`cmd //c echo $path`
12495   fi
12496 
12497 
12498   input_path="$new_path"
12499   # Check if we need to convert this using DOS-style short mode. If the path
12500   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12501   # take no chances and rewrite it.
12502   # Note: m4 eats our [], so we need to use [ and ] instead.
12503   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12504   if test "x$has_forbidden_chars" != x; then
12505     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12506     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12507   fi
12508 
12509 
12510   windows_path="$new_path"
12511   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12512     unix_path=`$CYGPATH -u "$windows_path"`
12513     new_path="$unix_path"
12514   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12515     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12516     new_path="$unix_path"
12517   fi
12518 
12519   if test "x$path" != "x$new_path"; then
12520     BOOT_JDK="$new_path"
12521     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12522 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12523   fi
12524 
12525   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12526   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12527 
12528   else
12529     # We're on a posix platform. Hooray! :)
12530     path="$BOOT_JDK"
12531     has_space=`$ECHO "$path" | $GREP " "`
12532     if test "x$has_space" != x; then
12533       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12534 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12535       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12536     fi
12537 
12538     # Use eval to expand a potential ~
12539     eval path="$path"
12540     if test ! -f "$path" && test ! -d "$path"; then
12541       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12542     fi
12543 
12544     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12545   fi
12546 
12547               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12548 $as_echo_n "checking for Boot JDK... " >&6; }
12549               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12550 $as_echo "$BOOT_JDK" >&6; }
12551               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12552 $as_echo_n "checking Boot JDK version... " >&6; }
12553               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12554               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12555 $as_echo "$BOOT_JDK_VERSION" >&6; }
12556             fi # end check jdk version
12557           fi # end check rt.jar
12558         fi # end check javac
12559       fi # end check java
12560     fi # end check boot jdk found
12561   fi
12562 
12563     done
12564   fi
12565 
12566   fi
12567 
12568 
12569     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12570     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12571       # Do we have a bin/java?
12572       if test ! -x "$BOOT_JDK/bin/java"; then
12573         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12574 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12575         BOOT_JDK_FOUND=no
12576       else
12577         # Do we have a bin/javac?
12578         if test ! -x "$BOOT_JDK/bin/javac"; then
12579           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12580 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12581           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12582 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12583           BOOT_JDK_FOUND=no
12584         else
12585           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12586           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12587             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12588 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12589             BOOT_JDK_FOUND=no
12590           else
12591             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12592             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12593 
12594             # Extra M4 quote needed to protect [] in grep expression.
12595             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12596             if test "x$FOUND_VERSION_78" = x; then
12597               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12598 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12599               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12600 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12601               BOOT_JDK_FOUND=no
12602             else
12603               # We're done! :-)
12604               BOOT_JDK_FOUND=yes
12605 
12606   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12607 
12608   # Input might be given as Windows format, start by converting to
12609   # unix format.
12610   path="$BOOT_JDK"
12611   new_path=`$CYGPATH -u "$path"`
12612 
12613   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12614   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12615   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12616   # "foo.exe" is OK but "foo" is an error.
12617   #
12618   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12619   # It is also a way to make sure we got the proper file name for the real test later on.
12620   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12621   if test "x$test_shortpath" = x; then
12622     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12623 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12624     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12625   fi
12626 
12627   # Call helper function which possibly converts this using DOS-style short mode.
12628   # If so, the updated path is stored in $new_path.
12629 
12630   input_path="$new_path"
12631   # Check if we need to convert this using DOS-style short mode. If the path
12632   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12633   # take no chances and rewrite it.
12634   # Note: m4 eats our [], so we need to use [ and ] instead.
12635   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12636   if test "x$has_forbidden_chars" != x; then
12637     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12638     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12639     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12640     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12641       # Going to short mode and back again did indeed matter. Since short mode is
12642       # case insensitive, let's make it lowercase to improve readability.
12643       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12644       # Now convert it back to Unix-stile (cygpath)
12645       input_path=`$CYGPATH -u "$shortmode_path"`
12646       new_path="$input_path"
12647     fi
12648   fi
12649 
12650   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12651   if test "x$test_cygdrive_prefix" = x; then
12652     # As a simple fix, exclude /usr/bin since it's not a real path.
12653     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12654       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12655       # a path prefixed by /cygdrive for fixpath to work.
12656       new_path="$CYGWIN_ROOT_PATH$input_path"
12657     fi
12658   fi
12659 
12660 
12661   if test "x$path" != "x$new_path"; then
12662     BOOT_JDK="$new_path"
12663     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12664 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12665   fi
12666 
12667   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12668 
12669   path="$BOOT_JDK"
12670   has_colon=`$ECHO $path | $GREP ^.:`
12671   new_path="$path"
12672   if test "x$has_colon" = x; then
12673     # Not in mixed or Windows style, start by that.
12674     new_path=`cmd //c echo $path`
12675   fi
12676 
12677 
12678   input_path="$new_path"
12679   # Check if we need to convert this using DOS-style short mode. If the path
12680   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12681   # take no chances and rewrite it.
12682   # Note: m4 eats our [], so we need to use [ and ] instead.
12683   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12684   if test "x$has_forbidden_chars" != x; then
12685     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12686     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12687   fi
12688 
12689 
12690   windows_path="$new_path"
12691   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12692     unix_path=`$CYGPATH -u "$windows_path"`
12693     new_path="$unix_path"
12694   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12695     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12696     new_path="$unix_path"
12697   fi
12698 
12699   if test "x$path" != "x$new_path"; then
12700     BOOT_JDK="$new_path"
12701     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12702 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12703   fi
12704 
12705   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12706   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12707 
12708   else
12709     # We're on a posix platform. Hooray! :)
12710     path="$BOOT_JDK"
12711     has_space=`$ECHO "$path" | $GREP " "`
12712     if test "x$has_space" != x; then
12713       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12714 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12715       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12716     fi
12717 
12718     # Use eval to expand a potential ~
12719     eval path="$path"
12720     if test ! -f "$path" && test ! -d "$path"; then
12721       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12722     fi
12723 
12724     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12725   fi
12726 
12727               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12728 $as_echo_n "checking for Boot JDK... " >&6; }
12729               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12730 $as_echo "$BOOT_JDK" >&6; }
12731               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12732 $as_echo_n "checking Boot JDK version... " >&6; }
12733               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12734               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12735 $as_echo "$BOOT_JDK_VERSION" >&6; }
12736             fi # end check jdk version
12737           fi # end check rt.jar
12738         fi # end check javac
12739       fi # end check java
12740     fi # end check boot jdk found
12741   fi
12742 
12743 
12744   if test "x$BOOT_JDK_FOUND" = xno; then
12745     # Now execute the test
12746 
12747   if test "x$PROGRAMW6432" != x; then
12748     VIRTUAL_DIR="$PROGRAMW6432/Java"
12749 
12750   windows_path="$VIRTUAL_DIR"
12751   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12752     unix_path=`$CYGPATH -u "$windows_path"`
12753     VIRTUAL_DIR="$unix_path"
12754   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12755     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12756     VIRTUAL_DIR="$unix_path"
12757   fi
12758 
12759 
12760   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12761   BOOT_JDK_SUFFIX=""
12762   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12763   if test "x$ALL_JDKS_FOUND" != x; then
12764     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12765 
12766   if test "x$BOOT_JDK_FOUND" = xno; then
12767     # Now execute the test
12768 
12769         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12770         if test -d "$BOOT_JDK"; then
12771           BOOT_JDK_FOUND=maybe
12772           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12773 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12774         fi
12775 
12776 
12777     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12778     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12779       # Do we have a bin/java?
12780       if test ! -x "$BOOT_JDK/bin/java"; then
12781         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12782 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12783         BOOT_JDK_FOUND=no
12784       else
12785         # Do we have a bin/javac?
12786         if test ! -x "$BOOT_JDK/bin/javac"; then
12787           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12788 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12789           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12790 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12791           BOOT_JDK_FOUND=no
12792         else
12793           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12794           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12795             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12796 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12797             BOOT_JDK_FOUND=no
12798           else
12799             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12800             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12801 
12802             # Extra M4 quote needed to protect [] in grep expression.
12803             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12804             if test "x$FOUND_VERSION_78" = x; then
12805               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12806 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12807               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12808 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12809               BOOT_JDK_FOUND=no
12810             else
12811               # We're done! :-)
12812               BOOT_JDK_FOUND=yes
12813 
12814   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12815 
12816   # Input might be given as Windows format, start by converting to
12817   # unix format.
12818   path="$BOOT_JDK"
12819   new_path=`$CYGPATH -u "$path"`
12820 
12821   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12822   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12823   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12824   # "foo.exe" is OK but "foo" is an error.
12825   #
12826   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12827   # It is also a way to make sure we got the proper file name for the real test later on.
12828   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12829   if test "x$test_shortpath" = x; then
12830     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12831 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12832     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12833   fi
12834 
12835   # Call helper function which possibly converts this using DOS-style short mode.
12836   # If so, the updated path is stored in $new_path.
12837 
12838   input_path="$new_path"
12839   # Check if we need to convert this using DOS-style short mode. If the path
12840   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12841   # take no chances and rewrite it.
12842   # Note: m4 eats our [], so we need to use [ and ] instead.
12843   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12844   if test "x$has_forbidden_chars" != x; then
12845     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12846     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12847     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12848     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12849       # Going to short mode and back again did indeed matter. Since short mode is
12850       # case insensitive, let's make it lowercase to improve readability.
12851       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12852       # Now convert it back to Unix-stile (cygpath)
12853       input_path=`$CYGPATH -u "$shortmode_path"`
12854       new_path="$input_path"
12855     fi
12856   fi
12857 
12858   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12859   if test "x$test_cygdrive_prefix" = x; then
12860     # As a simple fix, exclude /usr/bin since it's not a real path.
12861     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12862       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12863       # a path prefixed by /cygdrive for fixpath to work.
12864       new_path="$CYGWIN_ROOT_PATH$input_path"
12865     fi
12866   fi
12867 
12868 
12869   if test "x$path" != "x$new_path"; then
12870     BOOT_JDK="$new_path"
12871     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12872 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12873   fi
12874 
12875   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12876 
12877   path="$BOOT_JDK"
12878   has_colon=`$ECHO $path | $GREP ^.:`
12879   new_path="$path"
12880   if test "x$has_colon" = x; then
12881     # Not in mixed or Windows style, start by that.
12882     new_path=`cmd //c echo $path`
12883   fi
12884 
12885 
12886   input_path="$new_path"
12887   # Check if we need to convert this using DOS-style short mode. If the path
12888   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12889   # take no chances and rewrite it.
12890   # Note: m4 eats our [], so we need to use [ and ] instead.
12891   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12892   if test "x$has_forbidden_chars" != x; then
12893     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12894     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12895   fi
12896 
12897 
12898   windows_path="$new_path"
12899   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12900     unix_path=`$CYGPATH -u "$windows_path"`
12901     new_path="$unix_path"
12902   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12903     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12904     new_path="$unix_path"
12905   fi
12906 
12907   if test "x$path" != "x$new_path"; then
12908     BOOT_JDK="$new_path"
12909     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12910 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12911   fi
12912 
12913   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12914   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12915 
12916   else
12917     # We're on a posix platform. Hooray! :)
12918     path="$BOOT_JDK"
12919     has_space=`$ECHO "$path" | $GREP " "`
12920     if test "x$has_space" != x; then
12921       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12922 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12923       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12924     fi
12925 
12926     # Use eval to expand a potential ~
12927     eval path="$path"
12928     if test ! -f "$path" && test ! -d "$path"; then
12929       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12930     fi
12931 
12932     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12933   fi
12934 
12935               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12936 $as_echo_n "checking for Boot JDK... " >&6; }
12937               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12938 $as_echo "$BOOT_JDK" >&6; }
12939               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12940 $as_echo_n "checking Boot JDK version... " >&6; }
12941               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12942               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12943 $as_echo "$BOOT_JDK_VERSION" >&6; }
12944             fi # end check jdk version
12945           fi # end check rt.jar
12946         fi # end check javac
12947       fi # end check java
12948     fi # end check boot jdk found
12949   fi
12950 
12951     done
12952   fi
12953 
12954   fi
12955 
12956 
12957     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12958     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12959       # Do we have a bin/java?
12960       if test ! -x "$BOOT_JDK/bin/java"; then
12961         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12962 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12963         BOOT_JDK_FOUND=no
12964       else
12965         # Do we have a bin/javac?
12966         if test ! -x "$BOOT_JDK/bin/javac"; then
12967           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12968 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12969           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12970 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12971           BOOT_JDK_FOUND=no
12972         else
12973           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12974           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12975             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12976 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12977             BOOT_JDK_FOUND=no
12978           else
12979             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12980             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12981 
12982             # Extra M4 quote needed to protect [] in grep expression.
12983             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12984             if test "x$FOUND_VERSION_78" = x; then
12985               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12986 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12987               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12988 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12989               BOOT_JDK_FOUND=no
12990             else
12991               # We're done! :-)
12992               BOOT_JDK_FOUND=yes
12993 
12994   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12995 
12996   # Input might be given as Windows format, start by converting to
12997   # unix format.
12998   path="$BOOT_JDK"
12999   new_path=`$CYGPATH -u "$path"`
13000 
13001   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13002   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13003   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13004   # "foo.exe" is OK but "foo" is an error.
13005   #
13006   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13007   # It is also a way to make sure we got the proper file name for the real test later on.
13008   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13009   if test "x$test_shortpath" = x; then
13010     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13011 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13012     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13013   fi
13014 
13015   # Call helper function which possibly converts this using DOS-style short mode.
13016   # If so, the updated path is stored in $new_path.
13017 
13018   input_path="$new_path"
13019   # Check if we need to convert this using DOS-style short mode. If the path
13020   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13021   # take no chances and rewrite it.
13022   # Note: m4 eats our [], so we need to use [ and ] instead.
13023   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13024   if test "x$has_forbidden_chars" != x; then
13025     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13026     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13027     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13028     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13029       # Going to short mode and back again did indeed matter. Since short mode is
13030       # case insensitive, let's make it lowercase to improve readability.
13031       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13032       # Now convert it back to Unix-stile (cygpath)
13033       input_path=`$CYGPATH -u "$shortmode_path"`
13034       new_path="$input_path"
13035     fi
13036   fi
13037 
13038   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13039   if test "x$test_cygdrive_prefix" = x; then
13040     # As a simple fix, exclude /usr/bin since it's not a real path.
13041     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13042       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13043       # a path prefixed by /cygdrive for fixpath to work.
13044       new_path="$CYGWIN_ROOT_PATH$input_path"
13045     fi
13046   fi
13047 
13048 
13049   if test "x$path" != "x$new_path"; then
13050     BOOT_JDK="$new_path"
13051     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13052 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13053   fi
13054 
13055   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13056 
13057   path="$BOOT_JDK"
13058   has_colon=`$ECHO $path | $GREP ^.:`
13059   new_path="$path"
13060   if test "x$has_colon" = x; then
13061     # Not in mixed or Windows style, start by that.
13062     new_path=`cmd //c echo $path`
13063   fi
13064 
13065 
13066   input_path="$new_path"
13067   # Check if we need to convert this using DOS-style short mode. If the path
13068   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13069   # take no chances and rewrite it.
13070   # Note: m4 eats our [], so we need to use [ and ] instead.
13071   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13072   if test "x$has_forbidden_chars" != x; then
13073     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13074     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13075   fi
13076 
13077 
13078   windows_path="$new_path"
13079   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13080     unix_path=`$CYGPATH -u "$windows_path"`
13081     new_path="$unix_path"
13082   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13083     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13084     new_path="$unix_path"
13085   fi
13086 
13087   if test "x$path" != "x$new_path"; then
13088     BOOT_JDK="$new_path"
13089     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13090 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13091   fi
13092 
13093   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13094   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13095 
13096   else
13097     # We're on a posix platform. Hooray! :)
13098     path="$BOOT_JDK"
13099     has_space=`$ECHO "$path" | $GREP " "`
13100     if test "x$has_space" != x; then
13101       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13102 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13103       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13104     fi
13105 
13106     # Use eval to expand a potential ~
13107     eval path="$path"
13108     if test ! -f "$path" && test ! -d "$path"; then
13109       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13110     fi
13111 
13112     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13113   fi
13114 
13115               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13116 $as_echo_n "checking for Boot JDK... " >&6; }
13117               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13118 $as_echo "$BOOT_JDK" >&6; }
13119               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13120 $as_echo_n "checking Boot JDK version... " >&6; }
13121               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13122               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13123 $as_echo "$BOOT_JDK_VERSION" >&6; }
13124             fi # end check jdk version
13125           fi # end check rt.jar
13126         fi # end check javac
13127       fi # end check java
13128     fi # end check boot jdk found
13129   fi
13130 
13131 
13132   if test "x$BOOT_JDK_FOUND" = xno; then
13133     # Now execute the test
13134 
13135   if test "x$PROGRAMFILES" != x; then
13136     VIRTUAL_DIR="$PROGRAMFILES/Java"
13137 
13138   windows_path="$VIRTUAL_DIR"
13139   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13140     unix_path=`$CYGPATH -u "$windows_path"`
13141     VIRTUAL_DIR="$unix_path"
13142   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13143     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13144     VIRTUAL_DIR="$unix_path"
13145   fi
13146 
13147 
13148   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13149   BOOT_JDK_SUFFIX=""
13150   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13151   if test "x$ALL_JDKS_FOUND" != x; then
13152     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13153 
13154   if test "x$BOOT_JDK_FOUND" = xno; then
13155     # Now execute the test
13156 
13157         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13158         if test -d "$BOOT_JDK"; then
13159           BOOT_JDK_FOUND=maybe
13160           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13161 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13162         fi
13163 
13164 
13165     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13166     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13167       # Do we have a bin/java?
13168       if test ! -x "$BOOT_JDK/bin/java"; then
13169         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13170 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13171         BOOT_JDK_FOUND=no
13172       else
13173         # Do we have a bin/javac?
13174         if test ! -x "$BOOT_JDK/bin/javac"; then
13175           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13176 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13177           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13178 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13179           BOOT_JDK_FOUND=no
13180         else
13181           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13182           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13183             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13184 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13185             BOOT_JDK_FOUND=no
13186           else
13187             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13188             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13189 
13190             # Extra M4 quote needed to protect [] in grep expression.
13191             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13192             if test "x$FOUND_VERSION_78" = x; then
13193               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13194 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13195               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13196 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13197               BOOT_JDK_FOUND=no
13198             else
13199               # We're done! :-)
13200               BOOT_JDK_FOUND=yes
13201 
13202   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13203 
13204   # Input might be given as Windows format, start by converting to
13205   # unix format.
13206   path="$BOOT_JDK"
13207   new_path=`$CYGPATH -u "$path"`
13208 
13209   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13210   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13211   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13212   # "foo.exe" is OK but "foo" is an error.
13213   #
13214   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13215   # It is also a way to make sure we got the proper file name for the real test later on.
13216   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13217   if test "x$test_shortpath" = x; then
13218     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13219 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13220     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13221   fi
13222 
13223   # Call helper function which possibly converts this using DOS-style short mode.
13224   # If so, the updated path is stored in $new_path.
13225 
13226   input_path="$new_path"
13227   # Check if we need to convert this using DOS-style short mode. If the path
13228   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13229   # take no chances and rewrite it.
13230   # Note: m4 eats our [], so we need to use [ and ] instead.
13231   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13232   if test "x$has_forbidden_chars" != x; then
13233     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13234     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13235     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13236     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13237       # Going to short mode and back again did indeed matter. Since short mode is
13238       # case insensitive, let's make it lowercase to improve readability.
13239       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13240       # Now convert it back to Unix-stile (cygpath)
13241       input_path=`$CYGPATH -u "$shortmode_path"`
13242       new_path="$input_path"
13243     fi
13244   fi
13245 
13246   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13247   if test "x$test_cygdrive_prefix" = x; then
13248     # As a simple fix, exclude /usr/bin since it's not a real path.
13249     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13250       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13251       # a path prefixed by /cygdrive for fixpath to work.
13252       new_path="$CYGWIN_ROOT_PATH$input_path"
13253     fi
13254   fi
13255 
13256 
13257   if test "x$path" != "x$new_path"; then
13258     BOOT_JDK="$new_path"
13259     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13260 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13261   fi
13262 
13263   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13264 
13265   path="$BOOT_JDK"
13266   has_colon=`$ECHO $path | $GREP ^.:`
13267   new_path="$path"
13268   if test "x$has_colon" = x; then
13269     # Not in mixed or Windows style, start by that.
13270     new_path=`cmd //c echo $path`
13271   fi
13272 
13273 
13274   input_path="$new_path"
13275   # Check if we need to convert this using DOS-style short mode. If the path
13276   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13277   # take no chances and rewrite it.
13278   # Note: m4 eats our [], so we need to use [ and ] instead.
13279   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13280   if test "x$has_forbidden_chars" != x; then
13281     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13282     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13283   fi
13284 
13285 
13286   windows_path="$new_path"
13287   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13288     unix_path=`$CYGPATH -u "$windows_path"`
13289     new_path="$unix_path"
13290   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13291     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13292     new_path="$unix_path"
13293   fi
13294 
13295   if test "x$path" != "x$new_path"; then
13296     BOOT_JDK="$new_path"
13297     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13298 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13299   fi
13300 
13301   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13302   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13303 
13304   else
13305     # We're on a posix platform. Hooray! :)
13306     path="$BOOT_JDK"
13307     has_space=`$ECHO "$path" | $GREP " "`
13308     if test "x$has_space" != x; then
13309       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13310 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13311       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13312     fi
13313 
13314     # Use eval to expand a potential ~
13315     eval path="$path"
13316     if test ! -f "$path" && test ! -d "$path"; then
13317       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13318     fi
13319 
13320     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13321   fi
13322 
13323               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13324 $as_echo_n "checking for Boot JDK... " >&6; }
13325               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13326 $as_echo "$BOOT_JDK" >&6; }
13327               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13328 $as_echo_n "checking Boot JDK version... " >&6; }
13329               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13330               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13331 $as_echo "$BOOT_JDK_VERSION" >&6; }
13332             fi # end check jdk version
13333           fi # end check rt.jar
13334         fi # end check javac
13335       fi # end check java
13336     fi # end check boot jdk found
13337   fi
13338 
13339     done
13340   fi
13341 
13342   fi
13343 
13344 
13345     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13346     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13347       # Do we have a bin/java?
13348       if test ! -x "$BOOT_JDK/bin/java"; then
13349         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13350 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13351         BOOT_JDK_FOUND=no
13352       else
13353         # Do we have a bin/javac?
13354         if test ! -x "$BOOT_JDK/bin/javac"; then
13355           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13356 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13357           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13358 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13359           BOOT_JDK_FOUND=no
13360         else
13361           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13362           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13363             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13364 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13365             BOOT_JDK_FOUND=no
13366           else
13367             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13368             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13369 
13370             # Extra M4 quote needed to protect [] in grep expression.
13371             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13372             if test "x$FOUND_VERSION_78" = x; then
13373               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13374 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13375               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13376 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13377               BOOT_JDK_FOUND=no
13378             else
13379               # We're done! :-)
13380               BOOT_JDK_FOUND=yes
13381 
13382   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13383 
13384   # Input might be given as Windows format, start by converting to
13385   # unix format.
13386   path="$BOOT_JDK"
13387   new_path=`$CYGPATH -u "$path"`
13388 
13389   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13390   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13391   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13392   # "foo.exe" is OK but "foo" is an error.
13393   #
13394   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13395   # It is also a way to make sure we got the proper file name for the real test later on.
13396   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13397   if test "x$test_shortpath" = x; then
13398     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13399 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13400     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13401   fi
13402 
13403   # Call helper function which possibly converts this using DOS-style short mode.
13404   # If so, the updated path is stored in $new_path.
13405 
13406   input_path="$new_path"
13407   # Check if we need to convert this using DOS-style short mode. If the path
13408   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13409   # take no chances and rewrite it.
13410   # Note: m4 eats our [], so we need to use [ and ] instead.
13411   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13412   if test "x$has_forbidden_chars" != x; then
13413     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13414     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13415     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13416     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13417       # Going to short mode and back again did indeed matter. Since short mode is
13418       # case insensitive, let's make it lowercase to improve readability.
13419       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13420       # Now convert it back to Unix-stile (cygpath)
13421       input_path=`$CYGPATH -u "$shortmode_path"`
13422       new_path="$input_path"
13423     fi
13424   fi
13425 
13426   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13427   if test "x$test_cygdrive_prefix" = x; then
13428     # As a simple fix, exclude /usr/bin since it's not a real path.
13429     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13430       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13431       # a path prefixed by /cygdrive for fixpath to work.
13432       new_path="$CYGWIN_ROOT_PATH$input_path"
13433     fi
13434   fi
13435 
13436 
13437   if test "x$path" != "x$new_path"; then
13438     BOOT_JDK="$new_path"
13439     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13440 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13441   fi
13442 
13443   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13444 
13445   path="$BOOT_JDK"
13446   has_colon=`$ECHO $path | $GREP ^.:`
13447   new_path="$path"
13448   if test "x$has_colon" = x; then
13449     # Not in mixed or Windows style, start by that.
13450     new_path=`cmd //c echo $path`
13451   fi
13452 
13453 
13454   input_path="$new_path"
13455   # Check if we need to convert this using DOS-style short mode. If the path
13456   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13457   # take no chances and rewrite it.
13458   # Note: m4 eats our [], so we need to use [ and ] instead.
13459   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13460   if test "x$has_forbidden_chars" != x; then
13461     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13462     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13463   fi
13464 
13465 
13466   windows_path="$new_path"
13467   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13468     unix_path=`$CYGPATH -u "$windows_path"`
13469     new_path="$unix_path"
13470   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13471     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13472     new_path="$unix_path"
13473   fi
13474 
13475   if test "x$path" != "x$new_path"; then
13476     BOOT_JDK="$new_path"
13477     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13478 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13479   fi
13480 
13481   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13482   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13483 
13484   else
13485     # We're on a posix platform. Hooray! :)
13486     path="$BOOT_JDK"
13487     has_space=`$ECHO "$path" | $GREP " "`
13488     if test "x$has_space" != x; then
13489       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13490 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13491       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13492     fi
13493 
13494     # Use eval to expand a potential ~
13495     eval path="$path"
13496     if test ! -f "$path" && test ! -d "$path"; then
13497       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13498     fi
13499 
13500     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13501   fi
13502 
13503               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13504 $as_echo_n "checking for Boot JDK... " >&6; }
13505               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13506 $as_echo "$BOOT_JDK" >&6; }
13507               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13508 $as_echo_n "checking Boot JDK version... " >&6; }
13509               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13510               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13511 $as_echo "$BOOT_JDK_VERSION" >&6; }
13512             fi # end check jdk version
13513           fi # end check rt.jar
13514         fi # end check javac
13515       fi # end check java
13516     fi # end check boot jdk found
13517   fi
13518 
13519 
13520   if test "x$BOOT_JDK_FOUND" = xno; then
13521     # Now execute the test
13522 
13523   if test "x$ProgramFiles" != x; then
13524     VIRTUAL_DIR="$ProgramFiles/Java"
13525 
13526   windows_path="$VIRTUAL_DIR"
13527   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13528     unix_path=`$CYGPATH -u "$windows_path"`
13529     VIRTUAL_DIR="$unix_path"
13530   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13531     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13532     VIRTUAL_DIR="$unix_path"
13533   fi
13534 
13535 
13536   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13537   BOOT_JDK_SUFFIX=""
13538   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13539   if test "x$ALL_JDKS_FOUND" != x; then
13540     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13541 
13542   if test "x$BOOT_JDK_FOUND" = xno; then
13543     # Now execute the test
13544 
13545         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13546         if test -d "$BOOT_JDK"; then
13547           BOOT_JDK_FOUND=maybe
13548           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13549 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13550         fi
13551 
13552 
13553     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13554     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13555       # Do we have a bin/java?
13556       if test ! -x "$BOOT_JDK/bin/java"; then
13557         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13558 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13559         BOOT_JDK_FOUND=no
13560       else
13561         # Do we have a bin/javac?
13562         if test ! -x "$BOOT_JDK/bin/javac"; then
13563           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13564 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13565           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13566 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13567           BOOT_JDK_FOUND=no
13568         else
13569           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13570           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13571             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13572 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13573             BOOT_JDK_FOUND=no
13574           else
13575             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13576             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13577 
13578             # Extra M4 quote needed to protect [] in grep expression.
13579             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13580             if test "x$FOUND_VERSION_78" = x; then
13581               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13582 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13583               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13584 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13585               BOOT_JDK_FOUND=no
13586             else
13587               # We're done! :-)
13588               BOOT_JDK_FOUND=yes
13589 
13590   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13591 
13592   # Input might be given as Windows format, start by converting to
13593   # unix format.
13594   path="$BOOT_JDK"
13595   new_path=`$CYGPATH -u "$path"`
13596 
13597   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13598   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13599   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13600   # "foo.exe" is OK but "foo" is an error.
13601   #
13602   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13603   # It is also a way to make sure we got the proper file name for the real test later on.
13604   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13605   if test "x$test_shortpath" = x; then
13606     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13607 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13608     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13609   fi
13610 
13611   # Call helper function which possibly converts this using DOS-style short mode.
13612   # If so, the updated path is stored in $new_path.
13613 
13614   input_path="$new_path"
13615   # Check if we need to convert this using DOS-style short mode. If the path
13616   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13617   # take no chances and rewrite it.
13618   # Note: m4 eats our [], so we need to use [ and ] instead.
13619   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13620   if test "x$has_forbidden_chars" != x; then
13621     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13622     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13623     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13624     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13625       # Going to short mode and back again did indeed matter. Since short mode is
13626       # case insensitive, let's make it lowercase to improve readability.
13627       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13628       # Now convert it back to Unix-stile (cygpath)
13629       input_path=`$CYGPATH -u "$shortmode_path"`
13630       new_path="$input_path"
13631     fi
13632   fi
13633 
13634   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13635   if test "x$test_cygdrive_prefix" = x; then
13636     # As a simple fix, exclude /usr/bin since it's not a real path.
13637     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13638       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13639       # a path prefixed by /cygdrive for fixpath to work.
13640       new_path="$CYGWIN_ROOT_PATH$input_path"
13641     fi
13642   fi
13643 
13644 
13645   if test "x$path" != "x$new_path"; then
13646     BOOT_JDK="$new_path"
13647     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13648 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13649   fi
13650 
13651   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13652 
13653   path="$BOOT_JDK"
13654   has_colon=`$ECHO $path | $GREP ^.:`
13655   new_path="$path"
13656   if test "x$has_colon" = x; then
13657     # Not in mixed or Windows style, start by that.
13658     new_path=`cmd //c echo $path`
13659   fi
13660 
13661 
13662   input_path="$new_path"
13663   # Check if we need to convert this using DOS-style short mode. If the path
13664   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13665   # take no chances and rewrite it.
13666   # Note: m4 eats our [], so we need to use [ and ] instead.
13667   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13668   if test "x$has_forbidden_chars" != x; then
13669     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13670     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13671   fi
13672 
13673 
13674   windows_path="$new_path"
13675   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13676     unix_path=`$CYGPATH -u "$windows_path"`
13677     new_path="$unix_path"
13678   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13679     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13680     new_path="$unix_path"
13681   fi
13682 
13683   if test "x$path" != "x$new_path"; then
13684     BOOT_JDK="$new_path"
13685     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13686 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13687   fi
13688 
13689   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13690   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13691 
13692   else
13693     # We're on a posix platform. Hooray! :)
13694     path="$BOOT_JDK"
13695     has_space=`$ECHO "$path" | $GREP " "`
13696     if test "x$has_space" != x; then
13697       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13698 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13699       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13700     fi
13701 
13702     # Use eval to expand a potential ~
13703     eval path="$path"
13704     if test ! -f "$path" && test ! -d "$path"; then
13705       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13706     fi
13707 
13708     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13709   fi
13710 
13711               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13712 $as_echo_n "checking for Boot JDK... " >&6; }
13713               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13714 $as_echo "$BOOT_JDK" >&6; }
13715               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13716 $as_echo_n "checking Boot JDK version... " >&6; }
13717               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13718               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13719 $as_echo "$BOOT_JDK_VERSION" >&6; }
13720             fi # end check jdk version
13721           fi # end check rt.jar
13722         fi # end check javac
13723       fi # end check java
13724     fi # end check boot jdk found
13725   fi
13726 
13727     done
13728   fi
13729 
13730   fi
13731 
13732 
13733     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13734     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13735       # Do we have a bin/java?
13736       if test ! -x "$BOOT_JDK/bin/java"; then
13737         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13738 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13739         BOOT_JDK_FOUND=no
13740       else
13741         # Do we have a bin/javac?
13742         if test ! -x "$BOOT_JDK/bin/javac"; then
13743           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13744 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13745           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13746 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13747           BOOT_JDK_FOUND=no
13748         else
13749           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13750           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13751             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13752 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13753             BOOT_JDK_FOUND=no
13754           else
13755             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13756             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13757 
13758             # Extra M4 quote needed to protect [] in grep expression.
13759             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13760             if test "x$FOUND_VERSION_78" = x; then
13761               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13762 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13763               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13764 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13765               BOOT_JDK_FOUND=no
13766             else
13767               # We're done! :-)
13768               BOOT_JDK_FOUND=yes
13769 
13770   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13771 
13772   # Input might be given as Windows format, start by converting to
13773   # unix format.
13774   path="$BOOT_JDK"
13775   new_path=`$CYGPATH -u "$path"`
13776 
13777   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13778   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13779   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13780   # "foo.exe" is OK but "foo" is an error.
13781   #
13782   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13783   # It is also a way to make sure we got the proper file name for the real test later on.
13784   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13785   if test "x$test_shortpath" = x; then
13786     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13787 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13788     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13789   fi
13790 
13791   # Call helper function which possibly converts this using DOS-style short mode.
13792   # If so, the updated path is stored in $new_path.
13793 
13794   input_path="$new_path"
13795   # Check if we need to convert this using DOS-style short mode. If the path
13796   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13797   # take no chances and rewrite it.
13798   # Note: m4 eats our [], so we need to use [ and ] instead.
13799   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13800   if test "x$has_forbidden_chars" != x; then
13801     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13802     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13803     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13804     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13805       # Going to short mode and back again did indeed matter. Since short mode is
13806       # case insensitive, let's make it lowercase to improve readability.
13807       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13808       # Now convert it back to Unix-stile (cygpath)
13809       input_path=`$CYGPATH -u "$shortmode_path"`
13810       new_path="$input_path"
13811     fi
13812   fi
13813 
13814   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13815   if test "x$test_cygdrive_prefix" = x; then
13816     # As a simple fix, exclude /usr/bin since it's not a real path.
13817     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13818       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13819       # a path prefixed by /cygdrive for fixpath to work.
13820       new_path="$CYGWIN_ROOT_PATH$input_path"
13821     fi
13822   fi
13823 
13824 
13825   if test "x$path" != "x$new_path"; then
13826     BOOT_JDK="$new_path"
13827     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13828 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13829   fi
13830 
13831   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13832 
13833   path="$BOOT_JDK"
13834   has_colon=`$ECHO $path | $GREP ^.:`
13835   new_path="$path"
13836   if test "x$has_colon" = x; then
13837     # Not in mixed or Windows style, start by that.
13838     new_path=`cmd //c echo $path`
13839   fi
13840 
13841 
13842   input_path="$new_path"
13843   # Check if we need to convert this using DOS-style short mode. If the path
13844   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13845   # take no chances and rewrite it.
13846   # Note: m4 eats our [], so we need to use [ and ] instead.
13847   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13848   if test "x$has_forbidden_chars" != x; then
13849     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13850     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13851   fi
13852 
13853 
13854   windows_path="$new_path"
13855   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13856     unix_path=`$CYGPATH -u "$windows_path"`
13857     new_path="$unix_path"
13858   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13859     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13860     new_path="$unix_path"
13861   fi
13862 
13863   if test "x$path" != "x$new_path"; then
13864     BOOT_JDK="$new_path"
13865     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13866 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13867   fi
13868 
13869   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13870   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13871 
13872   else
13873     # We're on a posix platform. Hooray! :)
13874     path="$BOOT_JDK"
13875     has_space=`$ECHO "$path" | $GREP " "`
13876     if test "x$has_space" != x; then
13877       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13878 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13879       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13880     fi
13881 
13882     # Use eval to expand a potential ~
13883     eval path="$path"
13884     if test ! -f "$path" && test ! -d "$path"; then
13885       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13886     fi
13887 
13888     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13889   fi
13890 
13891               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13892 $as_echo_n "checking for Boot JDK... " >&6; }
13893               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13894 $as_echo "$BOOT_JDK" >&6; }
13895               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13896 $as_echo_n "checking Boot JDK version... " >&6; }
13897               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13898               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13899 $as_echo "$BOOT_JDK_VERSION" >&6; }
13900             fi # end check jdk version
13901           fi # end check rt.jar
13902         fi # end check javac
13903       fi # end check java
13904     fi # end check boot jdk found
13905   fi
13906 
13907 
13908   if test "x$BOOT_JDK_FOUND" = xno; then
13909     # Now execute the test
13910 
13911   BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
13912   BOOT_JDK_SUFFIX=""
13913   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13914   if test "x$ALL_JDKS_FOUND" != x; then
13915     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13916 
13917   if test "x$BOOT_JDK_FOUND" = xno; then
13918     # Now execute the test
13919 
13920         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13921         if test -d "$BOOT_JDK"; then
13922           BOOT_JDK_FOUND=maybe
13923           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13924 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13925         fi
13926 
13927 
13928     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13929     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13930       # Do we have a bin/java?
13931       if test ! -x "$BOOT_JDK/bin/java"; then
13932         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13933 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13934         BOOT_JDK_FOUND=no
13935       else
13936         # Do we have a bin/javac?
13937         if test ! -x "$BOOT_JDK/bin/javac"; then
13938           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13939 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13940           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13941 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13942           BOOT_JDK_FOUND=no
13943         else
13944           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13945           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13946             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13947 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13948             BOOT_JDK_FOUND=no
13949           else
13950             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13951             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13952 
13953             # Extra M4 quote needed to protect [] in grep expression.
13954             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13955             if test "x$FOUND_VERSION_78" = x; then
13956               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13957 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13958               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13959 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13960               BOOT_JDK_FOUND=no
13961             else
13962               # We're done! :-)
13963               BOOT_JDK_FOUND=yes
13964 
13965   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13966 
13967   # Input might be given as Windows format, start by converting to
13968   # unix format.
13969   path="$BOOT_JDK"
13970   new_path=`$CYGPATH -u "$path"`
13971 
13972   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13973   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13974   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13975   # "foo.exe" is OK but "foo" is an error.
13976   #
13977   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13978   # It is also a way to make sure we got the proper file name for the real test later on.
13979   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13980   if test "x$test_shortpath" = x; then
13981     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13982 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13983     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13984   fi
13985 
13986   # Call helper function which possibly converts this using DOS-style short mode.
13987   # If so, the updated path is stored in $new_path.
13988 
13989   input_path="$new_path"
13990   # Check if we need to convert this using DOS-style short mode. If the path
13991   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13992   # take no chances and rewrite it.
13993   # Note: m4 eats our [], so we need to use [ and ] instead.
13994   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13995   if test "x$has_forbidden_chars" != x; then
13996     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13997     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13998     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13999     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14000       # Going to short mode and back again did indeed matter. Since short mode is
14001       # case insensitive, let's make it lowercase to improve readability.
14002       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14003       # Now convert it back to Unix-stile (cygpath)
14004       input_path=`$CYGPATH -u "$shortmode_path"`
14005       new_path="$input_path"
14006     fi
14007   fi
14008 
14009   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14010   if test "x$test_cygdrive_prefix" = x; then
14011     # As a simple fix, exclude /usr/bin since it's not a real path.
14012     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14013       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14014       # a path prefixed by /cygdrive for fixpath to work.
14015       new_path="$CYGWIN_ROOT_PATH$input_path"
14016     fi
14017   fi
14018 
14019 
14020   if test "x$path" != "x$new_path"; then
14021     BOOT_JDK="$new_path"
14022     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14023 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14024   fi
14025 
14026   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14027 
14028   path="$BOOT_JDK"
14029   has_colon=`$ECHO $path | $GREP ^.:`
14030   new_path="$path"
14031   if test "x$has_colon" = x; then
14032     # Not in mixed or Windows style, start by that.
14033     new_path=`cmd //c echo $path`
14034   fi
14035 
14036 
14037   input_path="$new_path"
14038   # Check if we need to convert this using DOS-style short mode. If the path
14039   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14040   # take no chances and rewrite it.
14041   # Note: m4 eats our [], so we need to use [ and ] instead.
14042   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14043   if test "x$has_forbidden_chars" != x; then
14044     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14045     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14046   fi
14047 
14048 
14049   windows_path="$new_path"
14050   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14051     unix_path=`$CYGPATH -u "$windows_path"`
14052     new_path="$unix_path"
14053   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14054     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14055     new_path="$unix_path"
14056   fi
14057 
14058   if test "x$path" != "x$new_path"; then
14059     BOOT_JDK="$new_path"
14060     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14061 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14062   fi
14063 
14064   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14065   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14066 
14067   else
14068     # We're on a posix platform. Hooray! :)
14069     path="$BOOT_JDK"
14070     has_space=`$ECHO "$path" | $GREP " "`
14071     if test "x$has_space" != x; then
14072       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14073 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14074       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14075     fi
14076 
14077     # Use eval to expand a potential ~
14078     eval path="$path"
14079     if test ! -f "$path" && test ! -d "$path"; then
14080       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14081     fi
14082 
14083     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14084   fi
14085 
14086               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14087 $as_echo_n "checking for Boot JDK... " >&6; }
14088               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14089 $as_echo "$BOOT_JDK" >&6; }
14090               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14091 $as_echo_n "checking Boot JDK version... " >&6; }
14092               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14093               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14094 $as_echo "$BOOT_JDK_VERSION" >&6; }
14095             fi # end check jdk version
14096           fi # end check rt.jar
14097         fi # end check javac
14098       fi # end check java
14099     fi # end check boot jdk found
14100   fi
14101 
14102     done
14103   fi
14104 
14105 
14106     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14107     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14108       # Do we have a bin/java?
14109       if test ! -x "$BOOT_JDK/bin/java"; then
14110         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14111 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14112         BOOT_JDK_FOUND=no
14113       else
14114         # Do we have a bin/javac?
14115         if test ! -x "$BOOT_JDK/bin/javac"; then
14116           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14117 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14118           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14119 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14120           BOOT_JDK_FOUND=no
14121         else
14122           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14123           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14124             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14125 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14126             BOOT_JDK_FOUND=no
14127           else
14128             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14129             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14130 
14131             # Extra M4 quote needed to protect [] in grep expression.
14132             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14133             if test "x$FOUND_VERSION_78" = x; then
14134               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14135 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14136               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14137 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14138               BOOT_JDK_FOUND=no
14139             else
14140               # We're done! :-)
14141               BOOT_JDK_FOUND=yes
14142 
14143   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14144 
14145   # Input might be given as Windows format, start by converting to
14146   # unix format.
14147   path="$BOOT_JDK"
14148   new_path=`$CYGPATH -u "$path"`
14149 
14150   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14151   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14152   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14153   # "foo.exe" is OK but "foo" is an error.
14154   #
14155   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14156   # It is also a way to make sure we got the proper file name for the real test later on.
14157   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14158   if test "x$test_shortpath" = x; then
14159     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14160 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14161     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14162   fi
14163 
14164   # Call helper function which possibly converts this using DOS-style short mode.
14165   # If so, the updated path is stored in $new_path.
14166 
14167   input_path="$new_path"
14168   # Check if we need to convert this using DOS-style short mode. If the path
14169   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14170   # take no chances and rewrite it.
14171   # Note: m4 eats our [], so we need to use [ and ] instead.
14172   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14173   if test "x$has_forbidden_chars" != x; then
14174     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14175     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14176     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14177     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14178       # Going to short mode and back again did indeed matter. Since short mode is
14179       # case insensitive, let's make it lowercase to improve readability.
14180       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14181       # Now convert it back to Unix-stile (cygpath)
14182       input_path=`$CYGPATH -u "$shortmode_path"`
14183       new_path="$input_path"
14184     fi
14185   fi
14186 
14187   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14188   if test "x$test_cygdrive_prefix" = x; then
14189     # As a simple fix, exclude /usr/bin since it's not a real path.
14190     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14191       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14192       # a path prefixed by /cygdrive for fixpath to work.
14193       new_path="$CYGWIN_ROOT_PATH$input_path"
14194     fi
14195   fi
14196 
14197 
14198   if test "x$path" != "x$new_path"; then
14199     BOOT_JDK="$new_path"
14200     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14201 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14202   fi
14203 
14204   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14205 
14206   path="$BOOT_JDK"
14207   has_colon=`$ECHO $path | $GREP ^.:`
14208   new_path="$path"
14209   if test "x$has_colon" = x; then
14210     # Not in mixed or Windows style, start by that.
14211     new_path=`cmd //c echo $path`
14212   fi
14213 
14214 
14215   input_path="$new_path"
14216   # Check if we need to convert this using DOS-style short mode. If the path
14217   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14218   # take no chances and rewrite it.
14219   # Note: m4 eats our [], so we need to use [ and ] instead.
14220   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14221   if test "x$has_forbidden_chars" != x; then
14222     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14223     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14224   fi
14225 
14226 
14227   windows_path="$new_path"
14228   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14229     unix_path=`$CYGPATH -u "$windows_path"`
14230     new_path="$unix_path"
14231   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14232     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14233     new_path="$unix_path"
14234   fi
14235 
14236   if test "x$path" != "x$new_path"; then
14237     BOOT_JDK="$new_path"
14238     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14239 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14240   fi
14241 
14242   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14243   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14244 
14245   else
14246     # We're on a posix platform. Hooray! :)
14247     path="$BOOT_JDK"
14248     has_space=`$ECHO "$path" | $GREP " "`
14249     if test "x$has_space" != x; then
14250       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14251 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14252       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14253     fi
14254 
14255     # Use eval to expand a potential ~
14256     eval path="$path"
14257     if test ! -f "$path" && test ! -d "$path"; then
14258       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14259     fi
14260 
14261     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14262   fi
14263 
14264               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14265 $as_echo_n "checking for Boot JDK... " >&6; }
14266               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14267 $as_echo "$BOOT_JDK" >&6; }
14268               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14269 $as_echo_n "checking Boot JDK version... " >&6; }
14270               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14271               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14272 $as_echo "$BOOT_JDK_VERSION" >&6; }
14273             fi # end check jdk version
14274           fi # end check rt.jar
14275         fi # end check javac
14276       fi # end check java
14277     fi # end check boot jdk found
14278   fi
14279 
14280   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
14281 
14282   if test "x$BOOT_JDK_FOUND" = xno; then
14283     # Now execute the test
14284 
14285   BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
14286   BOOT_JDK_SUFFIX="/Contents/Home"
14287   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14288   if test "x$ALL_JDKS_FOUND" != x; then
14289     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14290 
14291   if test "x$BOOT_JDK_FOUND" = xno; then
14292     # Now execute the test
14293 
14294         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14295         if test -d "$BOOT_JDK"; then
14296           BOOT_JDK_FOUND=maybe
14297           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14298 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14299         fi
14300 
14301 
14302     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14303     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14304       # Do we have a bin/java?
14305       if test ! -x "$BOOT_JDK/bin/java"; then
14306         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14307 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14308         BOOT_JDK_FOUND=no
14309       else
14310         # Do we have a bin/javac?
14311         if test ! -x "$BOOT_JDK/bin/javac"; then
14312           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14313 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14314           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14315 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14316           BOOT_JDK_FOUND=no
14317         else
14318           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14319           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14320             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14321 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14322             BOOT_JDK_FOUND=no
14323           else
14324             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14325             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14326 
14327             # Extra M4 quote needed to protect [] in grep expression.
14328             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14329             if test "x$FOUND_VERSION_78" = x; then
14330               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14331 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14332               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14333 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14334               BOOT_JDK_FOUND=no
14335             else
14336               # We're done! :-)
14337               BOOT_JDK_FOUND=yes
14338 
14339   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14340 
14341   # Input might be given as Windows format, start by converting to
14342   # unix format.
14343   path="$BOOT_JDK"
14344   new_path=`$CYGPATH -u "$path"`
14345 
14346   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14347   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14348   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14349   # "foo.exe" is OK but "foo" is an error.
14350   #
14351   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14352   # It is also a way to make sure we got the proper file name for the real test later on.
14353   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14354   if test "x$test_shortpath" = x; then
14355     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14356 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14357     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14358   fi
14359 
14360   # Call helper function which possibly converts this using DOS-style short mode.
14361   # If so, the updated path is stored in $new_path.
14362 
14363   input_path="$new_path"
14364   # Check if we need to convert this using DOS-style short mode. If the path
14365   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14366   # take no chances and rewrite it.
14367   # Note: m4 eats our [], so we need to use [ and ] instead.
14368   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14369   if test "x$has_forbidden_chars" != x; then
14370     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14371     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14372     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14373     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14374       # Going to short mode and back again did indeed matter. Since short mode is
14375       # case insensitive, let's make it lowercase to improve readability.
14376       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14377       # Now convert it back to Unix-stile (cygpath)
14378       input_path=`$CYGPATH -u "$shortmode_path"`
14379       new_path="$input_path"
14380     fi
14381   fi
14382 
14383   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14384   if test "x$test_cygdrive_prefix" = x; then
14385     # As a simple fix, exclude /usr/bin since it's not a real path.
14386     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14387       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14388       # a path prefixed by /cygdrive for fixpath to work.
14389       new_path="$CYGWIN_ROOT_PATH$input_path"
14390     fi
14391   fi
14392 
14393 
14394   if test "x$path" != "x$new_path"; then
14395     BOOT_JDK="$new_path"
14396     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14397 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14398   fi
14399 
14400   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14401 
14402   path="$BOOT_JDK"
14403   has_colon=`$ECHO $path | $GREP ^.:`
14404   new_path="$path"
14405   if test "x$has_colon" = x; then
14406     # Not in mixed or Windows style, start by that.
14407     new_path=`cmd //c echo $path`
14408   fi
14409 
14410 
14411   input_path="$new_path"
14412   # Check if we need to convert this using DOS-style short mode. If the path
14413   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14414   # take no chances and rewrite it.
14415   # Note: m4 eats our [], so we need to use [ and ] instead.
14416   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14417   if test "x$has_forbidden_chars" != x; then
14418     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14419     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14420   fi
14421 
14422 
14423   windows_path="$new_path"
14424   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14425     unix_path=`$CYGPATH -u "$windows_path"`
14426     new_path="$unix_path"
14427   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14428     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14429     new_path="$unix_path"
14430   fi
14431 
14432   if test "x$path" != "x$new_path"; then
14433     BOOT_JDK="$new_path"
14434     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14435 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14436   fi
14437 
14438   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14439   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14440 
14441   else
14442     # We're on a posix platform. Hooray! :)
14443     path="$BOOT_JDK"
14444     has_space=`$ECHO "$path" | $GREP " "`
14445     if test "x$has_space" != x; then
14446       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14447 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14448       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14449     fi
14450 
14451     # Use eval to expand a potential ~
14452     eval path="$path"
14453     if test ! -f "$path" && test ! -d "$path"; then
14454       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14455     fi
14456 
14457     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14458   fi
14459 
14460               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14461 $as_echo_n "checking for Boot JDK... " >&6; }
14462               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14463 $as_echo "$BOOT_JDK" >&6; }
14464               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14465 $as_echo_n "checking Boot JDK version... " >&6; }
14466               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14467               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14468 $as_echo "$BOOT_JDK_VERSION" >&6; }
14469             fi # end check jdk version
14470           fi # end check rt.jar
14471         fi # end check javac
14472       fi # end check java
14473     fi # end check boot jdk found
14474   fi
14475 
14476     done
14477   fi
14478 
14479 
14480     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14481     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14482       # Do we have a bin/java?
14483       if test ! -x "$BOOT_JDK/bin/java"; then
14484         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14485 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14486         BOOT_JDK_FOUND=no
14487       else
14488         # Do we have a bin/javac?
14489         if test ! -x "$BOOT_JDK/bin/javac"; then
14490           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14491 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14492           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14493 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14494           BOOT_JDK_FOUND=no
14495         else
14496           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14497           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14498             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14499 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14500             BOOT_JDK_FOUND=no
14501           else
14502             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14503             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14504 
14505             # Extra M4 quote needed to protect [] in grep expression.
14506             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14507             if test "x$FOUND_VERSION_78" = x; then
14508               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14509 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14510               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14511 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14512               BOOT_JDK_FOUND=no
14513             else
14514               # We're done! :-)
14515               BOOT_JDK_FOUND=yes
14516 
14517   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14518 
14519   # Input might be given as Windows format, start by converting to
14520   # unix format.
14521   path="$BOOT_JDK"
14522   new_path=`$CYGPATH -u "$path"`
14523 
14524   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14525   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14526   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14527   # "foo.exe" is OK but "foo" is an error.
14528   #
14529   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14530   # It is also a way to make sure we got the proper file name for the real test later on.
14531   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14532   if test "x$test_shortpath" = x; then
14533     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14534 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14535     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14536   fi
14537 
14538   # Call helper function which possibly converts this using DOS-style short mode.
14539   # If so, the updated path is stored in $new_path.
14540 
14541   input_path="$new_path"
14542   # Check if we need to convert this using DOS-style short mode. If the path
14543   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14544   # take no chances and rewrite it.
14545   # Note: m4 eats our [], so we need to use [ and ] instead.
14546   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14547   if test "x$has_forbidden_chars" != x; then
14548     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14549     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14550     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14551     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14552       # Going to short mode and back again did indeed matter. Since short mode is
14553       # case insensitive, let's make it lowercase to improve readability.
14554       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14555       # Now convert it back to Unix-stile (cygpath)
14556       input_path=`$CYGPATH -u "$shortmode_path"`
14557       new_path="$input_path"
14558     fi
14559   fi
14560 
14561   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14562   if test "x$test_cygdrive_prefix" = x; then
14563     # As a simple fix, exclude /usr/bin since it's not a real path.
14564     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14565       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14566       # a path prefixed by /cygdrive for fixpath to work.
14567       new_path="$CYGWIN_ROOT_PATH$input_path"
14568     fi
14569   fi
14570 
14571 
14572   if test "x$path" != "x$new_path"; then
14573     BOOT_JDK="$new_path"
14574     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14575 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14576   fi
14577 
14578   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14579 
14580   path="$BOOT_JDK"
14581   has_colon=`$ECHO $path | $GREP ^.:`
14582   new_path="$path"
14583   if test "x$has_colon" = x; then
14584     # Not in mixed or Windows style, start by that.
14585     new_path=`cmd //c echo $path`
14586   fi
14587 
14588 
14589   input_path="$new_path"
14590   # Check if we need to convert this using DOS-style short mode. If the path
14591   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14592   # take no chances and rewrite it.
14593   # Note: m4 eats our [], so we need to use [ and ] instead.
14594   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14595   if test "x$has_forbidden_chars" != x; then
14596     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14597     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14598   fi
14599 
14600 
14601   windows_path="$new_path"
14602   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14603     unix_path=`$CYGPATH -u "$windows_path"`
14604     new_path="$unix_path"
14605   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14606     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14607     new_path="$unix_path"
14608   fi
14609 
14610   if test "x$path" != "x$new_path"; then
14611     BOOT_JDK="$new_path"
14612     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14613 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14614   fi
14615 
14616   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14617   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14618 
14619   else
14620     # We're on a posix platform. Hooray! :)
14621     path="$BOOT_JDK"
14622     has_space=`$ECHO "$path" | $GREP " "`
14623     if test "x$has_space" != x; then
14624       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14625 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14626       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14627     fi
14628 
14629     # Use eval to expand a potential ~
14630     eval path="$path"
14631     if test ! -f "$path" && test ! -d "$path"; then
14632       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14633     fi
14634 
14635     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14636   fi
14637 
14638               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14639 $as_echo_n "checking for Boot JDK... " >&6; }
14640               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14641 $as_echo "$BOOT_JDK" >&6; }
14642               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14643 $as_echo_n "checking Boot JDK version... " >&6; }
14644               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14645               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14646 $as_echo "$BOOT_JDK_VERSION" >&6; }
14647             fi # end check jdk version
14648           fi # end check rt.jar
14649         fi # end check javac
14650       fi # end check java
14651     fi # end check boot jdk found
14652   fi
14653 
14654 
14655   if test "x$BOOT_JDK_FOUND" = xno; then
14656     # Now execute the test
14657 
14658   BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
14659   BOOT_JDK_SUFFIX="/Contents/Home"
14660   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14661   if test "x$ALL_JDKS_FOUND" != x; then
14662     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14663 
14664   if test "x$BOOT_JDK_FOUND" = xno; then
14665     # Now execute the test
14666 
14667         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14668         if test -d "$BOOT_JDK"; then
14669           BOOT_JDK_FOUND=maybe
14670           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14671 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14672         fi
14673 
14674 
14675     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14676     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14677       # Do we have a bin/java?
14678       if test ! -x "$BOOT_JDK/bin/java"; then
14679         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14680 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14681         BOOT_JDK_FOUND=no
14682       else
14683         # Do we have a bin/javac?
14684         if test ! -x "$BOOT_JDK/bin/javac"; then
14685           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14686 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14687           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14688 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14689           BOOT_JDK_FOUND=no
14690         else
14691           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14692           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14693             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14694 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14695             BOOT_JDK_FOUND=no
14696           else
14697             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14698             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14699 
14700             # Extra M4 quote needed to protect [] in grep expression.
14701             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14702             if test "x$FOUND_VERSION_78" = x; then
14703               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14704 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14705               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14706 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14707               BOOT_JDK_FOUND=no
14708             else
14709               # We're done! :-)
14710               BOOT_JDK_FOUND=yes
14711 
14712   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14713 
14714   # Input might be given as Windows format, start by converting to
14715   # unix format.
14716   path="$BOOT_JDK"
14717   new_path=`$CYGPATH -u "$path"`
14718 
14719   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14720   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14721   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14722   # "foo.exe" is OK but "foo" is an error.
14723   #
14724   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14725   # It is also a way to make sure we got the proper file name for the real test later on.
14726   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14727   if test "x$test_shortpath" = x; then
14728     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14729 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14730     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14731   fi
14732 
14733   # Call helper function which possibly converts this using DOS-style short mode.
14734   # If so, the updated path is stored in $new_path.
14735 
14736   input_path="$new_path"
14737   # Check if we need to convert this using DOS-style short mode. If the path
14738   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14739   # take no chances and rewrite it.
14740   # Note: m4 eats our [], so we need to use [ and ] instead.
14741   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14742   if test "x$has_forbidden_chars" != x; then
14743     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14744     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14745     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14746     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14747       # Going to short mode and back again did indeed matter. Since short mode is
14748       # case insensitive, let's make it lowercase to improve readability.
14749       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14750       # Now convert it back to Unix-stile (cygpath)
14751       input_path=`$CYGPATH -u "$shortmode_path"`
14752       new_path="$input_path"
14753     fi
14754   fi
14755 
14756   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14757   if test "x$test_cygdrive_prefix" = x; then
14758     # As a simple fix, exclude /usr/bin since it's not a real path.
14759     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14760       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14761       # a path prefixed by /cygdrive for fixpath to work.
14762       new_path="$CYGWIN_ROOT_PATH$input_path"
14763     fi
14764   fi
14765 
14766 
14767   if test "x$path" != "x$new_path"; then
14768     BOOT_JDK="$new_path"
14769     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14770 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14771   fi
14772 
14773   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14774 
14775   path="$BOOT_JDK"
14776   has_colon=`$ECHO $path | $GREP ^.:`
14777   new_path="$path"
14778   if test "x$has_colon" = x; then
14779     # Not in mixed or Windows style, start by that.
14780     new_path=`cmd //c echo $path`
14781   fi
14782 
14783 
14784   input_path="$new_path"
14785   # Check if we need to convert this using DOS-style short mode. If the path
14786   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14787   # take no chances and rewrite it.
14788   # Note: m4 eats our [], so we need to use [ and ] instead.
14789   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14790   if test "x$has_forbidden_chars" != x; then
14791     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14792     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14793   fi
14794 
14795 
14796   windows_path="$new_path"
14797   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14798     unix_path=`$CYGPATH -u "$windows_path"`
14799     new_path="$unix_path"
14800   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14801     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14802     new_path="$unix_path"
14803   fi
14804 
14805   if test "x$path" != "x$new_path"; then
14806     BOOT_JDK="$new_path"
14807     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14808 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14809   fi
14810 
14811   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14812   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14813 
14814   else
14815     # We're on a posix platform. Hooray! :)
14816     path="$BOOT_JDK"
14817     has_space=`$ECHO "$path" | $GREP " "`
14818     if test "x$has_space" != x; then
14819       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14820 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14821       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14822     fi
14823 
14824     # Use eval to expand a potential ~
14825     eval path="$path"
14826     if test ! -f "$path" && test ! -d "$path"; then
14827       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14828     fi
14829 
14830     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14831   fi
14832 
14833               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14834 $as_echo_n "checking for Boot JDK... " >&6; }
14835               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14836 $as_echo "$BOOT_JDK" >&6; }
14837               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14838 $as_echo_n "checking Boot JDK version... " >&6; }
14839               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14840               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14841 $as_echo "$BOOT_JDK_VERSION" >&6; }
14842             fi # end check jdk version
14843           fi # end check rt.jar
14844         fi # end check javac
14845       fi # end check java
14846     fi # end check boot jdk found
14847   fi
14848 
14849     done
14850   fi
14851 
14852 
14853     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14854     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14855       # Do we have a bin/java?
14856       if test ! -x "$BOOT_JDK/bin/java"; then
14857         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14858 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14859         BOOT_JDK_FOUND=no
14860       else
14861         # Do we have a bin/javac?
14862         if test ! -x "$BOOT_JDK/bin/javac"; then
14863           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14864 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14865           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14866 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14867           BOOT_JDK_FOUND=no
14868         else
14869           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14870           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14871             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14872 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14873             BOOT_JDK_FOUND=no
14874           else
14875             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14876             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14877 
14878             # Extra M4 quote needed to protect [] in grep expression.
14879             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14880             if test "x$FOUND_VERSION_78" = x; then
14881               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14882 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14883               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14884 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14885               BOOT_JDK_FOUND=no
14886             else
14887               # We're done! :-)
14888               BOOT_JDK_FOUND=yes
14889 
14890   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14891 
14892   # Input might be given as Windows format, start by converting to
14893   # unix format.
14894   path="$BOOT_JDK"
14895   new_path=`$CYGPATH -u "$path"`
14896 
14897   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14898   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14899   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14900   # "foo.exe" is OK but "foo" is an error.
14901   #
14902   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14903   # It is also a way to make sure we got the proper file name for the real test later on.
14904   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14905   if test "x$test_shortpath" = x; then
14906     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14907 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14908     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14909   fi
14910 
14911   # Call helper function which possibly converts this using DOS-style short mode.
14912   # If so, the updated path is stored in $new_path.
14913 
14914   input_path="$new_path"
14915   # Check if we need to convert this using DOS-style short mode. If the path
14916   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14917   # take no chances and rewrite it.
14918   # Note: m4 eats our [], so we need to use [ and ] instead.
14919   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14920   if test "x$has_forbidden_chars" != x; then
14921     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14922     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14923     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14924     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14925       # Going to short mode and back again did indeed matter. Since short mode is
14926       # case insensitive, let's make it lowercase to improve readability.
14927       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14928       # Now convert it back to Unix-stile (cygpath)
14929       input_path=`$CYGPATH -u "$shortmode_path"`
14930       new_path="$input_path"
14931     fi
14932   fi
14933 
14934   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14935   if test "x$test_cygdrive_prefix" = x; then
14936     # As a simple fix, exclude /usr/bin since it's not a real path.
14937     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14938       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14939       # a path prefixed by /cygdrive for fixpath to work.
14940       new_path="$CYGWIN_ROOT_PATH$input_path"
14941     fi
14942   fi
14943 
14944 
14945   if test "x$path" != "x$new_path"; then
14946     BOOT_JDK="$new_path"
14947     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14948 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14949   fi
14950 
14951   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14952 
14953   path="$BOOT_JDK"
14954   has_colon=`$ECHO $path | $GREP ^.:`
14955   new_path="$path"
14956   if test "x$has_colon" = x; then
14957     # Not in mixed or Windows style, start by that.
14958     new_path=`cmd //c echo $path`
14959   fi
14960 
14961 
14962   input_path="$new_path"
14963   # Check if we need to convert this using DOS-style short mode. If the path
14964   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14965   # take no chances and rewrite it.
14966   # Note: m4 eats our [], so we need to use [ and ] instead.
14967   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14968   if test "x$has_forbidden_chars" != x; then
14969     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14970     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14971   fi
14972 
14973 
14974   windows_path="$new_path"
14975   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14976     unix_path=`$CYGPATH -u "$windows_path"`
14977     new_path="$unix_path"
14978   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14979     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14980     new_path="$unix_path"
14981   fi
14982 
14983   if test "x$path" != "x$new_path"; then
14984     BOOT_JDK="$new_path"
14985     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14986 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14987   fi
14988 
14989   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14990   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14991 
14992   else
14993     # We're on a posix platform. Hooray! :)
14994     path="$BOOT_JDK"
14995     has_space=`$ECHO "$path" | $GREP " "`
14996     if test "x$has_space" != x; then
14997       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14998 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14999       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15000     fi
15001 
15002     # Use eval to expand a potential ~
15003     eval path="$path"
15004     if test ! -f "$path" && test ! -d "$path"; then
15005       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15006     fi
15007 
15008     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15009   fi
15010 
15011               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15012 $as_echo_n "checking for Boot JDK... " >&6; }
15013               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15014 $as_echo "$BOOT_JDK" >&6; }
15015               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15016 $as_echo_n "checking Boot JDK version... " >&6; }
15017               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15018               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15019 $as_echo "$BOOT_JDK_VERSION" >&6; }
15020             fi # end check jdk version
15021           fi # end check rt.jar
15022         fi # end check javac
15023       fi # end check java
15024     fi # end check boot jdk found
15025   fi
15026 
15027   elif test "x$OPENJDK_TARGET_OS" = xlinux; then
15028 
15029   if test "x$BOOT_JDK_FOUND" = xno; then
15030     # Now execute the test
15031 
15032   BOOT_JDK_PREFIX="/usr/lib/jvm"
15033   BOOT_JDK_SUFFIX=""
15034   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
15035   if test "x$ALL_JDKS_FOUND" != x; then
15036     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
15037 
15038   if test "x$BOOT_JDK_FOUND" = xno; then
15039     # Now execute the test
15040 
15041         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
15042         if test -d "$BOOT_JDK"; then
15043           BOOT_JDK_FOUND=maybe
15044           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
15045 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
15046         fi
15047 
15048 
15049     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15050     if test "x$BOOT_JDK_FOUND" = xmaybe; then
15051       # Do we have a bin/java?
15052       if test ! -x "$BOOT_JDK/bin/java"; then
15053         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15054 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15055         BOOT_JDK_FOUND=no
15056       else
15057         # Do we have a bin/javac?
15058         if test ! -x "$BOOT_JDK/bin/javac"; then
15059           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15060 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15061           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15062 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15063           BOOT_JDK_FOUND=no
15064         else
15065           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15066           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15067             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15068 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15069             BOOT_JDK_FOUND=no
15070           else
15071             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15072             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15073 
15074             # Extra M4 quote needed to protect [] in grep expression.
15075             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15076             if test "x$FOUND_VERSION_78" = x; then
15077               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15078 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15079               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15080 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15081               BOOT_JDK_FOUND=no
15082             else
15083               # We're done! :-)
15084               BOOT_JDK_FOUND=yes
15085 
15086   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15087 
15088   # Input might be given as Windows format, start by converting to
15089   # unix format.
15090   path="$BOOT_JDK"
15091   new_path=`$CYGPATH -u "$path"`
15092 
15093   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15094   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15095   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15096   # "foo.exe" is OK but "foo" is an error.
15097   #
15098   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15099   # It is also a way to make sure we got the proper file name for the real test later on.
15100   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15101   if test "x$test_shortpath" = x; then
15102     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15103 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15104     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15105   fi
15106 
15107   # Call helper function which possibly converts this using DOS-style short mode.
15108   # If so, the updated path is stored in $new_path.
15109 
15110   input_path="$new_path"
15111   # Check if we need to convert this using DOS-style short mode. If the path
15112   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15113   # take no chances and rewrite it.
15114   # Note: m4 eats our [], so we need to use [ and ] instead.
15115   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15116   if test "x$has_forbidden_chars" != x; then
15117     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15118     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15119     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15120     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15121       # Going to short mode and back again did indeed matter. Since short mode is
15122       # case insensitive, let's make it lowercase to improve readability.
15123       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15124       # Now convert it back to Unix-stile (cygpath)
15125       input_path=`$CYGPATH -u "$shortmode_path"`
15126       new_path="$input_path"
15127     fi
15128   fi
15129 
15130   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15131   if test "x$test_cygdrive_prefix" = x; then
15132     # As a simple fix, exclude /usr/bin since it's not a real path.
15133     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15134       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15135       # a path prefixed by /cygdrive for fixpath to work.
15136       new_path="$CYGWIN_ROOT_PATH$input_path"
15137     fi
15138   fi
15139 
15140 
15141   if test "x$path" != "x$new_path"; then
15142     BOOT_JDK="$new_path"
15143     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15144 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15145   fi
15146 
15147   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15148 
15149   path="$BOOT_JDK"
15150   has_colon=`$ECHO $path | $GREP ^.:`
15151   new_path="$path"
15152   if test "x$has_colon" = x; then
15153     # Not in mixed or Windows style, start by that.
15154     new_path=`cmd //c echo $path`
15155   fi
15156 
15157 
15158   input_path="$new_path"
15159   # Check if we need to convert this using DOS-style short mode. If the path
15160   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15161   # take no chances and rewrite it.
15162   # Note: m4 eats our [], so we need to use [ and ] instead.
15163   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15164   if test "x$has_forbidden_chars" != x; then
15165     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15166     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15167   fi
15168 
15169 
15170   windows_path="$new_path"
15171   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15172     unix_path=`$CYGPATH -u "$windows_path"`
15173     new_path="$unix_path"
15174   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15175     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15176     new_path="$unix_path"
15177   fi
15178 
15179   if test "x$path" != "x$new_path"; then
15180     BOOT_JDK="$new_path"
15181     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15182 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15183   fi
15184 
15185   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15186   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15187 
15188   else
15189     # We're on a posix platform. Hooray! :)
15190     path="$BOOT_JDK"
15191     has_space=`$ECHO "$path" | $GREP " "`
15192     if test "x$has_space" != x; then
15193       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15194 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15195       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15196     fi
15197 
15198     # Use eval to expand a potential ~
15199     eval path="$path"
15200     if test ! -f "$path" && test ! -d "$path"; then
15201       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15202     fi
15203 
15204     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15205   fi
15206 
15207               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15208 $as_echo_n "checking for Boot JDK... " >&6; }
15209               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15210 $as_echo "$BOOT_JDK" >&6; }
15211               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15212 $as_echo_n "checking Boot JDK version... " >&6; }
15213               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15214               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15215 $as_echo "$BOOT_JDK_VERSION" >&6; }
15216             fi # end check jdk version
15217           fi # end check rt.jar
15218         fi # end check javac
15219       fi # end check java
15220     fi # end check boot jdk found
15221   fi
15222 
15223     done
15224   fi
15225 
15226 
15227     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15228     if test "x$BOOT_JDK_FOUND" = xmaybe; then
15229       # Do we have a bin/java?
15230       if test ! -x "$BOOT_JDK/bin/java"; then
15231         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15232 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15233         BOOT_JDK_FOUND=no
15234       else
15235         # Do we have a bin/javac?
15236         if test ! -x "$BOOT_JDK/bin/javac"; then
15237           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15238 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15239           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15240 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15241           BOOT_JDK_FOUND=no
15242         else
15243           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15244           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15245             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15246 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15247             BOOT_JDK_FOUND=no
15248           else
15249             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15250             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15251 
15252             # Extra M4 quote needed to protect [] in grep expression.
15253             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15254             if test "x$FOUND_VERSION_78" = x; then
15255               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15256 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15257               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15258 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15259               BOOT_JDK_FOUND=no
15260             else
15261               # We're done! :-)
15262               BOOT_JDK_FOUND=yes
15263 
15264   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15265 
15266   # Input might be given as Windows format, start by converting to
15267   # unix format.
15268   path="$BOOT_JDK"
15269   new_path=`$CYGPATH -u "$path"`
15270 
15271   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15272   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15273   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15274   # "foo.exe" is OK but "foo" is an error.
15275   #
15276   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15277   # It is also a way to make sure we got the proper file name for the real test later on.
15278   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15279   if test "x$test_shortpath" = x; then
15280     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15281 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15282     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15283   fi
15284 
15285   # Call helper function which possibly converts this using DOS-style short mode.
15286   # If so, the updated path is stored in $new_path.
15287 
15288   input_path="$new_path"
15289   # Check if we need to convert this using DOS-style short mode. If the path
15290   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15291   # take no chances and rewrite it.
15292   # Note: m4 eats our [], so we need to use [ and ] instead.
15293   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15294   if test "x$has_forbidden_chars" != x; then
15295     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15296     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15297     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15298     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15299       # Going to short mode and back again did indeed matter. Since short mode is
15300       # case insensitive, let's make it lowercase to improve readability.
15301       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15302       # Now convert it back to Unix-stile (cygpath)
15303       input_path=`$CYGPATH -u "$shortmode_path"`
15304       new_path="$input_path"
15305     fi
15306   fi
15307 
15308   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15309   if test "x$test_cygdrive_prefix" = x; then
15310     # As a simple fix, exclude /usr/bin since it's not a real path.
15311     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15312       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15313       # a path prefixed by /cygdrive for fixpath to work.
15314       new_path="$CYGWIN_ROOT_PATH$input_path"
15315     fi
15316   fi
15317 
15318 
15319   if test "x$path" != "x$new_path"; then
15320     BOOT_JDK="$new_path"
15321     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15322 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15323   fi
15324 
15325   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15326 
15327   path="$BOOT_JDK"
15328   has_colon=`$ECHO $path | $GREP ^.:`
15329   new_path="$path"
15330   if test "x$has_colon" = x; then
15331     # Not in mixed or Windows style, start by that.
15332     new_path=`cmd //c echo $path`
15333   fi
15334 
15335 
15336   input_path="$new_path"
15337   # Check if we need to convert this using DOS-style short mode. If the path
15338   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15339   # take no chances and rewrite it.
15340   # Note: m4 eats our [], so we need to use [ and ] instead.
15341   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15342   if test "x$has_forbidden_chars" != x; then
15343     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15344     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15345   fi
15346 
15347 
15348   windows_path="$new_path"
15349   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15350     unix_path=`$CYGPATH -u "$windows_path"`
15351     new_path="$unix_path"
15352   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15353     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15354     new_path="$unix_path"
15355   fi
15356 
15357   if test "x$path" != "x$new_path"; then
15358     BOOT_JDK="$new_path"
15359     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15360 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15361   fi
15362 
15363   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15364   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15365 
15366   else
15367     # We're on a posix platform. Hooray! :)
15368     path="$BOOT_JDK"
15369     has_space=`$ECHO "$path" | $GREP " "`
15370     if test "x$has_space" != x; then
15371       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15372 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15373       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15374     fi
15375 
15376     # Use eval to expand a potential ~
15377     eval path="$path"
15378     if test ! -f "$path" && test ! -d "$path"; then
15379       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15380     fi
15381 
15382     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15383   fi
15384 
15385               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15386 $as_echo_n "checking for Boot JDK... " >&6; }
15387               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15388 $as_echo "$BOOT_JDK" >&6; }
15389               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15390 $as_echo_n "checking Boot JDK version... " >&6; }
15391               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15392               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15393 $as_echo "$BOOT_JDK_VERSION" >&6; }
15394             fi # end check jdk version
15395           fi # end check rt.jar
15396         fi # end check javac
15397       fi # end check java
15398     fi # end check boot jdk found
15399   fi
15400 
15401   fi
15402 
15403 
15404     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15405     if test "x$BOOT_JDK_FOUND" = xmaybe; then
15406       # Do we have a bin/java?
15407       if test ! -x "$BOOT_JDK/bin/java"; then
15408         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15409 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15410         BOOT_JDK_FOUND=no
15411       else
15412         # Do we have a bin/javac?
15413         if test ! -x "$BOOT_JDK/bin/javac"; then
15414           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15415 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15416           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15417 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15418           BOOT_JDK_FOUND=no
15419         else
15420           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15421           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15422             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15423 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15424             BOOT_JDK_FOUND=no
15425           else
15426             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15427             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15428 
15429             # Extra M4 quote needed to protect [] in grep expression.
15430             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15431             if test "x$FOUND_VERSION_78" = x; then
15432               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15433 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15434               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15435 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15436               BOOT_JDK_FOUND=no
15437             else
15438               # We're done! :-)
15439               BOOT_JDK_FOUND=yes
15440 
15441   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15442 
15443   # Input might be given as Windows format, start by converting to
15444   # unix format.
15445   path="$BOOT_JDK"
15446   new_path=`$CYGPATH -u "$path"`
15447 
15448   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15449   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15450   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15451   # "foo.exe" is OK but "foo" is an error.
15452   #
15453   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15454   # It is also a way to make sure we got the proper file name for the real test later on.
15455   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15456   if test "x$test_shortpath" = x; then
15457     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15458 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15459     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15460   fi
15461 
15462   # Call helper function which possibly converts this using DOS-style short mode.
15463   # If so, the updated path is stored in $new_path.
15464 
15465   input_path="$new_path"
15466   # Check if we need to convert this using DOS-style short mode. If the path
15467   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15468   # take no chances and rewrite it.
15469   # Note: m4 eats our [], so we need to use [ and ] instead.
15470   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15471   if test "x$has_forbidden_chars" != x; then
15472     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15473     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15474     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15475     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15476       # Going to short mode and back again did indeed matter. Since short mode is
15477       # case insensitive, let's make it lowercase to improve readability.
15478       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15479       # Now convert it back to Unix-stile (cygpath)
15480       input_path=`$CYGPATH -u "$shortmode_path"`
15481       new_path="$input_path"
15482     fi
15483   fi
15484 
15485   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15486   if test "x$test_cygdrive_prefix" = x; then
15487     # As a simple fix, exclude /usr/bin since it's not a real path.
15488     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15489       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15490       # a path prefixed by /cygdrive for fixpath to work.
15491       new_path="$CYGWIN_ROOT_PATH$input_path"
15492     fi
15493   fi
15494 
15495 
15496   if test "x$path" != "x$new_path"; then
15497     BOOT_JDK="$new_path"
15498     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15499 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15500   fi
15501 
15502   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15503 
15504   path="$BOOT_JDK"
15505   has_colon=`$ECHO $path | $GREP ^.:`
15506   new_path="$path"
15507   if test "x$has_colon" = x; then
15508     # Not in mixed or Windows style, start by that.
15509     new_path=`cmd //c echo $path`
15510   fi
15511 
15512 
15513   input_path="$new_path"
15514   # Check if we need to convert this using DOS-style short mode. If the path
15515   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15516   # take no chances and rewrite it.
15517   # Note: m4 eats our [], so we need to use [ and ] instead.
15518   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15519   if test "x$has_forbidden_chars" != x; then
15520     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15521     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15522   fi
15523 
15524 
15525   windows_path="$new_path"
15526   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15527     unix_path=`$CYGPATH -u "$windows_path"`
15528     new_path="$unix_path"
15529   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15530     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15531     new_path="$unix_path"
15532   fi
15533 
15534   if test "x$path" != "x$new_path"; then
15535     BOOT_JDK="$new_path"
15536     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15537 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15538   fi
15539 
15540   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15541   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15542 
15543   else
15544     # We're on a posix platform. Hooray! :)
15545     path="$BOOT_JDK"
15546     has_space=`$ECHO "$path" | $GREP " "`
15547     if test "x$has_space" != x; then
15548       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15549 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15550       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15551     fi
15552 
15553     # Use eval to expand a potential ~
15554     eval path="$path"
15555     if test ! -f "$path" && test ! -d "$path"; then
15556       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15557     fi
15558 
15559     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15560   fi
15561 
15562               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15563 $as_echo_n "checking for Boot JDK... " >&6; }
15564               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15565 $as_echo "$BOOT_JDK" >&6; }
15566               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15567 $as_echo_n "checking Boot JDK version... " >&6; }
15568               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15569               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15570 $as_echo "$BOOT_JDK_VERSION" >&6; }
15571             fi # end check jdk version
15572           fi # end check rt.jar
15573         fi # end check javac
15574       fi # end check java
15575     fi # end check boot jdk found
15576   fi
15577 
15578 
15579 # If we haven't found anything yet, we've truly lost. Give up.
15580 if test "x$BOOT_JDK_FOUND" = xno; then
15581 
15582     # Print a helpful message on how to acquire the necessary build dependency.
15583     # openjdk is the help tag: freetyp2, cups, pulse, alsa etc
15584     MISSING_DEPENDENCY=openjdk
15585     PKGHANDLER_COMMAND=
15586 
15587     case $PKGHANDLER in
15588         apt-get)
15589                 apt_help     $MISSING_DEPENDENCY ;;
15590     yum)
15591                 yum_help     $MISSING_DEPENDENCY ;;
15592         port)
15593                 port_help    $MISSING_DEPENDENCY ;;
15594         pkgutil)
15595                 pkgutil_help $MISSING_DEPENDENCY ;;
15596         pkgadd)
15597                 pkgadd_help  $MISSING_DEPENDENCY ;;
15598     * )
15599       break ;;
15600     esac
15601 
15602     if test "x$PKGHANDLER_COMMAND" != x; then
15603         HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
15604     fi
15605 
15606   { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
15607 $as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
15608   { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
15609 $as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15610   as_fn_error $? "Cannot continue" "$LINENO" 5
15611 fi
15612 
15613 # Setup proper paths for what we found
15614 BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
15615 if test ! -f "$BOOT_RTJAR"; then
15616     # On MacOSX it is called classes.jar
15617     BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
15618     if test -f "$BOOT_RTJAR"; then
15619       # Remove the ..
15620       BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
15621     fi
15622 fi
15623 BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
15624 BOOT_JDK="$BOOT_JDK"
15625 
15626 
15627 
15628 
15629 # Setup tools from the Boot JDK.
15630 
15631   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
15632 $as_echo_n "checking for java in Boot JDK... " >&6; }
15633   JAVA=$BOOT_JDK/bin/java
15634   if test ! -x $JAVA; then
15635       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15636 $as_echo "not found" >&6; }
15637       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15638 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15639       as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
15640   fi
15641   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15642 $as_echo "ok" >&6; }
15643 
15644 
15645   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
15646 $as_echo_n "checking for javac in Boot JDK... " >&6; }
15647   JAVAC=$BOOT_JDK/bin/javac
15648   if test ! -x $JAVAC; then
15649       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15650 $as_echo "not found" >&6; }
15651       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15652 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15653       as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
15654   fi
15655   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15656 $as_echo "ok" >&6; }
15657 
15658 
15659   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
15660 $as_echo_n "checking for javah in Boot JDK... " >&6; }
15661   JAVAH=$BOOT_JDK/bin/javah
15662   if test ! -x $JAVAH; then
15663       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15664 $as_echo "not found" >&6; }
15665       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15666 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15667       as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
15668   fi
15669   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15670 $as_echo "ok" >&6; }
15671 
15672 
15673   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
15674 $as_echo_n "checking for javap in Boot JDK... " >&6; }
15675   JAVAP=$BOOT_JDK/bin/javap
15676   if test ! -x $JAVAP; then
15677       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15678 $as_echo "not found" >&6; }
15679       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15680 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15681       as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
15682   fi
15683   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15684 $as_echo "ok" >&6; }
15685 
15686 
15687   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
15688 $as_echo_n "checking for jar in Boot JDK... " >&6; }
15689   JAR=$BOOT_JDK/bin/jar
15690   if test ! -x $JAR; then
15691       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15692 $as_echo "not found" >&6; }
15693       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15694 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15695       as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
15696   fi
15697   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15698 $as_echo "ok" >&6; }
15699 
15700 
15701   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
15702 $as_echo_n "checking for rmic in Boot JDK... " >&6; }
15703   RMIC=$BOOT_JDK/bin/rmic
15704   if test ! -x $RMIC; then
15705       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15706 $as_echo "not found" >&6; }
15707       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15708 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15709       as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
15710   fi
15711   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15712 $as_echo "ok" >&6; }
15713 
15714 
15715   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
15716 $as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
15717   NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
15718   if test ! -x $NATIVE2ASCII; then
15719       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15720 $as_echo "not found" >&6; }
15721       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15722 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15723       as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
15724   fi
15725   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15726 $as_echo "ok" >&6; }
15727 
15728 
15729 # Finally, set some other options...
15730 
15731 # When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
15732 BOOT_JDK_SOURCETARGET="-source 7 -target 7"
15733 
15734 
15735 
15736 
15737 ##############################################################################
15738 #
15739 # Specify options for anything that is run with the Boot JDK.
15740 #
15741 
15742 # Check whether --with-boot-jdk-jvmargs was given.
15743 if test "${with_boot_jdk_jvmargs+set}" = set; then :
15744   withval=$with_boot_jdk_jvmargs;
15745 fi
15746 
15747 
15748 if test "x$with_boot_jdk_jvmargs" = x; then
15749     # Not all JVM:s accept the same arguments on the command line.
15750     # OpenJDK specific increase in thread stack for JDK build,
15751     # well more specifically, when running javac.
15752     if test "x$BUILD_NUM_BITS" = x32; then
15753        STACK_SIZE=768
15754     else
15755        # Running Javac on a JVM on a 64-bit machine, the stack takes more space
15756        # since 64-bit pointers are pushed on the stach. Apparently, we need
15757        # to increase the stack space when javacing the JDK....
15758        STACK_SIZE=1536
15759     fi
15760 
15761     # Minimum amount of heap memory.
15762 
15763     $ECHO "Check if jvm arg is ok: -Xms64M" >&5
15764     $ECHO "Command: $JAVA -Xms64M -version" >&5
15765     OUTPUT=`$JAVA -Xms64M -version 2>&1`
15766     FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15767     FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15768     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15769         boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
15770         JVM_ARG_OK=true
15771     else
15772         $ECHO "Arg failed:" >&5
15773         $ECHO "$OUTPUT" >&5
15774         JVM_ARG_OK=false
15775     fi
15776 
15777     if test "x$OPENJDK_TARGET_OS" = "xmacosx" || test "x$OPENJDK_TARGET_CPU" = "xppc64" ; then
15778         # Why does macosx need more heap? Its the huge JDK batch.
15779 
15780     $ECHO "Check if jvm arg is ok: -Xmx1600M" >&5
15781     $ECHO "Command: $JAVA -Xmx1600M -version" >&5
15782     OUTPUT=`$JAVA -Xmx1600M -version 2>&1`
15783     FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15784     FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15785     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15786         boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
15787         JVM_ARG_OK=true
15788     else
15789         $ECHO "Arg failed:" >&5
15790         $ECHO "$OUTPUT" >&5
15791         JVM_ARG_OK=false
15792     fi
15793 
15794     else
15795 
15796     $ECHO "Check if jvm arg is ok: -Xmx1100M" >&5
15797     $ECHO "Command: $JAVA -Xmx1100M -version" >&5
15798     OUTPUT=`$JAVA -Xmx1100M -version 2>&1`
15799     FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15800     FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15801     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15802         boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
15803         JVM_ARG_OK=true
15804     else
15805         $ECHO "Arg failed:" >&5
15806         $ECHO "$OUTPUT" >&5
15807         JVM_ARG_OK=false
15808     fi
15809 
15810     fi
15811     # When is adding -client something that speeds up the JVM?
15812     # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
15813 
15814     $ECHO "Check if jvm arg is ok: -XX:PermSize=32m" >&5
15815     $ECHO "Command: $JAVA -XX:PermSize=32m -version" >&5
15816     OUTPUT=`$JAVA -XX:PermSize=32m -version 2>&1`
15817     FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15818     FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15819     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15820         boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
15821         JVM_ARG_OK=true
15822     else
15823         $ECHO "Arg failed:" >&5
15824         $ECHO "$OUTPUT" >&5
15825         JVM_ARG_OK=false
15826     fi
15827 
15828 
15829     $ECHO "Check if jvm arg is ok: -XX:MaxPermSize=160m" >&5
15830     $ECHO "Command: $JAVA -XX:MaxPermSize=160m -version" >&5
15831     OUTPUT=`$JAVA -XX:MaxPermSize=160m -version 2>&1`
15832     FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15833     FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15834     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15835         boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
15836         JVM_ARG_OK=true
15837     else
15838         $ECHO "Arg failed:" >&5
15839         $ECHO "$OUTPUT" >&5
15840         JVM_ARG_OK=false
15841     fi
15842 
15843 
15844     $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
15845     $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
15846     OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
15847     FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15848     FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15849     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15850         boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
15851         JVM_ARG_OK=true
15852     else
15853         $ECHO "Arg failed:" >&5
15854         $ECHO "$OUTPUT" >&5
15855         JVM_ARG_OK=false
15856     fi
15857 
15858     # Disable special log output when a debug build is used as Boot JDK...
15859 
15860     $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
15861     $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
15862     OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
15863     FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15864     FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15865     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15866         boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
15867         JVM_ARG_OK=true
15868     else
15869         $ECHO "Arg failed:" >&5
15870         $ECHO "$OUTPUT" >&5
15871         JVM_ARG_OK=false
15872     fi
15873 
15874 fi
15875 
15876 BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
15877 
15878 
15879 
15880 ###############################################################################
15881 #
15882 # Configure the sources to use. We can add or override individual directories.
15883 #
15884 ###############################################################################
15885 
15886 
15887 
15888 # Where are the sources. Any of these can be overridden
15889 # using --with-override-corba and the likes.
15890 LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
15891 CORBA_TOPDIR="$SRC_ROOT/corba"
15892 JAXP_TOPDIR="$SRC_ROOT/jaxp"
15893 JAXWS_TOPDIR="$SRC_ROOT/jaxws"
15894 HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
15895 NASHORN_TOPDIR="$SRC_ROOT/nashorn"
15896 JDK_TOPDIR="$SRC_ROOT/jdk"
15897 
15898 
15899 
15900 
15901 
15902 
15903 
15904 
15905 
15906 
15907 ###############################################################################
15908 #
15909 # Pickup additional source for a component from outside of the source root
15910 # or override source for a component.
15911 #
15912 
15913 # Check whether --with-add-source-root was given.
15914 if test "${with_add_source_root+set}" = set; then :
15915   withval=$with_add_source_root;
15916 fi
15917 
15918 
15919 
15920 # Check whether --with-override-source-root was given.
15921 if test "${with_override_source_root+set}" = set; then :
15922   withval=$with_override_source_root;
15923 fi
15924 
15925 
15926 
15927 # Check whether --with-adds-and-overrides was given.
15928 if test "${with_adds_and_overrides+set}" = set; then :
15929   withval=$with_adds_and_overrides;
15930 fi
15931 
15932 
15933 if test "x$with_adds_and_overrides" != x; then
15934     with_add_source_root="$with_adds_and_overrides/adds"
15935     with_override_source_root="$with_adds_and_overrides/overrides"
15936 fi
15937 
15938 if test "x$with_add_source_root" != x; then
15939     if ! test -d $with_add_source_root; then
15940        as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
15941     fi
15942     CURDIR="$PWD"
15943     cd "$with_add_source_root"
15944     ADD_SRC_ROOT="`pwd`"
15945     cd "$CURDIR"
15946     # Verify that the addon source root does not have any root makefiles.
15947     # If it does, then it is usually an error, prevent this.
15948     if test -f $with_add_source_root/langtools/makefiles/Makefile || \
15949        test -f $with_add_source_root/langtools/make/Makefile; then
15950         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
15951     fi
15952     if test -f $with_add_source_root/corba/makefiles/Makefile || \
15953        test -f $with_add_source_root/corba/make/Makefile; then
15954         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
15955     fi
15956     if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
15957        test -f $with_add_source_root/jaxp/make/Makefile; then
15958         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
15959     fi
15960     if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
15961        test -f $with_add_source_root/jaxws/make/Makefile; then
15962         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
15963     fi
15964     if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
15965        test -f $with_add_source_root/hotspot/make/Makefile; then
15966         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
15967     fi
15968     if test -f $with_add_source_root/jdk/makefiles/Makefile || \
15969        test -f $with_add_source_root/jdk/make/Makefile; then
15970         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
15971     fi
15972 fi
15973 
15974 
15975 if test "x$with_override_source_root" != x; then
15976     if ! test -d $with_override_source_root; then
15977        as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
15978     fi
15979     CURDIR="$PWD"
15980     cd "$with_override_source_root"
15981     OVERRIDE_SRC_ROOT="`pwd`"
15982     cd "$CURDIR"
15983     if test -f $with_override_source_root/langtools/makefiles/Makefile || \
15984        test -f $with_override_source_root/langtools/make/Makefile; then
15985         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
15986     fi
15987     if test -f $with_override_source_root/corba/makefiles/Makefile || \
15988        test -f $with_override_source_root/corba/make/Makefile; then
15989         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
15990     fi
15991     if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
15992        test -f $with_override_source_root/jaxp/make/Makefile; then
15993         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
15994     fi
15995     if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
15996        test -f $with_override_source_root/jaxws/make/Makefile; then
15997         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
15998     fi
15999     if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
16000        test -f $with_override_source_root/hotspot/make/Makefile; then
16001         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
16002     fi
16003     if test -f $with_override_source_root/jdk/makefiles/Makefile || \
16004        test -f $with_override_source_root/jdk/make/Makefile; then
16005         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
16006     fi
16007 fi
16008 
16009 
16010 ###############################################################################
16011 #
16012 # Override a repo completely, this is used for example when you have 3 small
16013 # development sandboxes of the langtools sources and want to avoid having 3 full
16014 # OpenJDK sources checked out on disk.
16015 #
16016 # Assuming that the 3 langtools sandboxes are located here:
16017 # /home/fredrik/sandbox1/langtools
16018 # /home/fredrik/sandbox2/langtools
16019 # /home/fredrik/sandbox3/langtools
16020 #
16021 # From the source root you create build subdirs manually:
16022 #     mkdir -p build1 build2 build3
16023 # in each build directory run:
16024 #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
16025 #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
16026 #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
16027 #
16028 
16029 
16030 # Check whether --with-override-langtools was given.
16031 if test "${with_override_langtools+set}" = set; then :
16032   withval=$with_override_langtools;
16033 fi
16034 
16035 
16036 
16037 # Check whether --with-override-corba was given.
16038 if test "${with_override_corba+set}" = set; then :
16039   withval=$with_override_corba;
16040 fi
16041 
16042 
16043 
16044 # Check whether --with-override-jaxp was given.
16045 if test "${with_override_jaxp+set}" = set; then :
16046   withval=$with_override_jaxp;
16047 fi
16048 
16049 
16050 
16051 # Check whether --with-override-jaxws was given.
16052 if test "${with_override_jaxws+set}" = set; then :
16053   withval=$with_override_jaxws;
16054 fi
16055 
16056 
16057 
16058 # Check whether --with-override-hotspot was given.
16059 if test "${with_override_hotspot+set}" = set; then :
16060   withval=$with_override_hotspot;
16061 fi
16062 
16063 
16064 
16065 # Check whether --with-override-jdk was given.
16066 if test "${with_override_jdk+set}" = set; then :
16067   withval=$with_override_jdk;
16068 fi
16069 
16070 
16071 if test "x$with_override_langtools" != x; then
16072     CURDIR="$PWD"
16073     cd "$with_override_langtools"
16074     LANGTOOLS_TOPDIR="`pwd`"
16075     cd "$CURDIR"
16076     if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
16077         as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
16078     fi
16079     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
16080 $as_echo_n "checking if langtools should be overridden... " >&6; }
16081     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
16082 $as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
16083 fi
16084 if test "x$with_override_corba" != x; then
16085     CURDIR="$PWD"
16086     cd "$with_override_corba"
16087     CORBA_TOPDIR="`pwd`"
16088     cd "$CURDIR"
16089     if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
16090         as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
16091     fi
16092     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
16093 $as_echo_n "checking if corba should be overridden... " >&6; }
16094     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
16095 $as_echo "yes with $CORBA_TOPDIR" >&6; }
16096 fi
16097 if test "x$with_override_jaxp" != x; then
16098     CURDIR="$PWD"
16099     cd "$with_override_jaxp"
16100     JAXP_TOPDIR="`pwd`"
16101     cd "$CURDIR"
16102     if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
16103         as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
16104     fi
16105     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
16106 $as_echo_n "checking if jaxp should be overridden... " >&6; }
16107     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
16108 $as_echo "yes with $JAXP_TOPDIR" >&6; }
16109 fi
16110 if test "x$with_override_jaxws" != x; then
16111     CURDIR="$PWD"
16112     cd "$with_override_jaxws"
16113     JAXWS_TOPDIR="`pwd`"
16114     cd "$CURDIR"
16115     if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
16116         as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
16117     fi
16118     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
16119 $as_echo_n "checking if jaxws should be overridden... " >&6; }
16120     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
16121 $as_echo "yes with $JAXWS_TOPDIR" >&6; }
16122 fi
16123 if test "x$with_override_hotspot" != x; then
16124     CURDIR="$PWD"
16125     cd "$with_override_hotspot"
16126     HOTSPOT_TOPDIR="`pwd`"
16127     cd "$CURDIR"
16128     if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
16129        ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
16130         as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
16131     fi
16132     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
16133 $as_echo_n "checking if hotspot should be overridden... " >&6; }
16134     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
16135 $as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
16136 fi
16137 if test "x$with_override_nashorn" != x; then
16138     CURDIR="$PWD"
16139     cd "$with_override_nashorn"
16140     NASHORN_TOPDIR="`pwd`"
16141     cd "$CURDIR"
16142     if ! test -f $NASHORN_TOPDIR/makefiles/BuildNashorn.gmk; then
16143         as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
16144     fi
16145     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
16146 $as_echo_n "checking if nashorn should be overridden... " >&6; }
16147     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
16148 $as_echo "yes with $NASHORN_TOPDIR" >&6; }
16149 fi
16150 if test "x$with_override_jdk" != x; then
16151     CURDIR="$PWD"
16152     cd "$with_override_jdk"
16153     JDK_TOPDIR="`pwd`"
16154     cd "$CURDIR"
16155     if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
16156         as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
16157     fi
16158     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
16159 $as_echo_n "checking if JDK should be overridden... " >&6; }
16160     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
16161 $as_echo "yes with $JDK_TOPDIR" >&6; }
16162 fi
16163 
16164 
16165 
16166 BUILD_OUTPUT="$OUTPUT_ROOT"
16167 
16168 
16169 HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
16170 BUILD_HOTSPOT=true
16171 
16172 
16173 
16174 # Check whether --with-import-hotspot was given.
16175 if test "${with_import_hotspot+set}" = set; then :
16176   withval=$with_import_hotspot;
16177 fi
16178 
16179 if test "x$with_import_hotspot" != x; then
16180     CURDIR="$PWD"
16181     cd "$with_import_hotspot"
16182     HOTSPOT_DIST="`pwd`"
16183     cd "$CURDIR"
16184     if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
16185         as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
16186     fi
16187     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
16188 $as_echo_n "checking if hotspot should be imported... " >&6; }
16189     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
16190 $as_echo "yes from $HOTSPOT_DIST" >&6; }
16191     BUILD_HOTSPOT=false
16192 fi
16193 
16194 JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
16195 
16196 
16197 ###############################################################################
16198 #
16199 # Setup the toolchain (compilers etc), i.e. the tools that need to be
16200 # cross-compilation aware.
16201 #
16202 ###############################################################################
16203 
16204 
16205 ###############################################################################
16206 #
16207 # Configure the development tool paths and potential sysroot.
16208 #
16209 ac_ext=cpp
16210 ac_cpp='$CXXCPP $CPPFLAGS'
16211 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16212 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16213 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16214 
16215 
16216 # The option used to specify the target .o,.a or .so file.
16217 # When compiling, how to specify the to be created object file.
16218 CC_OUT_OPTION='-o$(SPACE)'
16219 # When linking, how to specify the to be created executable.
16220 EXE_OUT_OPTION='-o$(SPACE)'
16221 # When linking, how to specify the to be created dynamically linkable library.
16222 LD_OUT_OPTION='-o$(SPACE)'
16223 # When archiving, how to specify the to be create static archive for object files.
16224 AR_OUT_OPTION='rcs$(SPACE)'
16225 
16226 
16227 
16228 
16229 
16230 # Locate the actual tools
16231 
16232 
16233 # Check whether --with-jtreg was given.
16234 if test "${with_jtreg+set}" = set; then :
16235   withval=$with_jtreg;
16236 else
16237   with_jtreg=no
16238 fi
16239 
16240 
16241   if test "x$with_jtreg" = xno; then
16242     # jtreg disabled
16243     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16244 $as_echo_n "checking for jtreg... " >&6; }
16245     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16246 $as_echo "no" >&6; }
16247   else
16248     if test "x$with_jtreg" != xyes; then
16249       # with path specified.
16250       JT_HOME="$with_jtreg"
16251     fi
16252 
16253     if test "x$JT_HOME" != x; then
16254       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16255 $as_echo_n "checking for jtreg... " >&6; }
16256 
16257       # use JT_HOME enviroment var.
16258 
16259   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16260 
16261   # Input might be given as Windows format, start by converting to
16262   # unix format.
16263   path="$JT_HOME"
16264   new_path=`$CYGPATH -u "$path"`
16265 
16266   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16267   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16268   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16269   # "foo.exe" is OK but "foo" is an error.
16270   #
16271   # This test is therefore slightly more accurate than "test -f" to check for file precense.
16272   # It is also a way to make sure we got the proper file name for the real test later on.
16273   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16274   if test "x$test_shortpath" = x; then
16275     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16276 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16277     as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
16278   fi
16279 
16280   # Call helper function which possibly converts this using DOS-style short mode.
16281   # If so, the updated path is stored in $new_path.
16282 
16283   input_path="$new_path"
16284   # Check if we need to convert this using DOS-style short mode. If the path
16285   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16286   # take no chances and rewrite it.
16287   # Note: m4 eats our [], so we need to use [ and ] instead.
16288   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16289   if test "x$has_forbidden_chars" != x; then
16290     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16291     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16292     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16293     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16294       # Going to short mode and back again did indeed matter. Since short mode is
16295       # case insensitive, let's make it lowercase to improve readability.
16296       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16297       # Now convert it back to Unix-stile (cygpath)
16298       input_path=`$CYGPATH -u "$shortmode_path"`
16299       new_path="$input_path"
16300     fi
16301   fi
16302 
16303   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16304   if test "x$test_cygdrive_prefix" = x; then
16305     # As a simple fix, exclude /usr/bin since it's not a real path.
16306     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16307       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16308       # a path prefixed by /cygdrive for fixpath to work.
16309       new_path="$CYGWIN_ROOT_PATH$input_path"
16310     fi
16311   fi
16312 
16313 
16314   if test "x$path" != "x$new_path"; then
16315     JT_HOME="$new_path"
16316     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16317 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16318   fi
16319 
16320   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16321 
16322   path="$JT_HOME"
16323   has_colon=`$ECHO $path | $GREP ^.:`
16324   new_path="$path"
16325   if test "x$has_colon" = x; then
16326     # Not in mixed or Windows style, start by that.
16327     new_path=`cmd //c echo $path`
16328   fi
16329 
16330 
16331   input_path="$new_path"
16332   # Check if we need to convert this using DOS-style short mode. If the path
16333   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16334   # take no chances and rewrite it.
16335   # Note: m4 eats our [], so we need to use [ and ] instead.
16336   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16337   if test "x$has_forbidden_chars" != x; then
16338     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16339     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16340   fi
16341 
16342 
16343   windows_path="$new_path"
16344   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16345     unix_path=`$CYGPATH -u "$windows_path"`
16346     new_path="$unix_path"
16347   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16348     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16349     new_path="$unix_path"
16350   fi
16351 
16352   if test "x$path" != "x$new_path"; then
16353     JT_HOME="$new_path"
16354     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16355 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16356   fi
16357 
16358   # Save the first 10 bytes of this path to the storage, so fixpath can work.
16359   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16360 
16361   else
16362     # We're on a posix platform. Hooray! :)
16363     path="$JT_HOME"
16364     has_space=`$ECHO "$path" | $GREP " "`
16365     if test "x$has_space" != x; then
16366       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16367 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16368       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16369     fi
16370 
16371     # Use eval to expand a potential ~
16372     eval path="$path"
16373     if test ! -f "$path" && test ! -d "$path"; then
16374       as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
16375     fi
16376 
16377     JT_HOME="`cd "$path"; $THEPWDCMD -L`"
16378   fi
16379 
16380 
16381       # jtreg win32 script works for everybody
16382       JTREGEXE="$JT_HOME/win32/bin/jtreg"
16383 
16384       if test ! -f "$JTREGEXE"; then
16385         as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
16386       fi
16387 
16388       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16389 $as_echo "$JTREGEXE" >&6; }
16390     else
16391       # try to find jtreg on path
16392 
16393     for ac_prog in jtreg
16394 do
16395   # Extract the first word of "$ac_prog", so it can be a program name with args.
16396 set dummy $ac_prog; ac_word=$2
16397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16398 $as_echo_n "checking for $ac_word... " >&6; }
16399 if ${ac_cv_path_JTREGEXE+:} false; then :
16400   $as_echo_n "(cached) " >&6
16401 else
16402   case $JTREGEXE in
16403   [\\/]* | ?:[\\/]*)
16404   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
16405   ;;
16406   *)
16407   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16408 for as_dir in $PATH
16409 do
16410   IFS=$as_save_IFS
16411   test -z "$as_dir" && as_dir=.
16412     for ac_exec_ext in '' $ac_executable_extensions; do
16413   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16414     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
16415     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16416     break 2
16417   fi
16418 done
16419   done
16420 IFS=$as_save_IFS
16421 
16422   ;;
16423 esac
16424 fi
16425 JTREGEXE=$ac_cv_path_JTREGEXE
16426 if test -n "$JTREGEXE"; then
16427   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16428 $as_echo "$JTREGEXE" >&6; }
16429 else
16430   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16431 $as_echo "no" >&6; }
16432 fi
16433 
16434 
16435   test -n "$JTREGEXE" && break
16436 done
16437 
16438 
16439     if test "x$JTREGEXE" = x; then
16440         if test "xjtreg" = x; then
16441           PROG_NAME=jtregexe
16442         else
16443           PROG_NAME=jtreg
16444         fi
16445         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
16446 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
16447         as_fn_error $? "Cannot continue" "$LINENO" 5
16448     fi
16449 
16450 
16451       JT_HOME="`$DIRNAME $JTREGEXE`"
16452     fi
16453   fi
16454 
16455 
16456 
16457 
16458 
16459 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16460 
16461   # Store path to cygwin link.exe to help excluding it when searching for
16462   # VS linker. This must be done before changing the PATH when looking for VS.
16463   # Extract the first word of "link", so it can be a program name with args.
16464 set dummy link; ac_word=$2
16465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16466 $as_echo_n "checking for $ac_word... " >&6; }
16467 if ${ac_cv_path_CYGWIN_LINK+:} false; then :
16468   $as_echo_n "(cached) " >&6
16469 else
16470   case $CYGWIN_LINK in
16471   [\\/]* | ?:[\\/]*)
16472   ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
16473   ;;
16474   *)
16475   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16476 for as_dir in $PATH
16477 do
16478   IFS=$as_save_IFS
16479   test -z "$as_dir" && as_dir=.
16480     for ac_exec_ext in '' $ac_executable_extensions; do
16481   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16482     ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
16483     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16484     break 2
16485   fi
16486 done
16487   done
16488 IFS=$as_save_IFS
16489 
16490   ;;
16491 esac
16492 fi
16493 CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
16494 if test -n "$CYGWIN_LINK"; then
16495   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
16496 $as_echo "$CYGWIN_LINK" >&6; }
16497 else
16498   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16499 $as_echo "no" >&6; }
16500 fi
16501 
16502 
16503   if test "x$CYGWIN_LINK" != x; then
16504     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
16505 $as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
16506     "$CYGWIN_LINK" --version > /dev/null
16507     if test $? -eq 0 ; then
16508       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16509 $as_echo "yes" >&6; }
16510     else
16511       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16512 $as_echo "no" >&6; }
16513       # This might be the VS linker. Don't exclude it later on.
16514       CYGWIN_LINK=""
16515     fi
16516   fi
16517 
16518   # First-hand choice is to locate and run the vsvars bat file.
16519 
16520   if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16521     VCVARSFILE="vc/bin/vcvars32.bat"
16522   else
16523     VCVARSFILE="vc/bin/amd64/vcvars64.bat"
16524   fi
16525 
16526   VS_ENV_CMD=""
16527   VS_ENV_ARGS=""
16528   if test "x$with_toolsdir" != x; then
16529 
16530   if test "x$VS_ENV_CMD" = x; then
16531     VS100BASE="$with_toolsdir/../.."
16532     METHOD="--with-tools-dir"
16533 
16534   windows_path="$VS100BASE"
16535   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16536     unix_path=`$CYGPATH -u "$windows_path"`
16537     VS100BASE="$unix_path"
16538   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16539     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16540     VS100BASE="$unix_path"
16541   fi
16542 
16543     if test -d "$VS100BASE"; then
16544       if test -f "$VS100BASE/$VCVARSFILE"; then
16545         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16546 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16547         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16548       else
16549         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16550 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16551         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16552 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16553       fi
16554     fi
16555   fi
16556 
16557   fi
16558 
16559   if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
16560     # Having specified an argument which is incorrect will produce an instant failure;
16561     # we should not go on looking
16562     { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
16563 $as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
16564     { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
16565 $as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
16566     as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
16567   fi
16568 
16569   if test "x$ProgramW6432" != x; then
16570 
16571   if test "x$VS_ENV_CMD" = x; then
16572     WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
16573     METHOD="well-known name"
16574 
16575   windows_path="$WIN_SDK_BASE"
16576   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16577     unix_path=`$CYGPATH -u "$windows_path"`
16578     WIN_SDK_BASE="$unix_path"
16579   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16580     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16581     WIN_SDK_BASE="$unix_path"
16582   fi
16583 
16584     if test -d "$WIN_SDK_BASE"; then
16585       # There have been cases of partial or broken SDK installations. A missing
16586       # lib dir is not going to work.
16587       if test ! -d "$WIN_SDK_BASE/../lib"; then
16588         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16589 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16590         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16591 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16592       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16593         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16594 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16595         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16596         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16597           VS_ENV_ARGS="/x86"
16598         else
16599           VS_ENV_ARGS="/x64"
16600         fi
16601       else
16602         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16603 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16604         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16605 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16606       fi
16607     fi
16608   fi
16609 
16610   fi
16611   if test "x$PROGRAMW6432" != x; then
16612 
16613   if test "x$VS_ENV_CMD" = x; then
16614     WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
16615     METHOD="well-known name"
16616 
16617   windows_path="$WIN_SDK_BASE"
16618   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16619     unix_path=`$CYGPATH -u "$windows_path"`
16620     WIN_SDK_BASE="$unix_path"
16621   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16622     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16623     WIN_SDK_BASE="$unix_path"
16624   fi
16625 
16626     if test -d "$WIN_SDK_BASE"; then
16627       # There have been cases of partial or broken SDK installations. A missing
16628       # lib dir is not going to work.
16629       if test ! -d "$WIN_SDK_BASE/../lib"; then
16630         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16631 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16632         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16633 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16634       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16635         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16636 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16637         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16638         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16639           VS_ENV_ARGS="/x86"
16640         else
16641           VS_ENV_ARGS="/x64"
16642         fi
16643       else
16644         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16645 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16646         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16647 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16648       fi
16649     fi
16650   fi
16651 
16652   fi
16653   if test "x$PROGRAMFILES" != x; then
16654 
16655   if test "x$VS_ENV_CMD" = x; then
16656     WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
16657     METHOD="well-known name"
16658 
16659   windows_path="$WIN_SDK_BASE"
16660   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16661     unix_path=`$CYGPATH -u "$windows_path"`
16662     WIN_SDK_BASE="$unix_path"
16663   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16664     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16665     WIN_SDK_BASE="$unix_path"
16666   fi
16667 
16668     if test -d "$WIN_SDK_BASE"; then
16669       # There have been cases of partial or broken SDK installations. A missing
16670       # lib dir is not going to work.
16671       if test ! -d "$WIN_SDK_BASE/../lib"; then
16672         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16673 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16674         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16675 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16676       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16677         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16678 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16679         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16680         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16681           VS_ENV_ARGS="/x86"
16682         else
16683           VS_ENV_ARGS="/x64"
16684         fi
16685       else
16686         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16687 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16688         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16689 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16690       fi
16691     fi
16692   fi
16693 
16694   fi
16695 
16696   if test "x$VS_ENV_CMD" = x; then
16697     WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
16698     METHOD="well-known name"
16699 
16700   windows_path="$WIN_SDK_BASE"
16701   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16702     unix_path=`$CYGPATH -u "$windows_path"`
16703     WIN_SDK_BASE="$unix_path"
16704   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16705     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16706     WIN_SDK_BASE="$unix_path"
16707   fi
16708 
16709     if test -d "$WIN_SDK_BASE"; then
16710       # There have been cases of partial or broken SDK installations. A missing
16711       # lib dir is not going to work.
16712       if test ! -d "$WIN_SDK_BASE/../lib"; then
16713         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16714 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16715         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16716 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16717       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16718         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16719 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16720         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16721         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16722           VS_ENV_ARGS="/x86"
16723         else
16724           VS_ENV_ARGS="/x64"
16725         fi
16726       else
16727         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16728 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16729         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16730 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16731       fi
16732     fi
16733   fi
16734 
16735 
16736   if test "x$VS_ENV_CMD" = x; then
16737     WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
16738     METHOD="well-known name"
16739 
16740   windows_path="$WIN_SDK_BASE"
16741   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16742     unix_path=`$CYGPATH -u "$windows_path"`
16743     WIN_SDK_BASE="$unix_path"
16744   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16745     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16746     WIN_SDK_BASE="$unix_path"
16747   fi
16748 
16749     if test -d "$WIN_SDK_BASE"; then
16750       # There have been cases of partial or broken SDK installations. A missing
16751       # lib dir is not going to work.
16752       if test ! -d "$WIN_SDK_BASE/../lib"; then
16753         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16754 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16755         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16756 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16757       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16758         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16759 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16760         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16761         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16762           VS_ENV_ARGS="/x86"
16763         else
16764           VS_ENV_ARGS="/x64"
16765         fi
16766       else
16767         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16768 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16769         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16770 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16771       fi
16772     fi
16773   fi
16774 
16775 
16776   if test "x$VS100COMNTOOLS" != x; then
16777 
16778   if test "x$VS_ENV_CMD" = x; then
16779     VS100BASE="$VS100COMNTOOLS/../.."
16780     METHOD="VS100COMNTOOLS variable"
16781 
16782   windows_path="$VS100BASE"
16783   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16784     unix_path=`$CYGPATH -u "$windows_path"`
16785     VS100BASE="$unix_path"
16786   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16787     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16788     VS100BASE="$unix_path"
16789   fi
16790 
16791     if test -d "$VS100BASE"; then
16792       if test -f "$VS100BASE/$VCVARSFILE"; then
16793         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16794 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16795         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16796       else
16797         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16798 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16799         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16800 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16801       fi
16802     fi
16803   fi
16804 
16805   fi
16806   if test "x$PROGRAMFILES" != x; then
16807 
16808   if test "x$VS_ENV_CMD" = x; then
16809     VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
16810     METHOD="well-known name"
16811 
16812   windows_path="$VS100BASE"
16813   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16814     unix_path=`$CYGPATH -u "$windows_path"`
16815     VS100BASE="$unix_path"
16816   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16817     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16818     VS100BASE="$unix_path"
16819   fi
16820 
16821     if test -d "$VS100BASE"; then
16822       if test -f "$VS100BASE/$VCVARSFILE"; then
16823         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16824 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16825         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16826       else
16827         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16828 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16829         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16830 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16831       fi
16832     fi
16833   fi
16834 
16835   fi
16836 
16837   if test "x$VS_ENV_CMD" = x; then
16838     VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
16839     METHOD="well-known name"
16840 
16841   windows_path="$VS100BASE"
16842   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16843     unix_path=`$CYGPATH -u "$windows_path"`
16844     VS100BASE="$unix_path"
16845   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16846     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16847     VS100BASE="$unix_path"
16848   fi
16849 
16850     if test -d "$VS100BASE"; then
16851       if test -f "$VS100BASE/$VCVARSFILE"; then
16852         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16853 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16854         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16855       else
16856         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16857 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16858         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16859 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16860       fi
16861     fi
16862   fi
16863 
16864 
16865   if test "x$VS_ENV_CMD" = x; then
16866     VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
16867     METHOD="well-known name"
16868 
16869   windows_path="$VS100BASE"
16870   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16871     unix_path=`$CYGPATH -u "$windows_path"`
16872     VS100BASE="$unix_path"
16873   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16874     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16875     VS100BASE="$unix_path"
16876   fi
16877 
16878     if test -d "$VS100BASE"; then
16879       if test -f "$VS100BASE/$VCVARSFILE"; then
16880         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16881 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16882         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16883       else
16884         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16885 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16886         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16887 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16888       fi
16889     fi
16890   fi
16891 
16892 
16893   if test "x$VS_ENV_CMD" != x; then
16894     # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
16895 
16896   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16897 
16898   # First separate the path from the arguments. This will split at the first
16899   # space.
16900   complete="$VS_ENV_CMD"
16901   path="${complete%% *}"
16902   tmp="$complete EOL"
16903   arguments="${tmp#* }"
16904 
16905   # Input might be given as Windows format, start by converting to
16906   # unix format.
16907   new_path=`$CYGPATH -u "$path"`
16908 
16909   # Now try to locate executable using which
16910   new_path=`$WHICH "$new_path" 2> /dev/null`
16911   # bat and cmd files are not always considered executable in cygwin causing which
16912   # to not find them
16913   if test "x$new_path" = x \
16914            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16915            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16916     new_path=`$CYGPATH -u "$path"`
16917   fi
16918   if test "x$new_path" = x; then
16919     # Oops. Which didn't find the executable.
16920     # The splitting of arguments from the executable at a space might have been incorrect,
16921     # since paths with space are more likely in Windows. Give it another try with the whole
16922     # argument.
16923     path="$complete"
16924     arguments="EOL"
16925     new_path=`$CYGPATH -u "$path"`
16926     new_path=`$WHICH "$new_path" 2> /dev/null`
16927     # bat and cmd files are not always considered executable in cygwin causing which
16928     # to not find them
16929     if test "x$new_path" = x \
16930              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16931              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16932       new_path=`$CYGPATH -u "$path"`
16933     fi
16934     if test "x$new_path" = x; then
16935       # It's still not found. Now this is an unrecoverable error.
16936       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16937 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16938       has_space=`$ECHO "$complete" | $GREP " "`
16939       if test "x$has_space" != x; then
16940         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16941 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16942       fi
16943       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16944     fi
16945   fi
16946 
16947   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16948   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16949   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16950   # "foo.exe" is OK but "foo" is an error.
16951   #
16952   # This test is therefore slightly more accurate than "test -f" to check for file precense.
16953   # It is also a way to make sure we got the proper file name for the real test later on.
16954   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16955   if test "x$test_shortpath" = x; then
16956     # Short path failed, file does not exist as specified.
16957     # Try adding .exe or .cmd
16958     if test -f "${new_path}.exe"; then
16959        input_to_shortpath="${new_path}.exe"
16960     elif test -f "${new_path}.cmd"; then
16961        input_to_shortpath="${new_path}.cmd"
16962     else
16963       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
16964 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
16965       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16966 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16967       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16968     fi
16969   else
16970     input_to_shortpath="$new_path"
16971   fi
16972 
16973   # Call helper function which possibly converts this using DOS-style short mode.
16974   # If so, the updated path is stored in $new_path.
16975   new_path="$input_to_shortpath"
16976 
16977   input_path="$input_to_shortpath"
16978   # Check if we need to convert this using DOS-style short mode. If the path
16979   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16980   # take no chances and rewrite it.
16981   # Note: m4 eats our [], so we need to use [ and ] instead.
16982   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16983   if test "x$has_forbidden_chars" != x; then
16984     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16985     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16986     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16987     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16988       # Going to short mode and back again did indeed matter. Since short mode is
16989       # case insensitive, let's make it lowercase to improve readability.
16990       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16991       # Now convert it back to Unix-stile (cygpath)
16992       input_path=`$CYGPATH -u "$shortmode_path"`
16993       new_path="$input_path"
16994     fi
16995   fi
16996 
16997   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16998   if test "x$test_cygdrive_prefix" = x; then
16999     # As a simple fix, exclude /usr/bin since it's not a real path.
17000     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17001       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17002       # a path prefixed by /cygdrive for fixpath to work.
17003       new_path="$CYGWIN_ROOT_PATH$input_path"
17004     fi
17005   fi
17006 
17007   # remove trailing .exe if any
17008   new_path="${new_path/%.exe/}"
17009 
17010   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17011 
17012   # First separate the path from the arguments. This will split at the first
17013   # space.
17014   complete="$VS_ENV_CMD"
17015   path="${complete%% *}"
17016   tmp="$complete EOL"
17017   arguments="${tmp#* }"
17018 
17019   # Input might be given as Windows format, start by converting to
17020   # unix format.
17021   new_path="$path"
17022 
17023   windows_path="$new_path"
17024   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17025     unix_path=`$CYGPATH -u "$windows_path"`
17026     new_path="$unix_path"
17027   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17028     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17029     new_path="$unix_path"
17030   fi
17031 
17032 
17033   # Now try to locate executable using which
17034   new_path=`$WHICH "$new_path" 2> /dev/null`
17035 
17036   if test "x$new_path" = x; then
17037     # Oops. Which didn't find the executable.
17038     # The splitting of arguments from the executable at a space might have been incorrect,
17039     # since paths with space are more likely in Windows. Give it another try with the whole
17040     # argument.
17041     path="$complete"
17042     arguments="EOL"
17043     new_path="$path"
17044 
17045   windows_path="$new_path"
17046   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17047     unix_path=`$CYGPATH -u "$windows_path"`
17048     new_path="$unix_path"
17049   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17050     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17051     new_path="$unix_path"
17052   fi
17053 
17054 
17055     new_path=`$WHICH "$new_path" 2> /dev/null`
17056 
17057     if test "x$new_path" = x; then
17058       # It's still not found. Now this is an unrecoverable error.
17059       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17060 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17061       has_space=`$ECHO "$complete" | $GREP " "`
17062       if test "x$has_space" != x; then
17063         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17064 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17065       fi
17066       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17067     fi
17068   fi
17069 
17070   # Now new_path has a complete unix path to the binary
17071   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17072     # Keep paths in /bin as-is, but remove trailing .exe if any
17073     new_path="${new_path/%.exe/}"
17074     # Do not save /bin paths to all_fixpath_prefixes!
17075   else
17076     # Not in mixed or Windows style, start by that.
17077     new_path=`cmd //c echo $new_path`
17078 
17079   input_path="$new_path"
17080   # Check if we need to convert this using DOS-style short mode. If the path
17081   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17082   # take no chances and rewrite it.
17083   # Note: m4 eats our [], so we need to use [ and ] instead.
17084   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17085   if test "x$has_forbidden_chars" != x; then
17086     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17087     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17088   fi
17089 
17090     # Output is in $new_path
17091 
17092   windows_path="$new_path"
17093   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17094     unix_path=`$CYGPATH -u "$windows_path"`
17095     new_path="$unix_path"
17096   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17097     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17098     new_path="$unix_path"
17099   fi
17100 
17101     # remove trailing .exe if any
17102     new_path="${new_path/%.exe/}"
17103 
17104     # Save the first 10 bytes of this path to the storage, so fixpath can work.
17105     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17106   fi
17107 
17108   else
17109     # We're on a posix platform. Hooray! :)
17110     # First separate the path from the arguments. This will split at the first
17111     # space.
17112     complete="$VS_ENV_CMD"
17113     path="${complete%% *}"
17114     tmp="$complete EOL"
17115     arguments="${tmp#* }"
17116 
17117     # Cannot rely on the command "which" here since it doesn't always work.
17118     is_absolute_path=`$ECHO "$path" | $GREP ^/`
17119     if test -z "$is_absolute_path"; then
17120       # Path to executable is not absolute. Find it.
17121       IFS_save="$IFS"
17122       IFS=:
17123       for p in $PATH; do
17124         if test -f "$p/$path" && test -x "$p/$path"; then
17125           new_path="$p/$path"
17126           break
17127         fi
17128       done
17129       IFS="$IFS_save"
17130     else
17131       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
17132 $as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
17133       new_path="$path"
17134     fi
17135 
17136     if test "x$new_path" = x; then
17137         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17138 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17139         has_space=`$ECHO "$complete" | $GREP " "`
17140         if test "x$has_space" != x; then
17141           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17142 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17143         fi
17144         as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17145       fi
17146   fi
17147 
17148       # Now join together the path and the arguments once again
17149       if test "x$arguments" != xEOL; then
17150         new_complete="$new_path ${arguments% *}"
17151       else
17152         new_complete="$new_path"
17153       fi
17154 
17155   if test "x$complete" != "x$new_complete"; then
17156       VS_ENV_CMD="$new_complete"
17157       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
17158 $as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
17159     fi
17160 
17161 
17162     # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
17163     { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
17164 $as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
17165     cd $OUTPUT_ROOT
17166     # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
17167     # to autoconf standards.
17168 
17169     #----
17170 
17171     # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
17172     # but calculate the difference in Cygwin environment before/after running it and then
17173     # apply the diff.
17174 
17175     if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
17176       _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
17177       _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
17178       _dosbash=`cygpath -a -w -s \`which bash\`.*`
17179     else
17180       _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
17181       _dosbash=`cmd //c echo \`which bash\``
17182     fi
17183 
17184     # generate the set of exported vars before/after the vs10 setup
17185     $ECHO "@echo off"                                           >  localdevenvtmp.bat
17186     $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
17187     $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
17188     $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
17189 
17190     # Now execute the newly created bat file.
17191     # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
17192     cmd /c localdevenvtmp.bat | cat
17193 
17194     # apply the diff (less some non-vs10 vars named by "!")
17195     $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
17196     $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
17197     $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
17198 
17199     # cleanup
17200     $RM localdevenvtmp*
17201     #----
17202     cd $CURDIR
17203     if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
17204       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17205 $as_echo "no" >&6; }
17206       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
17207 $as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
17208       { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17209 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17210       { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17211 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17212       as_fn_error $? "Cannot continue" "$LINENO" 5
17213     fi
17214 
17215     # Now set all paths and other env variables. This will allow the rest of
17216     # the configure script to find and run the compiler in the proper way.
17217     { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
17218 $as_echo "$as_me: Setting extracted environment variables" >&6;}
17219     . $OUTPUT_ROOT/localdevenv.sh
17220   else
17221     # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
17222     { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
17223 $as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
17224   fi
17225 
17226   # At this point, we should have corrent variables in the environment, or we can't continue.
17227   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
17228 $as_echo_n "checking for Visual Studio variables... " >&6; }
17229 
17230   if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
17231     if test "x$INCLUDE" = x || test "x$LIB" = x; then
17232       { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
17233 $as_echo "present but broken" >&6; }
17234       as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
17235     else
17236       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17237 $as_echo "ok" >&6; }
17238       # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
17239       VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
17240       VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
17241       VS_PATH="$PATH"
17242 
17243 
17244 
17245     fi
17246   else
17247     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17248 $as_echo "not found" >&6; }
17249 
17250     if test "x$VS_ENV_CMD" = x; then
17251       { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
17252 $as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
17253       { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
17254 $as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
17255     else
17256       { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
17257 $as_echo "$as_me: Running the extraction script failed." >&6;}
17258     fi
17259     { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17260 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17261     { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17262 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17263     as_fn_error $? "Cannot continue" "$LINENO" 5
17264   fi
17265 
17266   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17267 $as_echo_n "checking for msvcr100.dll... " >&6; }
17268 
17269 # Check whether --with-msvcr-dll was given.
17270 if test "${with_msvcr_dll+set}" = set; then :
17271   withval=$with_msvcr_dll;
17272 fi
17273 
17274   if test "x$with_msvcr_dll" != x; then
17275     MSVCR_DLL="$with_msvcr_dll"
17276   else
17277     if test "x$VCINSTALLDIR" != x; then
17278       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17279         MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x64 | head --lines 1`
17280       else
17281         MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
17282         if test "x$MSVCR_DLL" = x; then
17283           MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | head --lines 1`
17284         fi
17285       fi
17286       if test "x$MSVCR_DLL" != x; then
17287         { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&5
17288 $as_echo "$as_me: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
17289       else
17290         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&5
17291 $as_echo "$as_me: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
17292       fi
17293     fi
17294     if test "x$MSVCR_DLL" = x; then
17295       if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then
17296         { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $SYSTEMROOT/system32" >&5
17297 $as_echo "$as_me: msvcr100.dll found in $SYSTEMROOT/system32" >&6;}
17298         MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll"
17299       fi
17300     fi
17301   fi
17302   if test "x$MSVCR_DLL" = x; then
17303     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17304 $as_echo "no" >&6; }
17305     as_fn_error $? "Could not find msvcr100.dll !" "$LINENO" 5
17306   fi
17307   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17308 $as_echo "$MSVCR_DLL" >&6; }
17309 
17310   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17311 
17312   # Input might be given as Windows format, start by converting to
17313   # unix format.
17314   path="$MSVCR_DLL"
17315   new_path=`$CYGPATH -u "$path"`
17316 
17317   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17318   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17319   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17320   # "foo.exe" is OK but "foo" is an error.
17321   #
17322   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17323   # It is also a way to make sure we got the proper file name for the real test later on.
17324   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17325   if test "x$test_shortpath" = x; then
17326     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17327 $as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17328     as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
17329   fi
17330 
17331   # Call helper function which possibly converts this using DOS-style short mode.
17332   # If so, the updated path is stored in $new_path.
17333 
17334   input_path="$new_path"
17335   # Check if we need to convert this using DOS-style short mode. If the path
17336   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17337   # take no chances and rewrite it.
17338   # Note: m4 eats our [], so we need to use [ and ] instead.
17339   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17340   if test "x$has_forbidden_chars" != x; then
17341     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17342     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17343     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17344     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17345       # Going to short mode and back again did indeed matter. Since short mode is
17346       # case insensitive, let's make it lowercase to improve readability.
17347       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17348       # Now convert it back to Unix-stile (cygpath)
17349       input_path=`$CYGPATH -u "$shortmode_path"`
17350       new_path="$input_path"
17351     fi
17352   fi
17353 
17354   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17355   if test "x$test_cygdrive_prefix" = x; then
17356     # As a simple fix, exclude /usr/bin since it's not a real path.
17357     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17358       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17359       # a path prefixed by /cygdrive for fixpath to work.
17360       new_path="$CYGWIN_ROOT_PATH$input_path"
17361     fi
17362   fi
17363 
17364 
17365   if test "x$path" != "x$new_path"; then
17366     MSVCR_DLL="$new_path"
17367     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17368 $as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17369   fi
17370 
17371   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17372 
17373   path="$MSVCR_DLL"
17374   has_colon=`$ECHO $path | $GREP ^.:`
17375   new_path="$path"
17376   if test "x$has_colon" = x; then
17377     # Not in mixed or Windows style, start by that.
17378     new_path=`cmd //c echo $path`
17379   fi
17380 
17381 
17382   input_path="$new_path"
17383   # Check if we need to convert this using DOS-style short mode. If the path
17384   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17385   # take no chances and rewrite it.
17386   # Note: m4 eats our [], so we need to use [ and ] instead.
17387   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17388   if test "x$has_forbidden_chars" != x; then
17389     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17390     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17391   fi
17392 
17393 
17394   windows_path="$new_path"
17395   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17396     unix_path=`$CYGPATH -u "$windows_path"`
17397     new_path="$unix_path"
17398   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17399     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17400     new_path="$unix_path"
17401   fi
17402 
17403   if test "x$path" != "x$new_path"; then
17404     MSVCR_DLL="$new_path"
17405     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17406 $as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17407   fi
17408 
17409   # Save the first 10 bytes of this path to the storage, so fixpath can work.
17410   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17411 
17412   else
17413     # We're on a posix platform. Hooray! :)
17414     path="$MSVCR_DLL"
17415     has_space=`$ECHO "$path" | $GREP " "`
17416     if test "x$has_space" != x; then
17417       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17418 $as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17419       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17420     fi
17421 
17422     # Use eval to expand a potential ~
17423     eval path="$path"
17424     if test ! -f "$path" && test ! -d "$path"; then
17425       as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
17426     fi
17427 
17428     MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
17429   fi
17430 
17431 
17432 
17433 
17434 # Check whether --with-dxsdk was given.
17435 if test "${with_dxsdk+set}" = set; then :
17436   withval=$with_dxsdk;
17437 fi
17438 
17439 
17440 # Check whether --with-dxsdk-lib was given.
17441 if test "${with_dxsdk_lib+set}" = set; then :
17442   withval=$with_dxsdk_lib;
17443 fi
17444 
17445 
17446 # Check whether --with-dxsdk-include was given.
17447 if test "${with_dxsdk_include+set}" = set; then :
17448   withval=$with_dxsdk_include;
17449 fi
17450 
17451 
17452   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK" >&5
17453 $as_echo_n "checking for DirectX SDK... " >&6; }
17454 
17455   if test "x$with_dxsdk" != x; then
17456     dxsdk_path="$with_dxsdk"
17457   elif test "x$DXSDK_DIR" != x; then
17458     dxsdk_path="$DXSDK_DIR"
17459   elif test -d "C:/DXSDK"; then
17460     dxsdk_path="C:/DXSDK"
17461   else
17462     as_fn_error $? "Could not find the DirectX SDK" "$LINENO" 5
17463   fi
17464   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dxsdk_path" >&5
17465 $as_echo "$dxsdk_path" >&6; }
17466 
17467   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17468 
17469   # Input might be given as Windows format, start by converting to
17470   # unix format.
17471   path="$dxsdk_path"
17472   new_path=`$CYGPATH -u "$path"`
17473 
17474   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17475   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17476   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17477   # "foo.exe" is OK but "foo" is an error.
17478   #
17479   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17480   # It is also a way to make sure we got the proper file name for the real test later on.
17481   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17482   if test "x$test_shortpath" = x; then
17483     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&5
17484 $as_echo "$as_me: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&6;}
17485     as_fn_error $? "Cannot locate the the path of dxsdk_path" "$LINENO" 5
17486   fi
17487 
17488   # Call helper function which possibly converts this using DOS-style short mode.
17489   # If so, the updated path is stored in $new_path.
17490 
17491   input_path="$new_path"
17492   # Check if we need to convert this using DOS-style short mode. If the path
17493   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17494   # take no chances and rewrite it.
17495   # Note: m4 eats our [], so we need to use [ and ] instead.
17496   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17497   if test "x$has_forbidden_chars" != x; then
17498     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17499     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17500     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17501     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17502       # Going to short mode and back again did indeed matter. Since short mode is
17503       # case insensitive, let's make it lowercase to improve readability.
17504       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17505       # Now convert it back to Unix-stile (cygpath)
17506       input_path=`$CYGPATH -u "$shortmode_path"`
17507       new_path="$input_path"
17508     fi
17509   fi
17510 
17511   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17512   if test "x$test_cygdrive_prefix" = x; then
17513     # As a simple fix, exclude /usr/bin since it's not a real path.
17514     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17515       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17516       # a path prefixed by /cygdrive for fixpath to work.
17517       new_path="$CYGWIN_ROOT_PATH$input_path"
17518     fi
17519   fi
17520 
17521 
17522   if test "x$path" != "x$new_path"; then
17523     dxsdk_path="$new_path"
17524     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting dxsdk_path to \"$new_path\"" >&5
17525 $as_echo "$as_me: Rewriting dxsdk_path to \"$new_path\"" >&6;}
17526   fi
17527 
17528   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17529 
17530   path="$dxsdk_path"
17531   has_colon=`$ECHO $path | $GREP ^.:`
17532   new_path="$path"
17533   if test "x$has_colon" = x; then
17534     # Not in mixed or Windows style, start by that.
17535     new_path=`cmd //c echo $path`
17536   fi
17537 
17538 
17539   input_path="$new_path"
17540   # Check if we need to convert this using DOS-style short mode. If the path
17541   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17542   # take no chances and rewrite it.
17543   # Note: m4 eats our [], so we need to use [ and ] instead.
17544   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17545   if test "x$has_forbidden_chars" != x; then
17546     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17547     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17548   fi
17549 
17550 
17551   windows_path="$new_path"
17552   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17553     unix_path=`$CYGPATH -u "$windows_path"`
17554     new_path="$unix_path"
17555   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17556     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17557     new_path="$unix_path"
17558   fi
17559 
17560   if test "x$path" != "x$new_path"; then
17561     dxsdk_path="$new_path"
17562     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting dxsdk_path to \"$new_path\"" >&5
17563 $as_echo "$as_me: Rewriting dxsdk_path to \"$new_path\"" >&6;}
17564   fi
17565 
17566   # Save the first 10 bytes of this path to the storage, so fixpath can work.
17567   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17568 
17569   else
17570     # We're on a posix platform. Hooray! :)
17571     path="$dxsdk_path"
17572     has_space=`$ECHO "$path" | $GREP " "`
17573     if test "x$has_space" != x; then
17574       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&5
17575 $as_echo "$as_me: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&6;}
17576       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17577     fi
17578 
17579     # Use eval to expand a potential ~
17580     eval path="$path"
17581     if test ! -f "$path" && test ! -d "$path"; then
17582       as_fn_error $? "The path of dxsdk_path, which resolves as \"$path\", is not found." "$LINENO" 5
17583     fi
17584 
17585     dxsdk_path="`cd "$path"; $THEPWDCMD -L`"
17586   fi
17587 
17588 
17589   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK lib dir" >&5
17590 $as_echo_n "checking for DirectX SDK lib dir... " >&6; }
17591   if test "x$with_dxsdk_lib" != x; then
17592     DXSDK_LIB_PATH="$with_dxsdk_lib"
17593   elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
17594     DXSDK_LIB_PATH="$dxsdk_path/Lib/x64"
17595   else
17596     DXSDK_LIB_PATH="$dxsdk_path/Lib"
17597   fi
17598   # dsound.lib is linked to in jsoundds
17599   if test ! -f "$DXSDK_LIB_PATH/dsound.lib"; then
17600     as_fn_error $? "Invalid DirectX SDK lib dir" "$LINENO" 5
17601   fi
17602   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DXSDK_LIB_PATH" >&5
17603 $as_echo "$DXSDK_LIB_PATH" >&6; }
17604 
17605   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17606 
17607   # Input might be given as Windows format, start by converting to
17608   # unix format.
17609   path="$DXSDK_LIB_PATH"
17610   new_path=`$CYGPATH -u "$path"`
17611 
17612   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17613   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17614   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17615   # "foo.exe" is OK but "foo" is an error.
17616   #
17617   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17618   # It is also a way to make sure we got the proper file name for the real test later on.
17619   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17620   if test "x$test_shortpath" = x; then
17621     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&5
17622 $as_echo "$as_me: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
17623     as_fn_error $? "Cannot locate the the path of DXSDK_LIB_PATH" "$LINENO" 5
17624   fi
17625 
17626   # Call helper function which possibly converts this using DOS-style short mode.
17627   # If so, the updated path is stored in $new_path.
17628 
17629   input_path="$new_path"
17630   # Check if we need to convert this using DOS-style short mode. If the path
17631   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17632   # take no chances and rewrite it.
17633   # Note: m4 eats our [], so we need to use [ and ] instead.
17634   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17635   if test "x$has_forbidden_chars" != x; then
17636     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17637     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17638     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17639     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17640       # Going to short mode and back again did indeed matter. Since short mode is
17641       # case insensitive, let's make it lowercase to improve readability.
17642       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17643       # Now convert it back to Unix-stile (cygpath)
17644       input_path=`$CYGPATH -u "$shortmode_path"`
17645       new_path="$input_path"
17646     fi
17647   fi
17648 
17649   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17650   if test "x$test_cygdrive_prefix" = x; then
17651     # As a simple fix, exclude /usr/bin since it's not a real path.
17652     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17653       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17654       # a path prefixed by /cygdrive for fixpath to work.
17655       new_path="$CYGWIN_ROOT_PATH$input_path"
17656     fi
17657   fi
17658 
17659 
17660   if test "x$path" != "x$new_path"; then
17661     DXSDK_LIB_PATH="$new_path"
17662     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&5
17663 $as_echo "$as_me: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&6;}
17664   fi
17665 
17666   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17667 
17668   path="$DXSDK_LIB_PATH"
17669   has_colon=`$ECHO $path | $GREP ^.:`
17670   new_path="$path"
17671   if test "x$has_colon" = x; then
17672     # Not in mixed or Windows style, start by that.
17673     new_path=`cmd //c echo $path`
17674   fi
17675 
17676 
17677   input_path="$new_path"
17678   # Check if we need to convert this using DOS-style short mode. If the path
17679   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17680   # take no chances and rewrite it.
17681   # Note: m4 eats our [], so we need to use [ and ] instead.
17682   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17683   if test "x$has_forbidden_chars" != x; then
17684     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17685     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17686   fi
17687 
17688 
17689   windows_path="$new_path"
17690   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17691     unix_path=`$CYGPATH -u "$windows_path"`
17692     new_path="$unix_path"
17693   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17694     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17695     new_path="$unix_path"
17696   fi
17697 
17698   if test "x$path" != "x$new_path"; then
17699     DXSDK_LIB_PATH="$new_path"
17700     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&5
17701 $as_echo "$as_me: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&6;}
17702   fi
17703 
17704   # Save the first 10 bytes of this path to the storage, so fixpath can work.
17705   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17706 
17707   else
17708     # We're on a posix platform. Hooray! :)
17709     path="$DXSDK_LIB_PATH"
17710     has_space=`$ECHO "$path" | $GREP " "`
17711     if test "x$has_space" != x; then
17712       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&5
17713 $as_echo "$as_me: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
17714       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17715     fi
17716 
17717     # Use eval to expand a potential ~
17718     eval path="$path"
17719     if test ! -f "$path" && test ! -d "$path"; then
17720       as_fn_error $? "The path of DXSDK_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
17721     fi
17722 
17723     DXSDK_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
17724   fi
17725 
17726 
17727   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK include dir" >&5
17728 $as_echo_n "checking for DirectX SDK include dir... " >&6; }
17729   if test "x$with_dxsdk_include" != x; then
17730     DXSDK_INCLUDE_PATH="$with_dxsdk_include"
17731   else
17732     DXSDK_INCLUDE_PATH="$dxsdk_path/Include"
17733   fi
17734   # dsound.h is included in jsoundds
17735   if test ! -f "$DXSDK_INCLUDE_PATH/dsound.h"; then
17736     as_fn_error $? "Invalid DirectX SDK lib dir" "$LINENO" 5
17737   fi
17738   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DXSDK_INCLUDE_PATH" >&5
17739 $as_echo "$DXSDK_INCLUDE_PATH" >&6; }
17740 
17741   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17742 
17743   # Input might be given as Windows format, start by converting to
17744   # unix format.
17745   path="$DXSDK_INCLUDE_PATH"
17746   new_path=`$CYGPATH -u "$path"`
17747 
17748   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17749   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17750   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17751   # "foo.exe" is OK but "foo" is an error.
17752   #
17753   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17754   # It is also a way to make sure we got the proper file name for the real test later on.
17755   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17756   if test "x$test_shortpath" = x; then
17757     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
17758 $as_echo "$as_me: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
17759     as_fn_error $? "Cannot locate the the path of DXSDK_INCLUDE_PATH" "$LINENO" 5
17760   fi
17761 
17762   # Call helper function which possibly converts this using DOS-style short mode.
17763   # If so, the updated path is stored in $new_path.
17764 
17765   input_path="$new_path"
17766   # Check if we need to convert this using DOS-style short mode. If the path
17767   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17768   # take no chances and rewrite it.
17769   # Note: m4 eats our [], so we need to use [ and ] instead.
17770   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17771   if test "x$has_forbidden_chars" != x; then
17772     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17773     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17774     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17775     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17776       # Going to short mode and back again did indeed matter. Since short mode is
17777       # case insensitive, let's make it lowercase to improve readability.
17778       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17779       # Now convert it back to Unix-stile (cygpath)
17780       input_path=`$CYGPATH -u "$shortmode_path"`
17781       new_path="$input_path"
17782     fi
17783   fi
17784 
17785   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17786   if test "x$test_cygdrive_prefix" = x; then
17787     # As a simple fix, exclude /usr/bin since it's not a real path.
17788     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17789       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17790       # a path prefixed by /cygdrive for fixpath to work.
17791       new_path="$CYGWIN_ROOT_PATH$input_path"
17792     fi
17793   fi
17794 
17795 
17796   if test "x$path" != "x$new_path"; then
17797     DXSDK_INCLUDE_PATH="$new_path"
17798     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&5
17799 $as_echo "$as_me: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&6;}
17800   fi
17801 
17802   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17803 
17804   path="$DXSDK_INCLUDE_PATH"
17805   has_colon=`$ECHO $path | $GREP ^.:`
17806   new_path="$path"
17807   if test "x$has_colon" = x; then
17808     # Not in mixed or Windows style, start by that.
17809     new_path=`cmd //c echo $path`
17810   fi
17811 
17812 
17813   input_path="$new_path"
17814   # Check if we need to convert this using DOS-style short mode. If the path
17815   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17816   # take no chances and rewrite it.
17817   # Note: m4 eats our [], so we need to use [ and ] instead.
17818   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17819   if test "x$has_forbidden_chars" != x; then
17820     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17821     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17822   fi
17823 
17824 
17825   windows_path="$new_path"
17826   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17827     unix_path=`$CYGPATH -u "$windows_path"`
17828     new_path="$unix_path"
17829   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17830     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17831     new_path="$unix_path"
17832   fi
17833 
17834   if test "x$path" != "x$new_path"; then
17835     DXSDK_INCLUDE_PATH="$new_path"
17836     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&5
17837 $as_echo "$as_me: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&6;}
17838   fi
17839 
17840   # Save the first 10 bytes of this path to the storage, so fixpath can work.
17841   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17842 
17843   else
17844     # We're on a posix platform. Hooray! :)
17845     path="$DXSDK_INCLUDE_PATH"
17846     has_space=`$ECHO "$path" | $GREP " "`
17847     if test "x$has_space" != x; then
17848       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
17849 $as_echo "$as_me: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
17850       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17851     fi
17852 
17853     # Use eval to expand a potential ~
17854     eval path="$path"
17855     if test ! -f "$path" && test ! -d "$path"; then
17856       as_fn_error $? "The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
17857     fi
17858 
17859     DXSDK_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
17860   fi
17861 
17862 
17863 
17864 
17865   LDFLAGS_JDK="$LDFLAGS_JDK -libpath:$DXSDK_LIB_PATH"
17866 
17867 fi
17868 
17869 
17870 
17871 # If --build AND --host is set, then the configure script will find any
17872 # cross compilation tools in the PATH. Cross compilation tools
17873 # follows the cross compilation standard where they are prefixed with ${host}.
17874 # For example the binary i686-sun-solaris2.10-gcc
17875 # will cross compile for i686-sun-solaris2.10
17876 # If neither of build and host is not set, then build=host and the
17877 # default compiler found in the path will be used.
17878 # Setting only --host, does not seem to be really supported.
17879 # Please set both --build and --host if you want to cross compile.
17880 
17881 if test "x$COMPILE_TYPE" = "xcross"; then
17882     # Now we to find a C/C++ compiler that can build executables for the build
17883     # platform. We can't use the AC_PROG_CC macro, since it can only be used
17884     # once. Also, we need to do this before adding a tools dir to the path,
17885     # otherwise we might pick up cross-compilers which don't use standard naming.
17886     # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
17887     # to wait until they are properly discovered.
17888     for ac_prog in cl cc gcc
17889 do
17890   # Extract the first word of "$ac_prog", so it can be a program name with args.
17891 set dummy $ac_prog; ac_word=$2
17892 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17893 $as_echo_n "checking for $ac_word... " >&6; }
17894 if ${ac_cv_path_BUILD_CC+:} false; then :
17895   $as_echo_n "(cached) " >&6
17896 else
17897   case $BUILD_CC in
17898   [\\/]* | ?:[\\/]*)
17899   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
17900   ;;
17901   *)
17902   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17903 for as_dir in $PATH
17904 do
17905   IFS=$as_save_IFS
17906   test -z "$as_dir" && as_dir=.
17907     for ac_exec_ext in '' $ac_executable_extensions; do
17908   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17909     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
17910     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17911     break 2
17912   fi
17913 done
17914   done
17915 IFS=$as_save_IFS
17916 
17917   ;;
17918 esac
17919 fi
17920 BUILD_CC=$ac_cv_path_BUILD_CC
17921 if test -n "$BUILD_CC"; then
17922   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
17923 $as_echo "$BUILD_CC" >&6; }
17924 else
17925   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17926 $as_echo "no" >&6; }
17927 fi
17928 
17929 
17930   test -n "$BUILD_CC" && break
17931 done
17932 
17933 
17934   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17935 
17936   # First separate the path from the arguments. This will split at the first
17937   # space.
17938   complete="$BUILD_CC"
17939   path="${complete%% *}"
17940   tmp="$complete EOL"
17941   arguments="${tmp#* }"
17942 
17943   # Input might be given as Windows format, start by converting to
17944   # unix format.
17945   new_path=`$CYGPATH -u "$path"`
17946 
17947   # Now try to locate executable using which
17948   new_path=`$WHICH "$new_path" 2> /dev/null`
17949   # bat and cmd files are not always considered executable in cygwin causing which
17950   # to not find them
17951   if test "x$new_path" = x \
17952            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17953            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17954     new_path=`$CYGPATH -u "$path"`
17955   fi
17956   if test "x$new_path" = x; then
17957     # Oops. Which didn't find the executable.
17958     # The splitting of arguments from the executable at a space might have been incorrect,
17959     # since paths with space are more likely in Windows. Give it another try with the whole
17960     # argument.
17961     path="$complete"
17962     arguments="EOL"
17963     new_path=`$CYGPATH -u "$path"`
17964     new_path=`$WHICH "$new_path" 2> /dev/null`
17965     # bat and cmd files are not always considered executable in cygwin causing which
17966     # to not find them
17967     if test "x$new_path" = x \
17968              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17969              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17970       new_path=`$CYGPATH -u "$path"`
17971     fi
17972     if test "x$new_path" = x; then
17973       # It's still not found. Now this is an unrecoverable error.
17974       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17975 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17976       has_space=`$ECHO "$complete" | $GREP " "`
17977       if test "x$has_space" != x; then
17978         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17979 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17980       fi
17981       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17982     fi
17983   fi
17984 
17985   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17986   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17987   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17988   # "foo.exe" is OK but "foo" is an error.
17989   #
17990   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17991   # It is also a way to make sure we got the proper file name for the real test later on.
17992   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17993   if test "x$test_shortpath" = x; then
17994     # Short path failed, file does not exist as specified.
17995     # Try adding .exe or .cmd
17996     if test -f "${new_path}.exe"; then
17997        input_to_shortpath="${new_path}.exe"
17998     elif test -f "${new_path}.cmd"; then
17999        input_to_shortpath="${new_path}.cmd"
18000     else
18001       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
18002 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
18003       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18004 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18005       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18006     fi
18007   else
18008     input_to_shortpath="$new_path"
18009   fi
18010 
18011   # Call helper function which possibly converts this using DOS-style short mode.
18012   # If so, the updated path is stored in $new_path.
18013   new_path="$input_to_shortpath"
18014 
18015   input_path="$input_to_shortpath"
18016   # Check if we need to convert this using DOS-style short mode. If the path
18017   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18018   # take no chances and rewrite it.
18019   # Note: m4 eats our [], so we need to use [ and ] instead.
18020   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18021   if test "x$has_forbidden_chars" != x; then
18022     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18023     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18024     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18025     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18026       # Going to short mode and back again did indeed matter. Since short mode is
18027       # case insensitive, let's make it lowercase to improve readability.
18028       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18029       # Now convert it back to Unix-stile (cygpath)
18030       input_path=`$CYGPATH -u "$shortmode_path"`
18031       new_path="$input_path"
18032     fi
18033   fi
18034 
18035   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18036   if test "x$test_cygdrive_prefix" = x; then
18037     # As a simple fix, exclude /usr/bin since it's not a real path.
18038     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18039       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18040       # a path prefixed by /cygdrive for fixpath to work.
18041       new_path="$CYGWIN_ROOT_PATH$input_path"
18042     fi
18043   fi
18044 
18045   # remove trailing .exe if any
18046   new_path="${new_path/%.exe/}"
18047 
18048   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18049 
18050   # First separate the path from the arguments. This will split at the first
18051   # space.
18052   complete="$BUILD_CC"
18053   path="${complete%% *}"
18054   tmp="$complete EOL"
18055   arguments="${tmp#* }"
18056 
18057   # Input might be given as Windows format, start by converting to
18058   # unix format.
18059   new_path="$path"
18060 
18061   windows_path="$new_path"
18062   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18063     unix_path=`$CYGPATH -u "$windows_path"`
18064     new_path="$unix_path"
18065   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18066     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18067     new_path="$unix_path"
18068   fi
18069 
18070 
18071   # Now try to locate executable using which
18072   new_path=`$WHICH "$new_path" 2> /dev/null`
18073 
18074   if test "x$new_path" = x; then
18075     # Oops. Which didn't find the executable.
18076     # The splitting of arguments from the executable at a space might have been incorrect,
18077     # since paths with space are more likely in Windows. Give it another try with the whole
18078     # argument.
18079     path="$complete"
18080     arguments="EOL"
18081     new_path="$path"
18082 
18083   windows_path="$new_path"
18084   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18085     unix_path=`$CYGPATH -u "$windows_path"`
18086     new_path="$unix_path"
18087   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18088     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18089     new_path="$unix_path"
18090   fi
18091 
18092 
18093     new_path=`$WHICH "$new_path" 2> /dev/null`
18094 
18095     if test "x$new_path" = x; then
18096       # It's still not found. Now this is an unrecoverable error.
18097       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18098 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18099       has_space=`$ECHO "$complete" | $GREP " "`
18100       if test "x$has_space" != x; then
18101         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18102 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18103       fi
18104       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18105     fi
18106   fi
18107 
18108   # Now new_path has a complete unix path to the binary
18109   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18110     # Keep paths in /bin as-is, but remove trailing .exe if any
18111     new_path="${new_path/%.exe/}"
18112     # Do not save /bin paths to all_fixpath_prefixes!
18113   else
18114     # Not in mixed or Windows style, start by that.
18115     new_path=`cmd //c echo $new_path`
18116 
18117   input_path="$new_path"
18118   # Check if we need to convert this using DOS-style short mode. If the path
18119   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18120   # take no chances and rewrite it.
18121   # Note: m4 eats our [], so we need to use [ and ] instead.
18122   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18123   if test "x$has_forbidden_chars" != x; then
18124     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18125     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18126   fi
18127 
18128     # Output is in $new_path
18129 
18130   windows_path="$new_path"
18131   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18132     unix_path=`$CYGPATH -u "$windows_path"`
18133     new_path="$unix_path"
18134   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18135     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18136     new_path="$unix_path"
18137   fi
18138 
18139     # remove trailing .exe if any
18140     new_path="${new_path/%.exe/}"
18141 
18142     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18143     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18144   fi
18145 
18146   else
18147     # We're on a posix platform. Hooray! :)
18148     # First separate the path from the arguments. This will split at the first
18149     # space.
18150     complete="$BUILD_CC"
18151     path="${complete%% *}"
18152     tmp="$complete EOL"
18153     arguments="${tmp#* }"
18154 
18155     # Cannot rely on the command "which" here since it doesn't always work.
18156     is_absolute_path=`$ECHO "$path" | $GREP ^/`
18157     if test -z "$is_absolute_path"; then
18158       # Path to executable is not absolute. Find it.
18159       IFS_save="$IFS"
18160       IFS=:
18161       for p in $PATH; do
18162         if test -f "$p/$path" && test -x "$p/$path"; then
18163           new_path="$p/$path"
18164           break
18165         fi
18166       done
18167       IFS="$IFS_save"
18168     else
18169       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
18170 $as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
18171       new_path="$path"
18172     fi
18173 
18174     if test "x$new_path" = x; then
18175         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18176 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18177         has_space=`$ECHO "$complete" | $GREP " "`
18178         if test "x$has_space" != x; then
18179           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18180 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18181         fi
18182         as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18183       fi
18184   fi
18185 
18186       # Now join together the path and the arguments once again
18187       if test "x$arguments" != xEOL; then
18188         new_complete="$new_path ${arguments% *}"
18189       else
18190         new_complete="$new_path"
18191       fi
18192 
18193   if test "x$complete" != "x$new_complete"; then
18194       BUILD_CC="$new_complete"
18195       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
18196 $as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
18197     fi
18198 
18199     for ac_prog in cl CC g++
18200 do
18201   # Extract the first word of "$ac_prog", so it can be a program name with args.
18202 set dummy $ac_prog; ac_word=$2
18203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18204 $as_echo_n "checking for $ac_word... " >&6; }
18205 if ${ac_cv_path_BUILD_CXX+:} false; then :
18206   $as_echo_n "(cached) " >&6
18207 else
18208   case $BUILD_CXX in
18209   [\\/]* | ?:[\\/]*)
18210   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
18211   ;;
18212   *)
18213   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18214 for as_dir in $PATH
18215 do
18216   IFS=$as_save_IFS
18217   test -z "$as_dir" && as_dir=.
18218     for ac_exec_ext in '' $ac_executable_extensions; do
18219   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18220     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
18221     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18222     break 2
18223   fi
18224 done
18225   done
18226 IFS=$as_save_IFS
18227 
18228   ;;
18229 esac
18230 fi
18231 BUILD_CXX=$ac_cv_path_BUILD_CXX
18232 if test -n "$BUILD_CXX"; then
18233   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
18234 $as_echo "$BUILD_CXX" >&6; }
18235 else
18236   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18237 $as_echo "no" >&6; }
18238 fi
18239 
18240 
18241   test -n "$BUILD_CXX" && break
18242 done
18243 
18244 
18245   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18246 
18247   # First separate the path from the arguments. This will split at the first
18248   # space.
18249   complete="$BUILD_CXX"
18250   path="${complete%% *}"
18251   tmp="$complete EOL"
18252   arguments="${tmp#* }"
18253 
18254   # Input might be given as Windows format, start by converting to
18255   # unix format.
18256   new_path=`$CYGPATH -u "$path"`
18257 
18258   # Now try to locate executable using which
18259   new_path=`$WHICH "$new_path" 2> /dev/null`
18260   # bat and cmd files are not always considered executable in cygwin causing which
18261   # to not find them
18262   if test "x$new_path" = x \
18263            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18264            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18265     new_path=`$CYGPATH -u "$path"`
18266   fi
18267   if test "x$new_path" = x; then
18268     # Oops. Which didn't find the executable.
18269     # The splitting of arguments from the executable at a space might have been incorrect,
18270     # since paths with space are more likely in Windows. Give it another try with the whole
18271     # argument.
18272     path="$complete"
18273     arguments="EOL"
18274     new_path=`$CYGPATH -u "$path"`
18275     new_path=`$WHICH "$new_path" 2> /dev/null`
18276     # bat and cmd files are not always considered executable in cygwin causing which
18277     # to not find them
18278     if test "x$new_path" = x \
18279              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18280              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18281       new_path=`$CYGPATH -u "$path"`
18282     fi
18283     if test "x$new_path" = x; then
18284       # It's still not found. Now this is an unrecoverable error.
18285       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18286 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18287       has_space=`$ECHO "$complete" | $GREP " "`
18288       if test "x$has_space" != x; then
18289         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18290 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18291       fi
18292       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18293     fi
18294   fi
18295 
18296   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18297   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18298   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18299   # "foo.exe" is OK but "foo" is an error.
18300   #
18301   # This test is therefore slightly more accurate than "test -f" to check for file precense.
18302   # It is also a way to make sure we got the proper file name for the real test later on.
18303   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18304   if test "x$test_shortpath" = x; then
18305     # Short path failed, file does not exist as specified.
18306     # Try adding .exe or .cmd
18307     if test -f "${new_path}.exe"; then
18308        input_to_shortpath="${new_path}.exe"
18309     elif test -f "${new_path}.cmd"; then
18310        input_to_shortpath="${new_path}.cmd"
18311     else
18312       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
18313 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
18314       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18315 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18316       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18317     fi
18318   else
18319     input_to_shortpath="$new_path"
18320   fi
18321 
18322   # Call helper function which possibly converts this using DOS-style short mode.
18323   # If so, the updated path is stored in $new_path.
18324   new_path="$input_to_shortpath"
18325 
18326   input_path="$input_to_shortpath"
18327   # Check if we need to convert this using DOS-style short mode. If the path
18328   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18329   # take no chances and rewrite it.
18330   # Note: m4 eats our [], so we need to use [ and ] instead.
18331   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18332   if test "x$has_forbidden_chars" != x; then
18333     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18334     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18335     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18336     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18337       # Going to short mode and back again did indeed matter. Since short mode is
18338       # case insensitive, let's make it lowercase to improve readability.
18339       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18340       # Now convert it back to Unix-stile (cygpath)
18341       input_path=`$CYGPATH -u "$shortmode_path"`
18342       new_path="$input_path"
18343     fi
18344   fi
18345 
18346   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18347   if test "x$test_cygdrive_prefix" = x; then
18348     # As a simple fix, exclude /usr/bin since it's not a real path.
18349     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18350       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18351       # a path prefixed by /cygdrive for fixpath to work.
18352       new_path="$CYGWIN_ROOT_PATH$input_path"
18353     fi
18354   fi
18355 
18356   # remove trailing .exe if any
18357   new_path="${new_path/%.exe/}"
18358 
18359   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18360 
18361   # First separate the path from the arguments. This will split at the first
18362   # space.
18363   complete="$BUILD_CXX"
18364   path="${complete%% *}"
18365   tmp="$complete EOL"
18366   arguments="${tmp#* }"
18367 
18368   # Input might be given as Windows format, start by converting to
18369   # unix format.
18370   new_path="$path"
18371 
18372   windows_path="$new_path"
18373   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18374     unix_path=`$CYGPATH -u "$windows_path"`
18375     new_path="$unix_path"
18376   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18377     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18378     new_path="$unix_path"
18379   fi
18380 
18381 
18382   # Now try to locate executable using which
18383   new_path=`$WHICH "$new_path" 2> /dev/null`
18384 
18385   if test "x$new_path" = x; then
18386     # Oops. Which didn't find the executable.
18387     # The splitting of arguments from the executable at a space might have been incorrect,
18388     # since paths with space are more likely in Windows. Give it another try with the whole
18389     # argument.
18390     path="$complete"
18391     arguments="EOL"
18392     new_path="$path"
18393 
18394   windows_path="$new_path"
18395   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18396     unix_path=`$CYGPATH -u "$windows_path"`
18397     new_path="$unix_path"
18398   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18399     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18400     new_path="$unix_path"
18401   fi
18402 
18403 
18404     new_path=`$WHICH "$new_path" 2> /dev/null`
18405 
18406     if test "x$new_path" = x; then
18407       # It's still not found. Now this is an unrecoverable error.
18408       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18409 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18410       has_space=`$ECHO "$complete" | $GREP " "`
18411       if test "x$has_space" != x; then
18412         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18413 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18414       fi
18415       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18416     fi
18417   fi
18418 
18419   # Now new_path has a complete unix path to the binary
18420   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18421     # Keep paths in /bin as-is, but remove trailing .exe if any
18422     new_path="${new_path/%.exe/}"
18423     # Do not save /bin paths to all_fixpath_prefixes!
18424   else
18425     # Not in mixed or Windows style, start by that.
18426     new_path=`cmd //c echo $new_path`
18427 
18428   input_path="$new_path"
18429   # Check if we need to convert this using DOS-style short mode. If the path
18430   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18431   # take no chances and rewrite it.
18432   # Note: m4 eats our [], so we need to use [ and ] instead.
18433   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18434   if test "x$has_forbidden_chars" != x; then
18435     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18436     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18437   fi
18438 
18439     # Output is in $new_path
18440 
18441   windows_path="$new_path"
18442   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18443     unix_path=`$CYGPATH -u "$windows_path"`
18444     new_path="$unix_path"
18445   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18446     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18447     new_path="$unix_path"
18448   fi
18449 
18450     # remove trailing .exe if any
18451     new_path="${new_path/%.exe/}"
18452 
18453     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18454     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18455   fi
18456 
18457   else
18458     # We're on a posix platform. Hooray! :)
18459     # First separate the path from the arguments. This will split at the first
18460     # space.
18461     complete="$BUILD_CXX"
18462     path="${complete%% *}"
18463     tmp="$complete EOL"
18464     arguments="${tmp#* }"
18465 
18466     # Cannot rely on the command "which" here since it doesn't always work.
18467     is_absolute_path=`$ECHO "$path" | $GREP ^/`
18468     if test -z "$is_absolute_path"; then
18469       # Path to executable is not absolute. Find it.
18470       IFS_save="$IFS"
18471       IFS=:
18472       for p in $PATH; do
18473         if test -f "$p/$path" && test -x "$p/$path"; then
18474           new_path="$p/$path"
18475           break
18476         fi
18477       done
18478       IFS="$IFS_save"
18479     else
18480       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
18481 $as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
18482       new_path="$path"
18483     fi
18484 
18485     if test "x$new_path" = x; then
18486         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18487 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18488         has_space=`$ECHO "$complete" | $GREP " "`
18489         if test "x$has_space" != x; then
18490           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18491 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18492         fi
18493         as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18494       fi
18495   fi
18496 
18497       # Now join together the path and the arguments once again
18498       if test "x$arguments" != xEOL; then
18499         new_complete="$new_path ${arguments% *}"
18500       else
18501         new_complete="$new_path"
18502       fi
18503 
18504   if test "x$complete" != "x$new_complete"; then
18505       BUILD_CXX="$new_complete"
18506       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
18507 $as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
18508     fi
18509 
18510     # Extract the first word of "ld", so it can be a program name with args.
18511 set dummy ld; ac_word=$2
18512 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18513 $as_echo_n "checking for $ac_word... " >&6; }
18514 if ${ac_cv_path_BUILD_LD+:} false; then :
18515   $as_echo_n "(cached) " >&6
18516 else
18517   case $BUILD_LD in
18518   [\\/]* | ?:[\\/]*)
18519   ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
18520   ;;
18521   *)
18522   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18523 for as_dir in $PATH
18524 do
18525   IFS=$as_save_IFS
18526   test -z "$as_dir" && as_dir=.
18527     for ac_exec_ext in '' $ac_executable_extensions; do
18528   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18529     ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
18530     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18531     break 2
18532   fi
18533 done
18534   done
18535 IFS=$as_save_IFS
18536 
18537   ;;
18538 esac
18539 fi
18540 BUILD_LD=$ac_cv_path_BUILD_LD
18541 if test -n "$BUILD_LD"; then
18542   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
18543 $as_echo "$BUILD_LD" >&6; }
18544 else
18545   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18546 $as_echo "no" >&6; }
18547 fi
18548 
18549 
18550 
18551   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18552 
18553   # First separate the path from the arguments. This will split at the first
18554   # space.
18555   complete="$BUILD_LD"
18556   path="${complete%% *}"
18557   tmp="$complete EOL"
18558   arguments="${tmp#* }"
18559 
18560   # Input might be given as Windows format, start by converting to
18561   # unix format.
18562   new_path=`$CYGPATH -u "$path"`
18563 
18564   # Now try to locate executable using which
18565   new_path=`$WHICH "$new_path" 2> /dev/null`
18566   # bat and cmd files are not always considered executable in cygwin causing which
18567   # to not find them
18568   if test "x$new_path" = x \
18569            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18570            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18571     new_path=`$CYGPATH -u "$path"`
18572   fi
18573   if test "x$new_path" = x; then
18574     # Oops. Which didn't find the executable.
18575     # The splitting of arguments from the executable at a space might have been incorrect,
18576     # since paths with space are more likely in Windows. Give it another try with the whole
18577     # argument.
18578     path="$complete"
18579     arguments="EOL"
18580     new_path=`$CYGPATH -u "$path"`
18581     new_path=`$WHICH "$new_path" 2> /dev/null`
18582     # bat and cmd files are not always considered executable in cygwin causing which
18583     # to not find them
18584     if test "x$new_path" = x \
18585              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18586              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18587       new_path=`$CYGPATH -u "$path"`
18588     fi
18589     if test "x$new_path" = x; then
18590       # It's still not found. Now this is an unrecoverable error.
18591       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18592 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18593       has_space=`$ECHO "$complete" | $GREP " "`
18594       if test "x$has_space" != x; then
18595         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18596 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18597       fi
18598       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18599     fi
18600   fi
18601 
18602   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18603   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18604   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18605   # "foo.exe" is OK but "foo" is an error.
18606   #
18607   # This test is therefore slightly more accurate than "test -f" to check for file precense.
18608   # It is also a way to make sure we got the proper file name for the real test later on.
18609   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18610   if test "x$test_shortpath" = x; then
18611     # Short path failed, file does not exist as specified.
18612     # Try adding .exe or .cmd
18613     if test -f "${new_path}.exe"; then
18614        input_to_shortpath="${new_path}.exe"
18615     elif test -f "${new_path}.cmd"; then
18616        input_to_shortpath="${new_path}.cmd"
18617     else
18618       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
18619 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
18620       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18621 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18622       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18623     fi
18624   else
18625     input_to_shortpath="$new_path"
18626   fi
18627 
18628   # Call helper function which possibly converts this using DOS-style short mode.
18629   # If so, the updated path is stored in $new_path.
18630   new_path="$input_to_shortpath"
18631 
18632   input_path="$input_to_shortpath"
18633   # Check if we need to convert this using DOS-style short mode. If the path
18634   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18635   # take no chances and rewrite it.
18636   # Note: m4 eats our [], so we need to use [ and ] instead.
18637   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18638   if test "x$has_forbidden_chars" != x; then
18639     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18640     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18641     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18642     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18643       # Going to short mode and back again did indeed matter. Since short mode is
18644       # case insensitive, let's make it lowercase to improve readability.
18645       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18646       # Now convert it back to Unix-stile (cygpath)
18647       input_path=`$CYGPATH -u "$shortmode_path"`
18648       new_path="$input_path"
18649     fi
18650   fi
18651 
18652   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18653   if test "x$test_cygdrive_prefix" = x; then
18654     # As a simple fix, exclude /usr/bin since it's not a real path.
18655     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18656       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18657       # a path prefixed by /cygdrive for fixpath to work.
18658       new_path="$CYGWIN_ROOT_PATH$input_path"
18659     fi
18660   fi
18661 
18662   # remove trailing .exe if any
18663   new_path="${new_path/%.exe/}"
18664 
18665   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18666 
18667   # First separate the path from the arguments. This will split at the first
18668   # space.
18669   complete="$BUILD_LD"
18670   path="${complete%% *}"
18671   tmp="$complete EOL"
18672   arguments="${tmp#* }"
18673 
18674   # Input might be given as Windows format, start by converting to
18675   # unix format.
18676   new_path="$path"
18677 
18678   windows_path="$new_path"
18679   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18680     unix_path=`$CYGPATH -u "$windows_path"`
18681     new_path="$unix_path"
18682   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18683     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18684     new_path="$unix_path"
18685   fi
18686 
18687 
18688   # Now try to locate executable using which
18689   new_path=`$WHICH "$new_path" 2> /dev/null`
18690 
18691   if test "x$new_path" = x; then
18692     # Oops. Which didn't find the executable.
18693     # The splitting of arguments from the executable at a space might have been incorrect,
18694     # since paths with space are more likely in Windows. Give it another try with the whole
18695     # argument.
18696     path="$complete"
18697     arguments="EOL"
18698     new_path="$path"
18699 
18700   windows_path="$new_path"
18701   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18702     unix_path=`$CYGPATH -u "$windows_path"`
18703     new_path="$unix_path"
18704   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18705     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18706     new_path="$unix_path"
18707   fi
18708 
18709 
18710     new_path=`$WHICH "$new_path" 2> /dev/null`
18711 
18712     if test "x$new_path" = x; then
18713       # It's still not found. Now this is an unrecoverable error.
18714       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18715 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18716       has_space=`$ECHO "$complete" | $GREP " "`
18717       if test "x$has_space" != x; then
18718         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18719 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18720       fi
18721       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18722     fi
18723   fi
18724 
18725   # Now new_path has a complete unix path to the binary
18726   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18727     # Keep paths in /bin as-is, but remove trailing .exe if any
18728     new_path="${new_path/%.exe/}"
18729     # Do not save /bin paths to all_fixpath_prefixes!
18730   else
18731     # Not in mixed or Windows style, start by that.
18732     new_path=`cmd //c echo $new_path`
18733 
18734   input_path="$new_path"
18735   # Check if we need to convert this using DOS-style short mode. If the path
18736   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18737   # take no chances and rewrite it.
18738   # Note: m4 eats our [], so we need to use [ and ] instead.
18739   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18740   if test "x$has_forbidden_chars" != x; then
18741     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18742     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18743   fi
18744 
18745     # Output is in $new_path
18746 
18747   windows_path="$new_path"
18748   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18749     unix_path=`$CYGPATH -u "$windows_path"`
18750     new_path="$unix_path"
18751   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18752     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18753     new_path="$unix_path"
18754   fi
18755 
18756     # remove trailing .exe if any
18757     new_path="${new_path/%.exe/}"
18758 
18759     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18760     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18761   fi
18762 
18763   else
18764     # We're on a posix platform. Hooray! :)
18765     # First separate the path from the arguments. This will split at the first
18766     # space.
18767     complete="$BUILD_LD"
18768     path="${complete%% *}"
18769     tmp="$complete EOL"
18770     arguments="${tmp#* }"
18771 
18772     # Cannot rely on the command "which" here since it doesn't always work.
18773     is_absolute_path=`$ECHO "$path" | $GREP ^/`
18774     if test -z "$is_absolute_path"; then
18775       # Path to executable is not absolute. Find it.
18776       IFS_save="$IFS"
18777       IFS=:
18778       for p in $PATH; do
18779         if test -f "$p/$path" && test -x "$p/$path"; then
18780           new_path="$p/$path"
18781           break
18782         fi
18783       done
18784       IFS="$IFS_save"
18785     else
18786       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
18787 $as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
18788       new_path="$path"
18789     fi
18790 
18791     if test "x$new_path" = x; then
18792         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18793 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18794         has_space=`$ECHO "$complete" | $GREP " "`
18795         if test "x$has_space" != x; then
18796           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18797 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18798         fi
18799         as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18800       fi
18801   fi
18802 
18803       # Now join together the path and the arguments once again
18804       if test "x$arguments" != xEOL; then
18805         new_complete="$new_path ${arguments% *}"
18806       else
18807         new_complete="$new_path"
18808       fi
18809 
18810   if test "x$complete" != "x$new_complete"; then
18811       BUILD_LD="$new_complete"
18812       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
18813 $as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
18814     fi
18815 
18816 fi
18817 
18818 
18819 
18820 
18821 # If a devkit is found on the builddeps server, then prepend its path to the
18822 # PATH variable. If there are cross compilers available in the devkit, these
18823 # will be found by AC_PROG_CC et al.
18824 DEVKIT=
18825 
18826 
18827     if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
18828         # Source the builddeps file again, to make sure it uses the latest variables!
18829         . $builddepsfile
18830         # Look for a target and build machine specific resource!
18831         eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
18832         if test "x$resource" = x; then
18833             # Ok, lets instead look for a target specific resource
18834             eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
18835         fi
18836         if test "x$resource" = x; then
18837             # Ok, lets instead look for a build specific resource
18838             eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
18839         fi
18840         if test "x$resource" = x; then
18841             # Ok, lets instead look for a generic resource
18842             # (The devkit comes from M4 and not the shell, thus no need for eval here.)
18843             resource=${builddep_devkit}
18844         fi
18845         if test "x$resource" != x; then
18846             { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
18847 $as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
18848             # If the resource in the builddeps.conf file is an existing directory,
18849             # for example /java/linux/cups
18850             if test -d ${resource}; then
18851                depdir=${resource}
18852             else
18853 
18854 # devkit is for example mymodule
18855 # $resource is for example libs/general/libmymod_1_2_3.zip
18856 # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
18857 # $with_builddeps_dir is for example /localhome/builddeps
18858 # depdir is the name of the variable into which we store the depdir, eg MYMOD
18859 # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
18860 # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
18861     filename=`basename $resource`
18862     filebase=`echo $filename | sed 's/\.[^\.]*$//'`
18863     filebase=${filename%%.*}
18864     extension=${filename#*.}
18865     installdir=$with_builddeps_dir/$filebase
18866     if test ! -f $installdir/$filename.unpacked; then
18867         { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
18868 $as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
18869         if test ! -d $installdir; then
18870             mkdir -p $installdir
18871         fi
18872         if test ! -d $installdir; then
18873             as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
18874         fi
18875         tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
18876         touch $tmpfile
18877         if test ! -f $tmpfile; then
18878             as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
18879         fi
18880 
18881     # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
18882     # $tmpfile is the local file name for the downloaded file.
18883     VALID_TOOL=no
18884     if test "x$BDEPS_FTP" = xwget; then
18885        VALID_TOOL=yes
18886        wget -O $tmpfile $with_builddeps_server/$resource
18887     fi
18888     if test "x$BDEPS_FTP" = xlftp; then
18889        VALID_TOOL=yes
18890        lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
18891     fi
18892     if test "x$BDEPS_FTP" = xftp; then
18893         VALID_TOOL=yes
18894         FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
18895         FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
18896         FTPUSERPWD=${FTPSERVER%%@*}
18897         if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
18898             FTPUSER=${userpwd%%:*}
18899             FTPPWD=${userpwd#*@}
18900             FTPSERVER=${FTPSERVER#*@}
18901         else
18902             FTPUSER=ftp
18903             FTPPWD=ftp
18904         fi
18905         # the "pass" command does not work on some
18906         # ftp clients (read ftp.exe) but if it works,
18907         # passive mode is better!
18908         (\
18909             echo "user $FTPUSER $FTPPWD"        ;\
18910             echo "pass"                         ;\
18911             echo "bin"                          ;\
18912             echo "get $FTPPATH $tmpfile"              ;\
18913         ) | ftp -in $FTPSERVER
18914     fi
18915     if test "x$VALID_TOOL" != xyes; then
18916        as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
18917     fi
18918 
18919         mv $tmpfile $installdir/$filename
18920         if test ! -s $installdir/$filename; then
18921             as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
18922         fi
18923         case "$extension" in
18924             zip)  echo "Unzipping $installdir/$filename..."
18925                (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
18926             ;;
18927             tar.gz) echo "Untaring $installdir/$filename..."
18928                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18929             ;;
18930             tgz) echo "Untaring $installdir/$filename..."
18931                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18932             ;;
18933             *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
18934             ;;
18935         esac
18936     fi
18937     if test -f $installdir/$filename.unpacked; then
18938         depdir=$installdir
18939     fi
18940 
18941             fi
18942             # Source the builddeps file again, because in the previous command, the depdir
18943             # was updated to point at the current build dependency install directory.
18944             . $builddepsfile
18945             # Now extract variables from the builddeps.conf files.
18946             theroot=${builddep_devkit_ROOT}
18947             thecflags=${builddep_devkit_CFLAGS}
18948             thelibs=${builddep_devkit_LIBS}
18949             if test "x$depdir" = x; then
18950                 as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
18951             fi
18952             DEVKIT=$depdir
18953             if test "x$theroot" != x; then
18954                DEVKIT="$theroot"
18955             fi
18956             if test "x$thecflags" != x; then
18957                DEVKIT_CFLAGS="$thecflags"
18958             fi
18959             if test "x$thelibs" != x; then
18960                DEVKIT_LIBS="$thelibs"
18961             fi
18962             # Found devkit
18963                      PATH="$DEVKIT/bin:$PATH"
18964                      SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
18965                      if test "x$x_includes" = "xNONE"; then
18966                          x_includes="$SYS_ROOT/usr/include/X11"
18967                      fi
18968                      if test "x$x_libraries" = "xNONE"; then
18969                          x_libraries="$SYS_ROOT/usr/lib"
18970                      fi
18971 
18972 
18973         fi
18974 
18975     fi
18976 
18977 
18978 if test "x$SYS_ROOT" != "x/" ; then
18979     CFLAGS="--sysroot=$SYS_ROOT $CFLAGS"
18980     CXXFLAGS="--sysroot=$SYS_ROOT $CXXFLAGS"
18981     OBJCFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
18982     OBJCXXFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
18983     CPPFLAGS="--sysroot=$SYS_ROOT $CPPFLAGS"
18984     LDFLAGS="--sysroot=$SYS_ROOT $LDFLAGS"
18985 fi
18986 
18987 # Store the CFLAGS etal passed to the configure script.
18988 ORG_CFLAGS="$CFLAGS"
18989 ORG_CXXFLAGS="$CXXFLAGS"
18990 ORG_OBJCFLAGS="$OBJCFLAGS"
18991 
18992 # autoconf magic only relies on PATH, so update it if tools dir is specified
18993 OLD_PATH="$PATH"
18994 if test "x$TOOLS_DIR" != x; then
18995   PATH=$TOOLS_DIR:$PATH
18996 fi
18997 
18998 
18999 ### Locate C compiler (CC)
19000 
19001 # On windows, only cl.exe is supported.
19002 # On Solaris, cc is preferred to gcc.
19003 # Elsewhere, gcc is preferred to cc.
19004 
19005 if test "x$CC" != x; then
19006   COMPILER_CHECK_LIST="$CC"
19007 elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
19008   COMPILER_CHECK_LIST="cl"
19009 elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
19010   COMPILER_CHECK_LIST="cc gcc"
19011 else
19012   COMPILER_CHECK_LIST="gcc cc"
19013 fi
19014 
19015 
19016   COMPILER_NAME=C
19017 
19018   CC=
19019   # If TOOLS_DIR is set, check for all compiler names in there first
19020   # before checking the rest of the PATH.
19021   if test -n "$TOOLS_DIR"; then
19022     PATH_save="$PATH"
19023     PATH="$TOOLS_DIR"
19024     for ac_prog in $COMPILER_CHECK_LIST
19025 do
19026   # Extract the first word of "$ac_prog", so it can be a program name with args.
19027 set dummy $ac_prog; ac_word=$2
19028 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19029 $as_echo_n "checking for $ac_word... " >&6; }
19030 if ${ac_cv_path_TOOLS_DIR_CC+:} false; then :
19031   $as_echo_n "(cached) " >&6
19032 else
19033   case $TOOLS_DIR_CC in
19034   [\\/]* | ?:[\\/]*)
19035   ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
19036   ;;
19037   *)
19038   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19039 for as_dir in $PATH
19040 do
19041   IFS=$as_save_IFS
19042   test -z "$as_dir" && as_dir=.
19043     for ac_exec_ext in '' $ac_executable_extensions; do
19044   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19045     ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
19046     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19047     break 2
19048   fi
19049 done
19050   done
19051 IFS=$as_save_IFS
19052 
19053   ;;
19054 esac
19055 fi
19056 TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
19057 if test -n "$TOOLS_DIR_CC"; then
19058   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
19059 $as_echo "$TOOLS_DIR_CC" >&6; }
19060 else
19061   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19062 $as_echo "no" >&6; }
19063 fi
19064 
19065 
19066   test -n "$TOOLS_DIR_CC" && break
19067 done
19068 
19069     CC=$TOOLS_DIR_CC
19070     PATH="$PATH_save"
19071   fi
19072 
19073   # AC_PATH_PROGS can't be run multiple times with the same variable,
19074   # so create a new name for this run.
19075   if test "x$CC" = x; then
19076     for ac_prog in $COMPILER_CHECK_LIST
19077 do
19078   # Extract the first word of "$ac_prog", so it can be a program name with args.
19079 set dummy $ac_prog; ac_word=$2
19080 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19081 $as_echo_n "checking for $ac_word... " >&6; }
19082 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
19083   $as_echo_n "(cached) " >&6
19084 else
19085   case $POTENTIAL_CC in
19086   [\\/]* | ?:[\\/]*)
19087   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
19088   ;;
19089   *)
19090   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19091 for as_dir in $PATH
19092 do
19093   IFS=$as_save_IFS
19094   test -z "$as_dir" && as_dir=.
19095     for ac_exec_ext in '' $ac_executable_extensions; do
19096   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19097     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
19098     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19099     break 2
19100   fi
19101 done
19102   done
19103 IFS=$as_save_IFS
19104 
19105   ;;
19106 esac
19107 fi
19108 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
19109 if test -n "$POTENTIAL_CC"; then
19110   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
19111 $as_echo "$POTENTIAL_CC" >&6; }
19112 else
19113   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19114 $as_echo "no" >&6; }
19115 fi
19116 
19117 
19118   test -n "$POTENTIAL_CC" && break
19119 done
19120 
19121     CC=$POTENTIAL_CC
19122   fi
19123 
19124   if test "x$CC" = x; then
19125 
19126     # Print a helpful message on how to acquire the necessary build dependency.
19127     # devkit is the help tag: freetyp2, cups, pulse, alsa etc
19128     MISSING_DEPENDENCY=devkit
19129     PKGHANDLER_COMMAND=
19130 
19131     case $PKGHANDLER in
19132         apt-get)
19133                 apt_help     $MISSING_DEPENDENCY ;;
19134     yum)
19135                 yum_help     $MISSING_DEPENDENCY ;;
19136         port)
19137                 port_help    $MISSING_DEPENDENCY ;;
19138         pkgutil)
19139                 pkgutil_help $MISSING_DEPENDENCY ;;
19140         pkgadd)
19141                 pkgadd_help  $MISSING_DEPENDENCY ;;
19142     * )
19143       break ;;
19144     esac
19145 
19146     if test "x$PKGHANDLER_COMMAND" != x; then
19147         HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
19148     fi
19149 
19150       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
19151   fi
19152 
19153   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19154 
19155   # First separate the path from the arguments. This will split at the first
19156   # space.
19157   complete="$CC"
19158   path="${complete%% *}"
19159   tmp="$complete EOL"
19160   arguments="${tmp#* }"
19161 
19162   # Input might be given as Windows format, start by converting to
19163   # unix format.
19164   new_path=`$CYGPATH -u "$path"`
19165 
19166   # Now try to locate executable using which
19167   new_path=`$WHICH "$new_path" 2> /dev/null`
19168   # bat and cmd files are not always considered executable in cygwin causing which
19169   # to not find them
19170   if test "x$new_path" = x \
19171            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19172            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19173     new_path=`$CYGPATH -u "$path"`
19174   fi
19175   if test "x$new_path" = x; then
19176     # Oops. Which didn't find the executable.
19177     # The splitting of arguments from the executable at a space might have been incorrect,
19178     # since paths with space are more likely in Windows. Give it another try with the whole
19179     # argument.
19180     path="$complete"
19181     arguments="EOL"
19182     new_path=`$CYGPATH -u "$path"`
19183     new_path=`$WHICH "$new_path" 2> /dev/null`
19184     # bat and cmd files are not always considered executable in cygwin causing which
19185     # to not find them
19186     if test "x$new_path" = x \
19187              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19188              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19189       new_path=`$CYGPATH -u "$path"`
19190     fi
19191     if test "x$new_path" = x; then
19192       # It's still not found. Now this is an unrecoverable error.
19193       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19194 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19195       has_space=`$ECHO "$complete" | $GREP " "`
19196       if test "x$has_space" != x; then
19197         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19198 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19199       fi
19200       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19201     fi
19202   fi
19203 
19204   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19205   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19206   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19207   # "foo.exe" is OK but "foo" is an error.
19208   #
19209   # This test is therefore slightly more accurate than "test -f" to check for file precense.
19210   # It is also a way to make sure we got the proper file name for the real test later on.
19211   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19212   if test "x$test_shortpath" = x; then
19213     # Short path failed, file does not exist as specified.
19214     # Try adding .exe or .cmd
19215     if test -f "${new_path}.exe"; then
19216        input_to_shortpath="${new_path}.exe"
19217     elif test -f "${new_path}.cmd"; then
19218        input_to_shortpath="${new_path}.cmd"
19219     else
19220       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
19221 $as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
19222       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19223 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19224       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19225     fi
19226   else
19227     input_to_shortpath="$new_path"
19228   fi
19229 
19230   # Call helper function which possibly converts this using DOS-style short mode.
19231   # If so, the updated path is stored in $new_path.
19232   new_path="$input_to_shortpath"
19233 
19234   input_path="$input_to_shortpath"
19235   # Check if we need to convert this using DOS-style short mode. If the path
19236   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19237   # take no chances and rewrite it.
19238   # Note: m4 eats our [], so we need to use [ and ] instead.
19239   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19240   if test "x$has_forbidden_chars" != x; then
19241     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19242     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19243     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19244     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19245       # Going to short mode and back again did indeed matter. Since short mode is
19246       # case insensitive, let's make it lowercase to improve readability.
19247       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19248       # Now convert it back to Unix-stile (cygpath)
19249       input_path=`$CYGPATH -u "$shortmode_path"`
19250       new_path="$input_path"
19251     fi
19252   fi
19253 
19254   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19255   if test "x$test_cygdrive_prefix" = x; then
19256     # As a simple fix, exclude /usr/bin since it's not a real path.
19257     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19258       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19259       # a path prefixed by /cygdrive for fixpath to work.
19260       new_path="$CYGWIN_ROOT_PATH$input_path"
19261     fi
19262   fi
19263 
19264   # remove trailing .exe if any
19265   new_path="${new_path/%.exe/}"
19266 
19267   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19268 
19269   # First separate the path from the arguments. This will split at the first
19270   # space.
19271   complete="$CC"
19272   path="${complete%% *}"
19273   tmp="$complete EOL"
19274   arguments="${tmp#* }"
19275 
19276   # Input might be given as Windows format, start by converting to
19277   # unix format.
19278   new_path="$path"
19279 
19280   windows_path="$new_path"
19281   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19282     unix_path=`$CYGPATH -u "$windows_path"`
19283     new_path="$unix_path"
19284   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19285     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19286     new_path="$unix_path"
19287   fi
19288 
19289 
19290   # Now try to locate executable using which
19291   new_path=`$WHICH "$new_path" 2> /dev/null`
19292 
19293   if test "x$new_path" = x; then
19294     # Oops. Which didn't find the executable.
19295     # The splitting of arguments from the executable at a space might have been incorrect,
19296     # since paths with space are more likely in Windows. Give it another try with the whole
19297     # argument.
19298     path="$complete"
19299     arguments="EOL"
19300     new_path="$path"
19301 
19302   windows_path="$new_path"
19303   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19304     unix_path=`$CYGPATH -u "$windows_path"`
19305     new_path="$unix_path"
19306   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19307     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19308     new_path="$unix_path"
19309   fi
19310 
19311 
19312     new_path=`$WHICH "$new_path" 2> /dev/null`
19313 
19314     if test "x$new_path" = x; then
19315       # It's still not found. Now this is an unrecoverable error.
19316       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19317 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19318       has_space=`$ECHO "$complete" | $GREP " "`
19319       if test "x$has_space" != x; then
19320         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19321 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19322       fi
19323       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19324     fi
19325   fi
19326 
19327   # Now new_path has a complete unix path to the binary
19328   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19329     # Keep paths in /bin as-is, but remove trailing .exe if any
19330     new_path="${new_path/%.exe/}"
19331     # Do not save /bin paths to all_fixpath_prefixes!
19332   else
19333     # Not in mixed or Windows style, start by that.
19334     new_path=`cmd //c echo $new_path`
19335 
19336   input_path="$new_path"
19337   # Check if we need to convert this using DOS-style short mode. If the path
19338   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19339   # take no chances and rewrite it.
19340   # Note: m4 eats our [], so we need to use [ and ] instead.
19341   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19342   if test "x$has_forbidden_chars" != x; then
19343     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19344     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19345   fi
19346 
19347     # Output is in $new_path
19348 
19349   windows_path="$new_path"
19350   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19351     unix_path=`$CYGPATH -u "$windows_path"`
19352     new_path="$unix_path"
19353   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19354     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19355     new_path="$unix_path"
19356   fi
19357 
19358     # remove trailing .exe if any
19359     new_path="${new_path/%.exe/}"
19360 
19361     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19362     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19363   fi
19364 
19365   else
19366     # We're on a posix platform. Hooray! :)
19367     # First separate the path from the arguments. This will split at the first
19368     # space.
19369     complete="$CC"
19370     path="${complete%% *}"
19371     tmp="$complete EOL"
19372     arguments="${tmp#* }"
19373 
19374     # Cannot rely on the command "which" here since it doesn't always work.
19375     is_absolute_path=`$ECHO "$path" | $GREP ^/`
19376     if test -z "$is_absolute_path"; then
19377       # Path to executable is not absolute. Find it.
19378       IFS_save="$IFS"
19379       IFS=:
19380       for p in $PATH; do
19381         if test -f "$p/$path" && test -x "$p/$path"; then
19382           new_path="$p/$path"
19383           break
19384         fi
19385       done
19386       IFS="$IFS_save"
19387     else
19388       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
19389 $as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
19390       new_path="$path"
19391     fi
19392 
19393     if test "x$new_path" = x; then
19394         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19395 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19396         has_space=`$ECHO "$complete" | $GREP " "`
19397         if test "x$has_space" != x; then
19398           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19399 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19400         fi
19401         as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19402       fi
19403   fi
19404 
19405       # Now join together the path and the arguments once again
19406       if test "x$arguments" != xEOL; then
19407         new_complete="$new_path ${arguments% *}"
19408       else
19409         new_complete="$new_path"
19410       fi
19411 
19412   if test "x$complete" != "x$new_complete"; then
19413       CC="$new_complete"
19414       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
19415 $as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
19416     fi
19417 
19418   { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
19419 $as_echo_n "checking resolved symbolic links for CC... " >&6; }
19420   TEST_COMPILER="$CC"
19421 
19422     if test "x$OPENJDK_BUILD_OS" != xwindows; then
19423         # Follow a chain of symbolic links. Use readlink
19424         # where it exists, else fall back to horribly
19425         # complicated shell code.
19426         if test "x$READLINK_TESTED" != yes; then
19427             # On MacOSX there is a readlink tool with a different
19428             # purpose than the GNU readlink tool. Check the found readlink.
19429             ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19430             if test "x$ISGNU" = x; then
19431                  # A readlink that we do not know how to use.
19432                  # Are there other non-GNU readlinks out there?
19433                  READLINK_TESTED=yes
19434                  READLINK=
19435             fi
19436         fi
19437 
19438         if test "x$READLINK" != x; then
19439             TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
19440         else
19441             # Save the current directory for restoring afterwards
19442             STARTDIR=$PWD
19443             COUNTER=0
19444             sym_link_dir=`$DIRNAME $TEST_COMPILER`
19445             sym_link_file=`$BASENAME $TEST_COMPILER`
19446             cd $sym_link_dir
19447             # Use -P flag to resolve symlinks in directories.
19448             cd `$THEPWDCMD -P`
19449             sym_link_dir=`$THEPWDCMD -P`
19450             # Resolve file symlinks
19451             while test $COUNTER -lt 20; do
19452                 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19453                 if test "x$ISLINK" == x; then
19454                     # This is not a symbolic link! We are done!
19455                     break
19456                 fi
19457                 # Again resolve directory symlinks since the target of the just found
19458                 # link could be in a different directory
19459                 cd `$DIRNAME $ISLINK`
19460                 sym_link_dir=`$THEPWDCMD -P`
19461                 sym_link_file=`$BASENAME $ISLINK`
19462                 let COUNTER=COUNTER+1
19463             done
19464             cd $STARTDIR
19465             TEST_COMPILER=$sym_link_dir/$sym_link_file
19466         fi
19467     fi
19468 
19469   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
19470 $as_echo "$TEST_COMPILER" >&6; }
19471   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
19472 $as_echo_n "checking if CC is disguised ccache... " >&6; }
19473 
19474   COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
19475   if test "x$COMPILER_BASENAME" = "xccache"; then
19476     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
19477 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
19478     # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
19479     # We want to control ccache invocation ourselves, so ignore this cc and try
19480     # searching again.
19481 
19482     # Remove the path to the fake ccache cc from the PATH
19483     RETRY_COMPILER_SAVED_PATH="$PATH"
19484     COMPILER_DIRNAME=`$DIRNAME $CC`
19485     PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
19486 
19487     # Try again looking for our compiler
19488     if test -n "$ac_tool_prefix"; then
19489   for ac_prog in $COMPILER_CHECK_LIST
19490   do
19491     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19492 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19494 $as_echo_n "checking for $ac_word... " >&6; }
19495 if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
19496   $as_echo_n "(cached) " >&6
19497 else
19498   if test -n "$PROPER_COMPILER_CC"; then
19499   ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
19500 else
19501 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19502 for as_dir in $PATH
19503 do
19504   IFS=$as_save_IFS
19505   test -z "$as_dir" && as_dir=.
19506     for ac_exec_ext in '' $ac_executable_extensions; do
19507   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19508     ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
19509     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19510     break 2
19511   fi
19512 done
19513   done
19514 IFS=$as_save_IFS
19515 
19516 fi
19517 fi
19518 PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
19519 if test -n "$PROPER_COMPILER_CC"; then
19520   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19521 $as_echo "$PROPER_COMPILER_CC" >&6; }
19522 else
19523   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19524 $as_echo "no" >&6; }
19525 fi
19526 
19527 
19528     test -n "$PROPER_COMPILER_CC" && break
19529   done
19530 fi
19531 if test -z "$PROPER_COMPILER_CC"; then
19532   ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
19533   for ac_prog in $COMPILER_CHECK_LIST
19534 do
19535   # Extract the first word of "$ac_prog", so it can be a program name with args.
19536 set dummy $ac_prog; ac_word=$2
19537 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19538 $as_echo_n "checking for $ac_word... " >&6; }
19539 if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
19540   $as_echo_n "(cached) " >&6
19541 else
19542   if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19543   ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
19544 else
19545 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19546 for as_dir in $PATH
19547 do
19548   IFS=$as_save_IFS
19549   test -z "$as_dir" && as_dir=.
19550     for ac_exec_ext in '' $ac_executable_extensions; do
19551   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19552     ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
19553     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19554     break 2
19555   fi
19556 done
19557   done
19558 IFS=$as_save_IFS
19559 
19560 fi
19561 fi
19562 ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
19563 if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19564   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
19565 $as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
19566 else
19567   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19568 $as_echo "no" >&6; }
19569 fi
19570 
19571 
19572   test -n "$ac_ct_PROPER_COMPILER_CC" && break
19573 done
19574 
19575   if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
19576     PROPER_COMPILER_CC=""
19577   else
19578     case $cross_compiling:$ac_tool_warned in
19579 yes:)
19580 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19581 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19582 ac_tool_warned=yes ;;
19583 esac
19584     PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
19585   fi
19586 fi
19587 
19588 
19589   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19590 
19591   # First separate the path from the arguments. This will split at the first
19592   # space.
19593   complete="$PROPER_COMPILER_CC"
19594   path="${complete%% *}"
19595   tmp="$complete EOL"
19596   arguments="${tmp#* }"
19597 
19598   # Input might be given as Windows format, start by converting to
19599   # unix format.
19600   new_path=`$CYGPATH -u "$path"`
19601 
19602   # Now try to locate executable using which
19603   new_path=`$WHICH "$new_path" 2> /dev/null`
19604   # bat and cmd files are not always considered executable in cygwin causing which
19605   # to not find them
19606   if test "x$new_path" = x \
19607            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19608            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19609     new_path=`$CYGPATH -u "$path"`
19610   fi
19611   if test "x$new_path" = x; then
19612     # Oops. Which didn't find the executable.
19613     # The splitting of arguments from the executable at a space might have been incorrect,
19614     # since paths with space are more likely in Windows. Give it another try with the whole
19615     # argument.
19616     path="$complete"
19617     arguments="EOL"
19618     new_path=`$CYGPATH -u "$path"`
19619     new_path=`$WHICH "$new_path" 2> /dev/null`
19620     # bat and cmd files are not always considered executable in cygwin causing which
19621     # to not find them
19622     if test "x$new_path" = x \
19623              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19624              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19625       new_path=`$CYGPATH -u "$path"`
19626     fi
19627     if test "x$new_path" = x; then
19628       # It's still not found. Now this is an unrecoverable error.
19629       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19630 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19631       has_space=`$ECHO "$complete" | $GREP " "`
19632       if test "x$has_space" != x; then
19633         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19634 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19635       fi
19636       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19637     fi
19638   fi
19639 
19640   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19641   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19642   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19643   # "foo.exe" is OK but "foo" is an error.
19644   #
19645   # This test is therefore slightly more accurate than "test -f" to check for file precense.
19646   # It is also a way to make sure we got the proper file name for the real test later on.
19647   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19648   if test "x$test_shortpath" = x; then
19649     # Short path failed, file does not exist as specified.
19650     # Try adding .exe or .cmd
19651     if test -f "${new_path}.exe"; then
19652        input_to_shortpath="${new_path}.exe"
19653     elif test -f "${new_path}.cmd"; then
19654        input_to_shortpath="${new_path}.cmd"
19655     else
19656       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
19657 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
19658       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19659 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19660       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19661     fi
19662   else
19663     input_to_shortpath="$new_path"
19664   fi
19665 
19666   # Call helper function which possibly converts this using DOS-style short mode.
19667   # If so, the updated path is stored in $new_path.
19668   new_path="$input_to_shortpath"
19669 
19670   input_path="$input_to_shortpath"
19671   # Check if we need to convert this using DOS-style short mode. If the path
19672   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19673   # take no chances and rewrite it.
19674   # Note: m4 eats our [], so we need to use [ and ] instead.
19675   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19676   if test "x$has_forbidden_chars" != x; then
19677     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19678     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19679     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19680     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19681       # Going to short mode and back again did indeed matter. Since short mode is
19682       # case insensitive, let's make it lowercase to improve readability.
19683       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19684       # Now convert it back to Unix-stile (cygpath)
19685       input_path=`$CYGPATH -u "$shortmode_path"`
19686       new_path="$input_path"
19687     fi
19688   fi
19689 
19690   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19691   if test "x$test_cygdrive_prefix" = x; then
19692     # As a simple fix, exclude /usr/bin since it's not a real path.
19693     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19694       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19695       # a path prefixed by /cygdrive for fixpath to work.
19696       new_path="$CYGWIN_ROOT_PATH$input_path"
19697     fi
19698   fi
19699 
19700   # remove trailing .exe if any
19701   new_path="${new_path/%.exe/}"
19702 
19703   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19704 
19705   # First separate the path from the arguments. This will split at the first
19706   # space.
19707   complete="$PROPER_COMPILER_CC"
19708   path="${complete%% *}"
19709   tmp="$complete EOL"
19710   arguments="${tmp#* }"
19711 
19712   # Input might be given as Windows format, start by converting to
19713   # unix format.
19714   new_path="$path"
19715 
19716   windows_path="$new_path"
19717   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19718     unix_path=`$CYGPATH -u "$windows_path"`
19719     new_path="$unix_path"
19720   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19721     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19722     new_path="$unix_path"
19723   fi
19724 
19725 
19726   # Now try to locate executable using which
19727   new_path=`$WHICH "$new_path" 2> /dev/null`
19728 
19729   if test "x$new_path" = x; then
19730     # Oops. Which didn't find the executable.
19731     # The splitting of arguments from the executable at a space might have been incorrect,
19732     # since paths with space are more likely in Windows. Give it another try with the whole
19733     # argument.
19734     path="$complete"
19735     arguments="EOL"
19736     new_path="$path"
19737 
19738   windows_path="$new_path"
19739   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19740     unix_path=`$CYGPATH -u "$windows_path"`
19741     new_path="$unix_path"
19742   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19743     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19744     new_path="$unix_path"
19745   fi
19746 
19747 
19748     new_path=`$WHICH "$new_path" 2> /dev/null`
19749 
19750     if test "x$new_path" = x; then
19751       # It's still not found. Now this is an unrecoverable error.
19752       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19753 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19754       has_space=`$ECHO "$complete" | $GREP " "`
19755       if test "x$has_space" != x; then
19756         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19757 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19758       fi
19759       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19760     fi
19761   fi
19762 
19763   # Now new_path has a complete unix path to the binary
19764   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19765     # Keep paths in /bin as-is, but remove trailing .exe if any
19766     new_path="${new_path/%.exe/}"
19767     # Do not save /bin paths to all_fixpath_prefixes!
19768   else
19769     # Not in mixed or Windows style, start by that.
19770     new_path=`cmd //c echo $new_path`
19771 
19772   input_path="$new_path"
19773   # Check if we need to convert this using DOS-style short mode. If the path
19774   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19775   # take no chances and rewrite it.
19776   # Note: m4 eats our [], so we need to use [ and ] instead.
19777   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19778   if test "x$has_forbidden_chars" != x; then
19779     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19780     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19781   fi
19782 
19783     # Output is in $new_path
19784 
19785   windows_path="$new_path"
19786   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19787     unix_path=`$CYGPATH -u "$windows_path"`
19788     new_path="$unix_path"
19789   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19790     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19791     new_path="$unix_path"
19792   fi
19793 
19794     # remove trailing .exe if any
19795     new_path="${new_path/%.exe/}"
19796 
19797     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19798     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19799   fi
19800 
19801   else
19802     # We're on a posix platform. Hooray! :)
19803     # First separate the path from the arguments. This will split at the first
19804     # space.
19805     complete="$PROPER_COMPILER_CC"
19806     path="${complete%% *}"
19807     tmp="$complete EOL"
19808     arguments="${tmp#* }"
19809 
19810     # Cannot rely on the command "which" here since it doesn't always work.
19811     is_absolute_path=`$ECHO "$path" | $GREP ^/`
19812     if test -z "$is_absolute_path"; then
19813       # Path to executable is not absolute. Find it.
19814       IFS_save="$IFS"
19815       IFS=:
19816       for p in $PATH; do
19817         if test -f "$p/$path" && test -x "$p/$path"; then
19818           new_path="$p/$path"
19819           break
19820         fi
19821       done
19822       IFS="$IFS_save"
19823     else
19824       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
19825 $as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
19826       new_path="$path"
19827     fi
19828 
19829     if test "x$new_path" = x; then
19830         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19831 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19832         has_space=`$ECHO "$complete" | $GREP " "`
19833         if test "x$has_space" != x; then
19834           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19835 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19836         fi
19837         as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19838       fi
19839   fi
19840 
19841       # Now join together the path and the arguments once again
19842       if test "x$arguments" != xEOL; then
19843         new_complete="$new_path ${arguments% *}"
19844       else
19845         new_complete="$new_path"
19846       fi
19847 
19848   if test "x$complete" != "x$new_complete"; then
19849       PROPER_COMPILER_CC="$new_complete"
19850       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
19851 $as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
19852     fi
19853 
19854     PATH="$RETRY_COMPILER_SAVED_PATH"
19855 
19856     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
19857 $as_echo_n "checking for resolved symbolic links for CC... " >&6; }
19858 
19859     if test "x$OPENJDK_BUILD_OS" != xwindows; then
19860         # Follow a chain of symbolic links. Use readlink
19861         # where it exists, else fall back to horribly
19862         # complicated shell code.
19863         if test "x$READLINK_TESTED" != yes; then
19864             # On MacOSX there is a readlink tool with a different
19865             # purpose than the GNU readlink tool. Check the found readlink.
19866             ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19867             if test "x$ISGNU" = x; then
19868                  # A readlink that we do not know how to use.
19869                  # Are there other non-GNU readlinks out there?
19870                  READLINK_TESTED=yes
19871                  READLINK=
19872             fi
19873         fi
19874 
19875         if test "x$READLINK" != x; then
19876             PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
19877         else
19878             # Save the current directory for restoring afterwards
19879             STARTDIR=$PWD
19880             COUNTER=0
19881             sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
19882             sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
19883             cd $sym_link_dir
19884             # Use -P flag to resolve symlinks in directories.
19885             cd `$THEPWDCMD -P`
19886             sym_link_dir=`$THEPWDCMD -P`
19887             # Resolve file symlinks
19888             while test $COUNTER -lt 20; do
19889                 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19890                 if test "x$ISLINK" == x; then
19891                     # This is not a symbolic link! We are done!
19892                     break
19893                 fi
19894                 # Again resolve directory symlinks since the target of the just found
19895                 # link could be in a different directory
19896                 cd `$DIRNAME $ISLINK`
19897                 sym_link_dir=`$THEPWDCMD -P`
19898                 sym_link_file=`$BASENAME $ISLINK`
19899                 let COUNTER=COUNTER+1
19900             done
19901             cd $STARTDIR
19902             PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
19903         fi
19904     fi
19905 
19906     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19907 $as_echo "$PROPER_COMPILER_CC" >&6; }
19908     CC="$PROPER_COMPILER_CC"
19909   else
19910     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
19911 $as_echo "no, keeping CC" >&6; }
19912     CC="$TEST_COMPILER"
19913   fi
19914 
19915   COMPILER=$CC
19916   COMPILER_NAME=$COMPILER_NAME
19917 
19918   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
19919     # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
19920     COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
19921     $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
19922     if test $? -ne 0; then
19923       GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19924 
19925       { $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
19926 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
19927       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
19928 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
19929       as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19930     else
19931       COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
19932       COMPILER_VENDOR="Sun Studio"
19933     fi
19934   elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
19935     # First line typically looks something like:
19936     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
19937     COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
19938     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
19939     COMPILER_VENDOR="Microsoft CL.EXE"
19940     COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
19941     if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
19942       if test "x$COMPILER_CPU_TEST" != "x80x86"; then
19943         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
19944       fi
19945     elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
19946       if test "x$COMPILER_CPU_TEST" != "xx64"; then
19947         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
19948       fi
19949     fi
19950   else
19951     COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19952     # Check that this is likely to be GCC.
19953     $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
19954     if test $? -ne 0; then
19955       { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
19956 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
19957       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
19958 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
19959       as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19960     fi
19961 
19962     # First line typically looks something like:
19963     # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
19964     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
19965     COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
19966   fi
19967   # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
19968   CC_VERSION="$COMPILER_VERSION"
19969   # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
19970   CC_VENDOR="$COMPILER_VENDOR"
19971 
19972   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
19973 $as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
19974 
19975 
19976 # Now that we have resolved CC ourself, let autoconf have its go at it
19977 ac_ext=c
19978 ac_cpp='$CPP $CPPFLAGS'
19979 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19980 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19981 ac_compiler_gnu=$ac_cv_c_compiler_gnu
19982 if test -n "$ac_tool_prefix"; then
19983   for ac_prog in $CC
19984   do
19985     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19986 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19987 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19988 $as_echo_n "checking for $ac_word... " >&6; }
19989 if ${ac_cv_prog_CC+:} false; then :
19990   $as_echo_n "(cached) " >&6
19991 else
19992   if test -n "$CC"; then
19993   ac_cv_prog_CC="$CC" # Let the user override the test.
19994 else
19995 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19996 for as_dir in $PATH
19997 do
19998   IFS=$as_save_IFS
19999   test -z "$as_dir" && as_dir=.
20000     for ac_exec_ext in '' $ac_executable_extensions; do
20001   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20002     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
20003     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20004     break 2
20005   fi
20006 done
20007   done
20008 IFS=$as_save_IFS
20009 
20010 fi
20011 fi
20012 CC=$ac_cv_prog_CC
20013 if test -n "$CC"; then
20014   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
20015 $as_echo "$CC" >&6; }
20016 else
20017   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20018 $as_echo "no" >&6; }
20019 fi
20020 
20021 
20022     test -n "$CC" && break
20023   done
20024 fi
20025 if test -z "$CC"; then
20026   ac_ct_CC=$CC
20027   for ac_prog in $CC
20028 do
20029   # Extract the first word of "$ac_prog", so it can be a program name with args.
20030 set dummy $ac_prog; ac_word=$2
20031 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20032 $as_echo_n "checking for $ac_word... " >&6; }
20033 if ${ac_cv_prog_ac_ct_CC+:} false; then :
20034   $as_echo_n "(cached) " >&6
20035 else
20036   if test -n "$ac_ct_CC"; then
20037   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
20038 else
20039 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20040 for as_dir in $PATH
20041 do
20042   IFS=$as_save_IFS
20043   test -z "$as_dir" && as_dir=.
20044     for ac_exec_ext in '' $ac_executable_extensions; do
20045   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20046     ac_cv_prog_ac_ct_CC="$ac_prog"
20047     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20048     break 2
20049   fi
20050 done
20051   done
20052 IFS=$as_save_IFS
20053 
20054 fi
20055 fi
20056 ac_ct_CC=$ac_cv_prog_ac_ct_CC
20057 if test -n "$ac_ct_CC"; then
20058   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
20059 $as_echo "$ac_ct_CC" >&6; }
20060 else
20061   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20062 $as_echo "no" >&6; }
20063 fi
20064 
20065 
20066   test -n "$ac_ct_CC" && break
20067 done
20068 
20069   if test "x$ac_ct_CC" = x; then
20070     CC=""
20071   else
20072     case $cross_compiling:$ac_tool_warned in
20073 yes:)
20074 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20075 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20076 ac_tool_warned=yes ;;
20077 esac
20078     CC=$ac_ct_CC
20079   fi
20080 fi
20081 
20082 
20083 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20084 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20085 as_fn_error $? "no acceptable C compiler found in \$PATH
20086 See \`config.log' for more details" "$LINENO" 5; }
20087 
20088 # Provide some information about the compiler.
20089 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
20090 set X $ac_compile
20091 ac_compiler=$2
20092 for ac_option in --version -v -V -qversion; do
20093   { { ac_try="$ac_compiler $ac_option >&5"
20094 case "(($ac_try" in
20095   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20096   *) ac_try_echo=$ac_try;;
20097 esac
20098 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20099 $as_echo "$ac_try_echo"; } >&5
20100   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
20101   ac_status=$?
20102   if test -s conftest.err; then
20103     sed '10a\
20104 ... rest of stderr output deleted ...
20105          10q' conftest.err >conftest.er1
20106     cat conftest.er1 >&5
20107   fi
20108   rm -f conftest.er1 conftest.err
20109   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20110   test $ac_status = 0; }
20111 done
20112 
20113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20114 /* end confdefs.h.  */
20115 
20116 int
20117 main ()
20118 {
20119 
20120   ;
20121   return 0;
20122 }
20123 _ACEOF
20124 ac_clean_files_save=$ac_clean_files
20125 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
20126 # Try to create an executable without -o first, disregard a.out.
20127 # It will help us diagnose broken compilers, and finding out an intuition
20128 # of exeext.
20129 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
20130 $as_echo_n "checking whether the C compiler works... " >&6; }
20131 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
20132 
20133 # The possible output files:
20134 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
20135 
20136 ac_rmfiles=
20137 for ac_file in $ac_files
20138 do
20139   case $ac_file in
20140     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
20141     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
20142   esac
20143 done
20144 rm -f $ac_rmfiles
20145 
20146 if { { ac_try="$ac_link_default"
20147 case "(($ac_try" in
20148   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20149   *) ac_try_echo=$ac_try;;
20150 esac
20151 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20152 $as_echo "$ac_try_echo"; } >&5
20153   (eval "$ac_link_default") 2>&5
20154   ac_status=$?
20155   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20156   test $ac_status = 0; }; then :
20157   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
20158 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
20159 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
20160 # so that the user can short-circuit this test for compilers unknown to
20161 # Autoconf.
20162 for ac_file in $ac_files ''
20163 do
20164   test -f "$ac_file" || continue
20165   case $ac_file in
20166     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
20167         ;;
20168     [ab].out )
20169         # We found the default executable, but exeext='' is most
20170         # certainly right.
20171         break;;
20172     *.* )
20173         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
20174         then :; else
20175            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
20176         fi
20177         # We set ac_cv_exeext here because the later test for it is not
20178         # safe: cross compilers may not add the suffix if given an `-o'
20179         # argument, so we may need to know it at that point already.
20180         # Even if this section looks crufty: it has the advantage of
20181         # actually working.
20182         break;;
20183     * )
20184         break;;
20185   esac
20186 done
20187 test "$ac_cv_exeext" = no && ac_cv_exeext=
20188 
20189 else
20190   ac_file=''
20191 fi
20192 if test -z "$ac_file"; then :
20193   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20194 $as_echo "no" >&6; }
20195 $as_echo "$as_me: failed program was:" >&5
20196 sed 's/^/| /' conftest.$ac_ext >&5
20197 
20198 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20199 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20200 as_fn_error 77 "C compiler cannot create executables
20201 See \`config.log' for more details" "$LINENO" 5; }
20202 else
20203   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20204 $as_echo "yes" >&6; }
20205 fi
20206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
20207 $as_echo_n "checking for C compiler default output file name... " >&6; }
20208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
20209 $as_echo "$ac_file" >&6; }
20210 ac_exeext=$ac_cv_exeext
20211 
20212 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
20213 ac_clean_files=$ac_clean_files_save
20214 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
20215 $as_echo_n "checking for suffix of executables... " >&6; }
20216 if { { ac_try="$ac_link"
20217 case "(($ac_try" in
20218   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20219   *) ac_try_echo=$ac_try;;
20220 esac
20221 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20222 $as_echo "$ac_try_echo"; } >&5
20223   (eval "$ac_link") 2>&5
20224   ac_status=$?
20225   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20226   test $ac_status = 0; }; then :
20227   # If both `conftest.exe' and `conftest' are `present' (well, observable)
20228 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
20229 # work properly (i.e., refer to `conftest.exe'), while it won't with
20230 # `rm'.
20231 for ac_file in conftest.exe conftest conftest.*; do
20232   test -f "$ac_file" || continue
20233   case $ac_file in
20234     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
20235     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
20236           break;;
20237     * ) break;;
20238   esac
20239 done
20240 else
20241   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20242 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20243 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
20244 See \`config.log' for more details" "$LINENO" 5; }
20245 fi
20246 rm -f conftest conftest$ac_cv_exeext
20247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
20248 $as_echo "$ac_cv_exeext" >&6; }
20249 
20250 rm -f conftest.$ac_ext
20251 EXEEXT=$ac_cv_exeext
20252 ac_exeext=$EXEEXT
20253 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20254 /* end confdefs.h.  */
20255 #include <stdio.h>
20256 int
20257 main ()
20258 {
20259 FILE *f = fopen ("conftest.out", "w");
20260  return ferror (f) || fclose (f) != 0;
20261 
20262   ;
20263   return 0;
20264 }
20265 _ACEOF
20266 ac_clean_files="$ac_clean_files conftest.out"
20267 # Check that the compiler produces executables we can run.  If not, either
20268 # the compiler is broken, or we cross compile.
20269 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
20270 $as_echo_n "checking whether we are cross compiling... " >&6; }
20271 if test "$cross_compiling" != yes; then
20272   { { ac_try="$ac_link"
20273 case "(($ac_try" in
20274   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20275   *) ac_try_echo=$ac_try;;
20276 esac
20277 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20278 $as_echo "$ac_try_echo"; } >&5
20279   (eval "$ac_link") 2>&5
20280   ac_status=$?
20281   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20282   test $ac_status = 0; }
20283   if { ac_try='./conftest$ac_cv_exeext'
20284   { { case "(($ac_try" in
20285   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20286   *) ac_try_echo=$ac_try;;
20287 esac
20288 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20289 $as_echo "$ac_try_echo"; } >&5
20290   (eval "$ac_try") 2>&5
20291   ac_status=$?
20292   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20293   test $ac_status = 0; }; }; then
20294     cross_compiling=no
20295   else
20296     if test "$cross_compiling" = maybe; then
20297         cross_compiling=yes
20298     else
20299         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20300 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20301 as_fn_error $? "cannot run C compiled programs.
20302 If you meant to cross compile, use \`--host'.
20303 See \`config.log' for more details" "$LINENO" 5; }
20304     fi
20305   fi
20306 fi
20307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
20308 $as_echo "$cross_compiling" >&6; }
20309 
20310 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
20311 ac_clean_files=$ac_clean_files_save
20312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
20313 $as_echo_n "checking for suffix of object files... " >&6; }
20314 if ${ac_cv_objext+:} false; then :
20315   $as_echo_n "(cached) " >&6
20316 else
20317   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20318 /* end confdefs.h.  */
20319 
20320 int
20321 main ()
20322 {
20323 
20324   ;
20325   return 0;
20326 }
20327 _ACEOF
20328 rm -f conftest.o conftest.obj
20329 if { { ac_try="$ac_compile"
20330 case "(($ac_try" in
20331   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20332   *) ac_try_echo=$ac_try;;
20333 esac
20334 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20335 $as_echo "$ac_try_echo"; } >&5
20336   (eval "$ac_compile") 2>&5
20337   ac_status=$?
20338   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20339   test $ac_status = 0; }; then :
20340   for ac_file in conftest.o conftest.obj conftest.*; do
20341   test -f "$ac_file" || continue;
20342   case $ac_file in
20343     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
20344     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
20345        break;;
20346   esac
20347 done
20348 else
20349   $as_echo "$as_me: failed program was:" >&5
20350 sed 's/^/| /' conftest.$ac_ext >&5
20351 
20352 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20353 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20354 as_fn_error $? "cannot compute suffix of object files: cannot compile
20355 See \`config.log' for more details" "$LINENO" 5; }
20356 fi
20357 rm -f conftest.$ac_cv_objext conftest.$ac_ext
20358 fi
20359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
20360 $as_echo "$ac_cv_objext" >&6; }
20361 OBJEXT=$ac_cv_objext
20362 ac_objext=$OBJEXT
20363 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
20364 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
20365 if ${ac_cv_c_compiler_gnu+:} false; then :
20366   $as_echo_n "(cached) " >&6
20367 else
20368   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20369 /* end confdefs.h.  */
20370 
20371 int
20372 main ()
20373 {
20374 #ifndef __GNUC__
20375        choke me
20376 #endif
20377 
20378   ;
20379   return 0;
20380 }
20381 _ACEOF
20382 if ac_fn_c_try_compile "$LINENO"; then :
20383   ac_compiler_gnu=yes
20384 else
20385   ac_compiler_gnu=no
20386 fi
20387 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20388 ac_cv_c_compiler_gnu=$ac_compiler_gnu
20389 
20390 fi
20391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
20392 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
20393 if test $ac_compiler_gnu = yes; then
20394   GCC=yes
20395 else
20396   GCC=
20397 fi
20398 ac_test_CFLAGS=${CFLAGS+set}
20399 ac_save_CFLAGS=$CFLAGS
20400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
20401 $as_echo_n "checking whether $CC accepts -g... " >&6; }
20402 if ${ac_cv_prog_cc_g+:} false; then :
20403   $as_echo_n "(cached) " >&6
20404 else
20405   ac_save_c_werror_flag=$ac_c_werror_flag
20406    ac_c_werror_flag=yes
20407    ac_cv_prog_cc_g=no
20408    CFLAGS="-g"
20409    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20410 /* end confdefs.h.  */
20411 
20412 int
20413 main ()
20414 {
20415 
20416   ;
20417   return 0;
20418 }
20419 _ACEOF
20420 if ac_fn_c_try_compile "$LINENO"; then :
20421   ac_cv_prog_cc_g=yes
20422 else
20423   CFLAGS=""
20424       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20425 /* end confdefs.h.  */
20426 
20427 int
20428 main ()
20429 {
20430 
20431   ;
20432   return 0;
20433 }
20434 _ACEOF
20435 if ac_fn_c_try_compile "$LINENO"; then :
20436 
20437 else
20438   ac_c_werror_flag=$ac_save_c_werror_flag
20439          CFLAGS="-g"
20440          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20441 /* end confdefs.h.  */
20442 
20443 int
20444 main ()
20445 {
20446 
20447   ;
20448   return 0;
20449 }
20450 _ACEOF
20451 if ac_fn_c_try_compile "$LINENO"; then :
20452   ac_cv_prog_cc_g=yes
20453 fi
20454 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20455 fi
20456 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20457 fi
20458 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20459    ac_c_werror_flag=$ac_save_c_werror_flag
20460 fi
20461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
20462 $as_echo "$ac_cv_prog_cc_g" >&6; }
20463 if test "$ac_test_CFLAGS" = set; then
20464   CFLAGS=$ac_save_CFLAGS
20465 elif test $ac_cv_prog_cc_g = yes; then
20466   if test "$GCC" = yes; then
20467     CFLAGS="-g -O2"
20468   else
20469     CFLAGS="-g"
20470   fi
20471 else
20472   if test "$GCC" = yes; then
20473     CFLAGS="-O2"
20474   else
20475     CFLAGS=
20476   fi
20477 fi
20478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
20479 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
20480 if ${ac_cv_prog_cc_c89+:} false; then :
20481   $as_echo_n "(cached) " >&6
20482 else
20483   ac_cv_prog_cc_c89=no
20484 ac_save_CC=$CC
20485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20486 /* end confdefs.h.  */
20487 #include <stdarg.h>
20488 #include <stdio.h>
20489 #include <sys/types.h>
20490 #include <sys/stat.h>
20491 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
20492 struct buf { int x; };
20493 FILE * (*rcsopen) (struct buf *, struct stat *, int);
20494 static char *e (p, i)
20495      char **p;
20496      int i;
20497 {
20498   return p[i];
20499 }
20500 static char *f (char * (*g) (char **, int), char **p, ...)
20501 {
20502   char *s;
20503   va_list v;
20504   va_start (v,p);
20505   s = g (p, va_arg (v,int));
20506   va_end (v);
20507   return s;
20508 }
20509 
20510 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
20511    function prototypes and stuff, but not '\xHH' hex character constants.
20512    These don't provoke an error unfortunately, instead are silently treated
20513    as 'x'.  The following induces an error, until -std is added to get
20514    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
20515    array size at least.  It's necessary to write '\x00'==0 to get something
20516    that's true only with -std.  */
20517 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
20518 
20519 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
20520    inside strings and character constants.  */
20521 #define FOO(x) 'x'
20522 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
20523 
20524 int test (int i, double x);
20525 struct s1 {int (*f) (int a);};
20526 struct s2 {int (*f) (double a);};
20527 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
20528 int argc;
20529 char **argv;
20530 int
20531 main ()
20532 {
20533 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
20534   ;
20535   return 0;
20536 }
20537 _ACEOF
20538 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
20539         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
20540 do
20541   CC="$ac_save_CC $ac_arg"
20542   if ac_fn_c_try_compile "$LINENO"; then :
20543   ac_cv_prog_cc_c89=$ac_arg
20544 fi
20545 rm -f core conftest.err conftest.$ac_objext
20546   test "x$ac_cv_prog_cc_c89" != "xno" && break
20547 done
20548 rm -f conftest.$ac_ext
20549 CC=$ac_save_CC
20550 
20551 fi
20552 # AC_CACHE_VAL
20553 case "x$ac_cv_prog_cc_c89" in
20554   x)
20555     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
20556 $as_echo "none needed" >&6; } ;;
20557   xno)
20558     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
20559 $as_echo "unsupported" >&6; } ;;
20560   *)
20561     CC="$CC $ac_cv_prog_cc_c89"
20562     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
20563 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
20564 esac
20565 if test "x$ac_cv_prog_cc_c89" != xno; then :
20566 
20567 fi
20568 
20569 ac_ext=cpp
20570 ac_cpp='$CXXCPP $CPPFLAGS'
20571 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20572 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20573 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20574 
20575 
20576 ### Locate C++ compiler (CXX)
20577 
20578 if test "x$CXX" != x; then
20579   COMPILER_CHECK_LIST="$CXX"
20580 elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
20581   COMPILER_CHECK_LIST="cl"
20582 elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
20583   COMPILER_CHECK_LIST="CC g++"
20584 else
20585   COMPILER_CHECK_LIST="g++ CC"
20586 fi
20587 
20588 
20589   COMPILER_NAME=C++
20590 
20591   CXX=
20592   # If TOOLS_DIR is set, check for all compiler names in there first
20593   # before checking the rest of the PATH.
20594   if test -n "$TOOLS_DIR"; then
20595     PATH_save="$PATH"
20596     PATH="$TOOLS_DIR"
20597     for ac_prog in $COMPILER_CHECK_LIST
20598 do
20599   # Extract the first word of "$ac_prog", so it can be a program name with args.
20600 set dummy $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_path_TOOLS_DIR_CXX+:} false; then :
20604   $as_echo_n "(cached) " >&6
20605 else
20606   case $TOOLS_DIR_CXX in
20607   [\\/]* | ?:[\\/]*)
20608   ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
20609   ;;
20610   *)
20611   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20612 for as_dir in $PATH
20613 do
20614   IFS=$as_save_IFS
20615   test -z "$as_dir" && as_dir=.
20616     for ac_exec_ext in '' $ac_executable_extensions; do
20617   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20618     ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
20619     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20620     break 2
20621   fi
20622 done
20623   done
20624 IFS=$as_save_IFS
20625 
20626   ;;
20627 esac
20628 fi
20629 TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
20630 if test -n "$TOOLS_DIR_CXX"; then
20631   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
20632 $as_echo "$TOOLS_DIR_CXX" >&6; }
20633 else
20634   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20635 $as_echo "no" >&6; }
20636 fi
20637 
20638 
20639   test -n "$TOOLS_DIR_CXX" && break
20640 done
20641 
20642     CXX=$TOOLS_DIR_CXX
20643     PATH="$PATH_save"
20644   fi
20645 
20646   # AC_PATH_PROGS can't be run multiple times with the same variable,
20647   # so create a new name for this run.
20648   if test "x$CXX" = x; then
20649     for ac_prog in $COMPILER_CHECK_LIST
20650 do
20651   # Extract the first word of "$ac_prog", so it can be a program name with args.
20652 set dummy $ac_prog; ac_word=$2
20653 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20654 $as_echo_n "checking for $ac_word... " >&6; }
20655 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
20656   $as_echo_n "(cached) " >&6
20657 else
20658   case $POTENTIAL_CXX in
20659   [\\/]* | ?:[\\/]*)
20660   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
20661   ;;
20662   *)
20663   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20664 for as_dir in $PATH
20665 do
20666   IFS=$as_save_IFS
20667   test -z "$as_dir" && as_dir=.
20668     for ac_exec_ext in '' $ac_executable_extensions; do
20669   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20670     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
20671     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20672     break 2
20673   fi
20674 done
20675   done
20676 IFS=$as_save_IFS
20677 
20678   ;;
20679 esac
20680 fi
20681 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
20682 if test -n "$POTENTIAL_CXX"; then
20683   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
20684 $as_echo "$POTENTIAL_CXX" >&6; }
20685 else
20686   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20687 $as_echo "no" >&6; }
20688 fi
20689 
20690 
20691   test -n "$POTENTIAL_CXX" && break
20692 done
20693 
20694     CXX=$POTENTIAL_CXX
20695   fi
20696 
20697   if test "x$CXX" = x; then
20698 
20699     # Print a helpful message on how to acquire the necessary build dependency.
20700     # devkit is the help tag: freetyp2, cups, pulse, alsa etc
20701     MISSING_DEPENDENCY=devkit
20702     PKGHANDLER_COMMAND=
20703 
20704     case $PKGHANDLER in
20705         apt-get)
20706                 apt_help     $MISSING_DEPENDENCY ;;
20707     yum)
20708                 yum_help     $MISSING_DEPENDENCY ;;
20709         port)
20710                 port_help    $MISSING_DEPENDENCY ;;
20711         pkgutil)
20712                 pkgutil_help $MISSING_DEPENDENCY ;;
20713         pkgadd)
20714                 pkgadd_help  $MISSING_DEPENDENCY ;;
20715     * )
20716       break ;;
20717     esac
20718 
20719     if test "x$PKGHANDLER_COMMAND" != x; then
20720         HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
20721     fi
20722 
20723       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
20724   fi
20725 
20726   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20727 
20728   # First separate the path from the arguments. This will split at the first
20729   # space.
20730   complete="$CXX"
20731   path="${complete%% *}"
20732   tmp="$complete EOL"
20733   arguments="${tmp#* }"
20734 
20735   # Input might be given as Windows format, start by converting to
20736   # unix format.
20737   new_path=`$CYGPATH -u "$path"`
20738 
20739   # Now try to locate executable using which
20740   new_path=`$WHICH "$new_path" 2> /dev/null`
20741   # bat and cmd files are not always considered executable in cygwin causing which
20742   # to not find them
20743   if test "x$new_path" = x \
20744            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20745            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20746     new_path=`$CYGPATH -u "$path"`
20747   fi
20748   if test "x$new_path" = x; then
20749     # Oops. Which didn't find the executable.
20750     # The splitting of arguments from the executable at a space might have been incorrect,
20751     # since paths with space are more likely in Windows. Give it another try with the whole
20752     # argument.
20753     path="$complete"
20754     arguments="EOL"
20755     new_path=`$CYGPATH -u "$path"`
20756     new_path=`$WHICH "$new_path" 2> /dev/null`
20757     # bat and cmd files are not always considered executable in cygwin causing which
20758     # to not find them
20759     if test "x$new_path" = x \
20760              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20761              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20762       new_path=`$CYGPATH -u "$path"`
20763     fi
20764     if test "x$new_path" = x; then
20765       # It's still not found. Now this is an unrecoverable error.
20766       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20767 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20768       has_space=`$ECHO "$complete" | $GREP " "`
20769       if test "x$has_space" != x; then
20770         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20771 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20772       fi
20773       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20774     fi
20775   fi
20776 
20777   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20778   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20779   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20780   # "foo.exe" is OK but "foo" is an error.
20781   #
20782   # This test is therefore slightly more accurate than "test -f" to check for file precense.
20783   # It is also a way to make sure we got the proper file name for the real test later on.
20784   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20785   if test "x$test_shortpath" = x; then
20786     # Short path failed, file does not exist as specified.
20787     # Try adding .exe or .cmd
20788     if test -f "${new_path}.exe"; then
20789        input_to_shortpath="${new_path}.exe"
20790     elif test -f "${new_path}.cmd"; then
20791        input_to_shortpath="${new_path}.cmd"
20792     else
20793       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
20794 $as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
20795       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20796 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20797       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20798     fi
20799   else
20800     input_to_shortpath="$new_path"
20801   fi
20802 
20803   # Call helper function which possibly converts this using DOS-style short mode.
20804   # If so, the updated path is stored in $new_path.
20805   new_path="$input_to_shortpath"
20806 
20807   input_path="$input_to_shortpath"
20808   # Check if we need to convert this using DOS-style short mode. If the path
20809   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20810   # take no chances and rewrite it.
20811   # Note: m4 eats our [], so we need to use [ and ] instead.
20812   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20813   if test "x$has_forbidden_chars" != x; then
20814     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20815     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20816     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20817     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20818       # Going to short mode and back again did indeed matter. Since short mode is
20819       # case insensitive, let's make it lowercase to improve readability.
20820       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20821       # Now convert it back to Unix-stile (cygpath)
20822       input_path=`$CYGPATH -u "$shortmode_path"`
20823       new_path="$input_path"
20824     fi
20825   fi
20826 
20827   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20828   if test "x$test_cygdrive_prefix" = x; then
20829     # As a simple fix, exclude /usr/bin since it's not a real path.
20830     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20831       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20832       # a path prefixed by /cygdrive for fixpath to work.
20833       new_path="$CYGWIN_ROOT_PATH$input_path"
20834     fi
20835   fi
20836 
20837   # remove trailing .exe if any
20838   new_path="${new_path/%.exe/}"
20839 
20840   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20841 
20842   # First separate the path from the arguments. This will split at the first
20843   # space.
20844   complete="$CXX"
20845   path="${complete%% *}"
20846   tmp="$complete EOL"
20847   arguments="${tmp#* }"
20848 
20849   # Input might be given as Windows format, start by converting to
20850   # unix format.
20851   new_path="$path"
20852 
20853   windows_path="$new_path"
20854   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20855     unix_path=`$CYGPATH -u "$windows_path"`
20856     new_path="$unix_path"
20857   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20858     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20859     new_path="$unix_path"
20860   fi
20861 
20862 
20863   # Now try to locate executable using which
20864   new_path=`$WHICH "$new_path" 2> /dev/null`
20865 
20866   if test "x$new_path" = x; then
20867     # Oops. Which didn't find the executable.
20868     # The splitting of arguments from the executable at a space might have been incorrect,
20869     # since paths with space are more likely in Windows. Give it another try with the whole
20870     # argument.
20871     path="$complete"
20872     arguments="EOL"
20873     new_path="$path"
20874 
20875   windows_path="$new_path"
20876   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20877     unix_path=`$CYGPATH -u "$windows_path"`
20878     new_path="$unix_path"
20879   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20880     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20881     new_path="$unix_path"
20882   fi
20883 
20884 
20885     new_path=`$WHICH "$new_path" 2> /dev/null`
20886 
20887     if test "x$new_path" = x; then
20888       # It's still not found. Now this is an unrecoverable error.
20889       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20890 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20891       has_space=`$ECHO "$complete" | $GREP " "`
20892       if test "x$has_space" != x; then
20893         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20894 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20895       fi
20896       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20897     fi
20898   fi
20899 
20900   # Now new_path has a complete unix path to the binary
20901   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20902     # Keep paths in /bin as-is, but remove trailing .exe if any
20903     new_path="${new_path/%.exe/}"
20904     # Do not save /bin paths to all_fixpath_prefixes!
20905   else
20906     # Not in mixed or Windows style, start by that.
20907     new_path=`cmd //c echo $new_path`
20908 
20909   input_path="$new_path"
20910   # Check if we need to convert this using DOS-style short mode. If the path
20911   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20912   # take no chances and rewrite it.
20913   # Note: m4 eats our [], so we need to use [ and ] instead.
20914   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20915   if test "x$has_forbidden_chars" != x; then
20916     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20917     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20918   fi
20919 
20920     # Output is in $new_path
20921 
20922   windows_path="$new_path"
20923   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20924     unix_path=`$CYGPATH -u "$windows_path"`
20925     new_path="$unix_path"
20926   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20927     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20928     new_path="$unix_path"
20929   fi
20930 
20931     # remove trailing .exe if any
20932     new_path="${new_path/%.exe/}"
20933 
20934     # Save the first 10 bytes of this path to the storage, so fixpath can work.
20935     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20936   fi
20937 
20938   else
20939     # We're on a posix platform. Hooray! :)
20940     # First separate the path from the arguments. This will split at the first
20941     # space.
20942     complete="$CXX"
20943     path="${complete%% *}"
20944     tmp="$complete EOL"
20945     arguments="${tmp#* }"
20946 
20947     # Cannot rely on the command "which" here since it doesn't always work.
20948     is_absolute_path=`$ECHO "$path" | $GREP ^/`
20949     if test -z "$is_absolute_path"; then
20950       # Path to executable is not absolute. Find it.
20951       IFS_save="$IFS"
20952       IFS=:
20953       for p in $PATH; do
20954         if test -f "$p/$path" && test -x "$p/$path"; then
20955           new_path="$p/$path"
20956           break
20957         fi
20958       done
20959       IFS="$IFS_save"
20960     else
20961       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
20962 $as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
20963       new_path="$path"
20964     fi
20965 
20966     if test "x$new_path" = x; then
20967         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20968 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20969         has_space=`$ECHO "$complete" | $GREP " "`
20970         if test "x$has_space" != x; then
20971           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20972 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20973         fi
20974         as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20975       fi
20976   fi
20977 
20978       # Now join together the path and the arguments once again
20979       if test "x$arguments" != xEOL; then
20980         new_complete="$new_path ${arguments% *}"
20981       else
20982         new_complete="$new_path"
20983       fi
20984 
20985   if test "x$complete" != "x$new_complete"; then
20986       CXX="$new_complete"
20987       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
20988 $as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
20989     fi
20990 
20991   { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
20992 $as_echo_n "checking resolved symbolic links for CXX... " >&6; }
20993   TEST_COMPILER="$CXX"
20994 
20995     if test "x$OPENJDK_BUILD_OS" != xwindows; then
20996         # Follow a chain of symbolic links. Use readlink
20997         # where it exists, else fall back to horribly
20998         # complicated shell code.
20999         if test "x$READLINK_TESTED" != yes; then
21000             # On MacOSX there is a readlink tool with a different
21001             # purpose than the GNU readlink tool. Check the found readlink.
21002             ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21003             if test "x$ISGNU" = x; then
21004                  # A readlink that we do not know how to use.
21005                  # Are there other non-GNU readlinks out there?
21006                  READLINK_TESTED=yes
21007                  READLINK=
21008             fi
21009         fi
21010 
21011         if test "x$READLINK" != x; then
21012             TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
21013         else
21014             # Save the current directory for restoring afterwards
21015             STARTDIR=$PWD
21016             COUNTER=0
21017             sym_link_dir=`$DIRNAME $TEST_COMPILER`
21018             sym_link_file=`$BASENAME $TEST_COMPILER`
21019             cd $sym_link_dir
21020             # Use -P flag to resolve symlinks in directories.
21021             cd `$THEPWDCMD -P`
21022             sym_link_dir=`$THEPWDCMD -P`
21023             # Resolve file symlinks
21024             while test $COUNTER -lt 20; do
21025                 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21026                 if test "x$ISLINK" == x; then
21027                     # This is not a symbolic link! We are done!
21028                     break
21029                 fi
21030                 # Again resolve directory symlinks since the target of the just found
21031                 # link could be in a different directory
21032                 cd `$DIRNAME $ISLINK`
21033                 sym_link_dir=`$THEPWDCMD -P`
21034                 sym_link_file=`$BASENAME $ISLINK`
21035                 let COUNTER=COUNTER+1
21036             done
21037             cd $STARTDIR
21038             TEST_COMPILER=$sym_link_dir/$sym_link_file
21039         fi
21040     fi
21041 
21042   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
21043 $as_echo "$TEST_COMPILER" >&6; }
21044   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
21045 $as_echo_n "checking if CXX is disguised ccache... " >&6; }
21046 
21047   COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
21048   if test "x$COMPILER_BASENAME" = "xccache"; then
21049     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
21050 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
21051     # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
21052     # We want to control ccache invocation ourselves, so ignore this cc and try
21053     # searching again.
21054 
21055     # Remove the path to the fake ccache cc from the PATH
21056     RETRY_COMPILER_SAVED_PATH="$PATH"
21057     COMPILER_DIRNAME=`$DIRNAME $CXX`
21058     PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
21059 
21060     # Try again looking for our compiler
21061     if test -n "$ac_tool_prefix"; then
21062   for ac_prog in $COMPILER_CHECK_LIST
21063   do
21064     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21065 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21067 $as_echo_n "checking for $ac_word... " >&6; }
21068 if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
21069   $as_echo_n "(cached) " >&6
21070 else
21071   if test -n "$PROPER_COMPILER_CXX"; then
21072   ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
21073 else
21074 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21075 for as_dir in $PATH
21076 do
21077   IFS=$as_save_IFS
21078   test -z "$as_dir" && as_dir=.
21079     for ac_exec_ext in '' $ac_executable_extensions; do
21080   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21081     ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
21082     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21083     break 2
21084   fi
21085 done
21086   done
21087 IFS=$as_save_IFS
21088 
21089 fi
21090 fi
21091 PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
21092 if test -n "$PROPER_COMPILER_CXX"; then
21093   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21094 $as_echo "$PROPER_COMPILER_CXX" >&6; }
21095 else
21096   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21097 $as_echo "no" >&6; }
21098 fi
21099 
21100 
21101     test -n "$PROPER_COMPILER_CXX" && break
21102   done
21103 fi
21104 if test -z "$PROPER_COMPILER_CXX"; then
21105   ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
21106   for ac_prog in $COMPILER_CHECK_LIST
21107 do
21108   # Extract the first word of "$ac_prog", so it can be a program name with args.
21109 set dummy $ac_prog; ac_word=$2
21110 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21111 $as_echo_n "checking for $ac_word... " >&6; }
21112 if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
21113   $as_echo_n "(cached) " >&6
21114 else
21115   if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
21116   ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
21117 else
21118 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21119 for as_dir in $PATH
21120 do
21121   IFS=$as_save_IFS
21122   test -z "$as_dir" && as_dir=.
21123     for ac_exec_ext in '' $ac_executable_extensions; do
21124   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21125     ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
21126     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21127     break 2
21128   fi
21129 done
21130   done
21131 IFS=$as_save_IFS
21132 
21133 fi
21134 fi
21135 ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
21136 if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
21137   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
21138 $as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
21139 else
21140   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21141 $as_echo "no" >&6; }
21142 fi
21143 
21144 
21145   test -n "$ac_ct_PROPER_COMPILER_CXX" && break
21146 done
21147 
21148   if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
21149     PROPER_COMPILER_CXX=""
21150   else
21151     case $cross_compiling:$ac_tool_warned in
21152 yes:)
21153 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21154 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21155 ac_tool_warned=yes ;;
21156 esac
21157     PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
21158   fi
21159 fi
21160 
21161 
21162   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21163 
21164   # First separate the path from the arguments. This will split at the first
21165   # space.
21166   complete="$PROPER_COMPILER_CXX"
21167   path="${complete%% *}"
21168   tmp="$complete EOL"
21169   arguments="${tmp#* }"
21170 
21171   # Input might be given as Windows format, start by converting to
21172   # unix format.
21173   new_path=`$CYGPATH -u "$path"`
21174 
21175   # Now try to locate executable using which
21176   new_path=`$WHICH "$new_path" 2> /dev/null`
21177   # bat and cmd files are not always considered executable in cygwin causing which
21178   # to not find them
21179   if test "x$new_path" = x \
21180            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21181            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21182     new_path=`$CYGPATH -u "$path"`
21183   fi
21184   if test "x$new_path" = x; then
21185     # Oops. Which didn't find the executable.
21186     # The splitting of arguments from the executable at a space might have been incorrect,
21187     # since paths with space are more likely in Windows. Give it another try with the whole
21188     # argument.
21189     path="$complete"
21190     arguments="EOL"
21191     new_path=`$CYGPATH -u "$path"`
21192     new_path=`$WHICH "$new_path" 2> /dev/null`
21193     # bat and cmd files are not always considered executable in cygwin causing which
21194     # to not find them
21195     if test "x$new_path" = x \
21196              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21197              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21198       new_path=`$CYGPATH -u "$path"`
21199     fi
21200     if test "x$new_path" = x; then
21201       # It's still not found. Now this is an unrecoverable error.
21202       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21203 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21204       has_space=`$ECHO "$complete" | $GREP " "`
21205       if test "x$has_space" != x; then
21206         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21207 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21208       fi
21209       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21210     fi
21211   fi
21212 
21213   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21214   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21215   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21216   # "foo.exe" is OK but "foo" is an error.
21217   #
21218   # This test is therefore slightly more accurate than "test -f" to check for file precense.
21219   # It is also a way to make sure we got the proper file name for the real test later on.
21220   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21221   if test "x$test_shortpath" = x; then
21222     # Short path failed, file does not exist as specified.
21223     # Try adding .exe or .cmd
21224     if test -f "${new_path}.exe"; then
21225        input_to_shortpath="${new_path}.exe"
21226     elif test -f "${new_path}.cmd"; then
21227        input_to_shortpath="${new_path}.cmd"
21228     else
21229       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
21230 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
21231       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21232 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21233       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21234     fi
21235   else
21236     input_to_shortpath="$new_path"
21237   fi
21238 
21239   # Call helper function which possibly converts this using DOS-style short mode.
21240   # If so, the updated path is stored in $new_path.
21241   new_path="$input_to_shortpath"
21242 
21243   input_path="$input_to_shortpath"
21244   # Check if we need to convert this using DOS-style short mode. If the path
21245   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21246   # take no chances and rewrite it.
21247   # Note: m4 eats our [], so we need to use [ and ] instead.
21248   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21249   if test "x$has_forbidden_chars" != x; then
21250     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21251     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21252     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21253     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21254       # Going to short mode and back again did indeed matter. Since short mode is
21255       # case insensitive, let's make it lowercase to improve readability.
21256       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21257       # Now convert it back to Unix-stile (cygpath)
21258       input_path=`$CYGPATH -u "$shortmode_path"`
21259       new_path="$input_path"
21260     fi
21261   fi
21262 
21263   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21264   if test "x$test_cygdrive_prefix" = x; then
21265     # As a simple fix, exclude /usr/bin since it's not a real path.
21266     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21267       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21268       # a path prefixed by /cygdrive for fixpath to work.
21269       new_path="$CYGWIN_ROOT_PATH$input_path"
21270     fi
21271   fi
21272 
21273   # remove trailing .exe if any
21274   new_path="${new_path/%.exe/}"
21275 
21276   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21277 
21278   # First separate the path from the arguments. This will split at the first
21279   # space.
21280   complete="$PROPER_COMPILER_CXX"
21281   path="${complete%% *}"
21282   tmp="$complete EOL"
21283   arguments="${tmp#* }"
21284 
21285   # Input might be given as Windows format, start by converting to
21286   # unix format.
21287   new_path="$path"
21288 
21289   windows_path="$new_path"
21290   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21291     unix_path=`$CYGPATH -u "$windows_path"`
21292     new_path="$unix_path"
21293   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21294     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21295     new_path="$unix_path"
21296   fi
21297 
21298 
21299   # Now try to locate executable using which
21300   new_path=`$WHICH "$new_path" 2> /dev/null`
21301 
21302   if test "x$new_path" = x; then
21303     # Oops. Which didn't find the executable.
21304     # The splitting of arguments from the executable at a space might have been incorrect,
21305     # since paths with space are more likely in Windows. Give it another try with the whole
21306     # argument.
21307     path="$complete"
21308     arguments="EOL"
21309     new_path="$path"
21310 
21311   windows_path="$new_path"
21312   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21313     unix_path=`$CYGPATH -u "$windows_path"`
21314     new_path="$unix_path"
21315   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21316     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21317     new_path="$unix_path"
21318   fi
21319 
21320 
21321     new_path=`$WHICH "$new_path" 2> /dev/null`
21322 
21323     if test "x$new_path" = x; then
21324       # It's still not found. Now this is an unrecoverable error.
21325       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21326 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21327       has_space=`$ECHO "$complete" | $GREP " "`
21328       if test "x$has_space" != x; then
21329         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21330 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21331       fi
21332       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21333     fi
21334   fi
21335 
21336   # Now new_path has a complete unix path to the binary
21337   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21338     # Keep paths in /bin as-is, but remove trailing .exe if any
21339     new_path="${new_path/%.exe/}"
21340     # Do not save /bin paths to all_fixpath_prefixes!
21341   else
21342     # Not in mixed or Windows style, start by that.
21343     new_path=`cmd //c echo $new_path`
21344 
21345   input_path="$new_path"
21346   # Check if we need to convert this using DOS-style short mode. If the path
21347   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21348   # take no chances and rewrite it.
21349   # Note: m4 eats our [], so we need to use [ and ] instead.
21350   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21351   if test "x$has_forbidden_chars" != x; then
21352     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21353     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21354   fi
21355 
21356     # Output is in $new_path
21357 
21358   windows_path="$new_path"
21359   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21360     unix_path=`$CYGPATH -u "$windows_path"`
21361     new_path="$unix_path"
21362   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21363     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21364     new_path="$unix_path"
21365   fi
21366 
21367     # remove trailing .exe if any
21368     new_path="${new_path/%.exe/}"
21369 
21370     # Save the first 10 bytes of this path to the storage, so fixpath can work.
21371     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21372   fi
21373 
21374   else
21375     # We're on a posix platform. Hooray! :)
21376     # First separate the path from the arguments. This will split at the first
21377     # space.
21378     complete="$PROPER_COMPILER_CXX"
21379     path="${complete%% *}"
21380     tmp="$complete EOL"
21381     arguments="${tmp#* }"
21382 
21383     # Cannot rely on the command "which" here since it doesn't always work.
21384     is_absolute_path=`$ECHO "$path" | $GREP ^/`
21385     if test -z "$is_absolute_path"; then
21386       # Path to executable is not absolute. Find it.
21387       IFS_save="$IFS"
21388       IFS=:
21389       for p in $PATH; do
21390         if test -f "$p/$path" && test -x "$p/$path"; then
21391           new_path="$p/$path"
21392           break
21393         fi
21394       done
21395       IFS="$IFS_save"
21396     else
21397       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
21398 $as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
21399       new_path="$path"
21400     fi
21401 
21402     if test "x$new_path" = x; then
21403         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21404 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21405         has_space=`$ECHO "$complete" | $GREP " "`
21406         if test "x$has_space" != x; then
21407           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21408 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21409         fi
21410         as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21411       fi
21412   fi
21413 
21414       # Now join together the path and the arguments once again
21415       if test "x$arguments" != xEOL; then
21416         new_complete="$new_path ${arguments% *}"
21417       else
21418         new_complete="$new_path"
21419       fi
21420 
21421   if test "x$complete" != "x$new_complete"; then
21422       PROPER_COMPILER_CXX="$new_complete"
21423       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
21424 $as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
21425     fi
21426 
21427     PATH="$RETRY_COMPILER_SAVED_PATH"
21428 
21429     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
21430 $as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
21431 
21432     if test "x$OPENJDK_BUILD_OS" != xwindows; then
21433         # Follow a chain of symbolic links. Use readlink
21434         # where it exists, else fall back to horribly
21435         # complicated shell code.
21436         if test "x$READLINK_TESTED" != yes; then
21437             # On MacOSX there is a readlink tool with a different
21438             # purpose than the GNU readlink tool. Check the found readlink.
21439             ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21440             if test "x$ISGNU" = x; then
21441                  # A readlink that we do not know how to use.
21442                  # Are there other non-GNU readlinks out there?
21443                  READLINK_TESTED=yes
21444                  READLINK=
21445             fi
21446         fi
21447 
21448         if test "x$READLINK" != x; then
21449             PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
21450         else
21451             # Save the current directory for restoring afterwards
21452             STARTDIR=$PWD
21453             COUNTER=0
21454             sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
21455             sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
21456             cd $sym_link_dir
21457             # Use -P flag to resolve symlinks in directories.
21458             cd `$THEPWDCMD -P`
21459             sym_link_dir=`$THEPWDCMD -P`
21460             # Resolve file symlinks
21461             while test $COUNTER -lt 20; do
21462                 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21463                 if test "x$ISLINK" == x; then
21464                     # This is not a symbolic link! We are done!
21465                     break
21466                 fi
21467                 # Again resolve directory symlinks since the target of the just found
21468                 # link could be in a different directory
21469                 cd `$DIRNAME $ISLINK`
21470                 sym_link_dir=`$THEPWDCMD -P`
21471                 sym_link_file=`$BASENAME $ISLINK`
21472                 let COUNTER=COUNTER+1
21473             done
21474             cd $STARTDIR
21475             PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
21476         fi
21477     fi
21478 
21479     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21480 $as_echo "$PROPER_COMPILER_CXX" >&6; }
21481     CXX="$PROPER_COMPILER_CXX"
21482   else
21483     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
21484 $as_echo "no, keeping CXX" >&6; }
21485     CXX="$TEST_COMPILER"
21486   fi
21487 
21488   COMPILER=$CXX
21489   COMPILER_NAME=$COMPILER_NAME
21490 
21491   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
21492     # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
21493     COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
21494     $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
21495     if test $? -ne 0; then
21496       GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21497 
21498       { $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
21499 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
21500       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
21501 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
21502       as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21503     else
21504       COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
21505       COMPILER_VENDOR="Sun Studio"
21506     fi
21507   elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
21508     # First line typically looks something like:
21509     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
21510     COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
21511     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
21512     COMPILER_VENDOR="Microsoft CL.EXE"
21513     COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
21514     if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
21515       if test "x$COMPILER_CPU_TEST" != "x80x86"; then
21516         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
21517       fi
21518     elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
21519       if test "x$COMPILER_CPU_TEST" != "xx64"; then
21520         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
21521       fi
21522     fi
21523   else
21524     COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21525     # Check that this is likely to be GCC.
21526     $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
21527     if test $? -ne 0; then
21528       { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
21529 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
21530       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
21531 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
21532       as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21533     fi
21534 
21535     # First line typically looks something like:
21536     # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
21537     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
21538     COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
21539   fi
21540   # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
21541   CXX_VERSION="$COMPILER_VERSION"
21542   # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
21543   CXX_VENDOR="$COMPILER_VENDOR"
21544 
21545   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
21546 $as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
21547 
21548 
21549 # Now that we have resolved CXX ourself, let autoconf have its go at it
21550 ac_ext=cpp
21551 ac_cpp='$CXXCPP $CPPFLAGS'
21552 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21553 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21554 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21555 if test -z "$CXX"; then
21556   if test -n "$CCC"; then
21557     CXX=$CCC
21558   else
21559     if test -n "$ac_tool_prefix"; then
21560   for ac_prog in $CXX
21561   do
21562     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21563 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21564 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21565 $as_echo_n "checking for $ac_word... " >&6; }
21566 if ${ac_cv_prog_CXX+:} false; then :
21567   $as_echo_n "(cached) " >&6
21568 else
21569   if test -n "$CXX"; then
21570   ac_cv_prog_CXX="$CXX" # Let the user override the test.
21571 else
21572 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21573 for as_dir in $PATH
21574 do
21575   IFS=$as_save_IFS
21576   test -z "$as_dir" && as_dir=.
21577     for ac_exec_ext in '' $ac_executable_extensions; do
21578   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21579     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
21580     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21581     break 2
21582   fi
21583 done
21584   done
21585 IFS=$as_save_IFS
21586 
21587 fi
21588 fi
21589 CXX=$ac_cv_prog_CXX
21590 if test -n "$CXX"; then
21591   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
21592 $as_echo "$CXX" >&6; }
21593 else
21594   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21595 $as_echo "no" >&6; }
21596 fi
21597 
21598 
21599     test -n "$CXX" && break
21600   done
21601 fi
21602 if test -z "$CXX"; then
21603   ac_ct_CXX=$CXX
21604   for ac_prog in $CXX
21605 do
21606   # Extract the first word of "$ac_prog", so it can be a program name with args.
21607 set dummy $ac_prog; ac_word=$2
21608 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21609 $as_echo_n "checking for $ac_word... " >&6; }
21610 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
21611   $as_echo_n "(cached) " >&6
21612 else
21613   if test -n "$ac_ct_CXX"; then
21614   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
21615 else
21616 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21617 for as_dir in $PATH
21618 do
21619   IFS=$as_save_IFS
21620   test -z "$as_dir" && as_dir=.
21621     for ac_exec_ext in '' $ac_executable_extensions; do
21622   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21623     ac_cv_prog_ac_ct_CXX="$ac_prog"
21624     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21625     break 2
21626   fi
21627 done
21628   done
21629 IFS=$as_save_IFS
21630 
21631 fi
21632 fi
21633 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
21634 if test -n "$ac_ct_CXX"; then
21635   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
21636 $as_echo "$ac_ct_CXX" >&6; }
21637 else
21638   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21639 $as_echo "no" >&6; }
21640 fi
21641 
21642 
21643   test -n "$ac_ct_CXX" && break
21644 done
21645 
21646   if test "x$ac_ct_CXX" = x; then
21647     CXX="g++"
21648   else
21649     case $cross_compiling:$ac_tool_warned in
21650 yes:)
21651 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21652 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21653 ac_tool_warned=yes ;;
21654 esac
21655     CXX=$ac_ct_CXX
21656   fi
21657 fi
21658 
21659   fi
21660 fi
21661 # Provide some information about the compiler.
21662 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
21663 set X $ac_compile
21664 ac_compiler=$2
21665 for ac_option in --version -v -V -qversion; do
21666   { { ac_try="$ac_compiler $ac_option >&5"
21667 case "(($ac_try" in
21668   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21669   *) ac_try_echo=$ac_try;;
21670 esac
21671 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21672 $as_echo "$ac_try_echo"; } >&5
21673   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21674   ac_status=$?
21675   if test -s conftest.err; then
21676     sed '10a\
21677 ... rest of stderr output deleted ...
21678          10q' conftest.err >conftest.er1
21679     cat conftest.er1 >&5
21680   fi
21681   rm -f conftest.er1 conftest.err
21682   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21683   test $ac_status = 0; }
21684 done
21685 
21686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
21687 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
21688 if ${ac_cv_cxx_compiler_gnu+:} false; then :
21689   $as_echo_n "(cached) " >&6
21690 else
21691   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21692 /* end confdefs.h.  */
21693 
21694 int
21695 main ()
21696 {
21697 #ifndef __GNUC__
21698        choke me
21699 #endif
21700 
21701   ;
21702   return 0;
21703 }
21704 _ACEOF
21705 if ac_fn_cxx_try_compile "$LINENO"; then :
21706   ac_compiler_gnu=yes
21707 else
21708   ac_compiler_gnu=no
21709 fi
21710 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21711 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
21712 
21713 fi
21714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
21715 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
21716 if test $ac_compiler_gnu = yes; then
21717   GXX=yes
21718 else
21719   GXX=
21720 fi
21721 ac_test_CXXFLAGS=${CXXFLAGS+set}
21722 ac_save_CXXFLAGS=$CXXFLAGS
21723 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
21724 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
21725 if ${ac_cv_prog_cxx_g+:} false; then :
21726   $as_echo_n "(cached) " >&6
21727 else
21728   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
21729    ac_cxx_werror_flag=yes
21730    ac_cv_prog_cxx_g=no
21731    CXXFLAGS="-g"
21732    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21733 /* end confdefs.h.  */
21734 
21735 int
21736 main ()
21737 {
21738 
21739   ;
21740   return 0;
21741 }
21742 _ACEOF
21743 if ac_fn_cxx_try_compile "$LINENO"; then :
21744   ac_cv_prog_cxx_g=yes
21745 else
21746   CXXFLAGS=""
21747       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21748 /* end confdefs.h.  */
21749 
21750 int
21751 main ()
21752 {
21753 
21754   ;
21755   return 0;
21756 }
21757 _ACEOF
21758 if ac_fn_cxx_try_compile "$LINENO"; then :
21759 
21760 else
21761   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21762          CXXFLAGS="-g"
21763          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21764 /* end confdefs.h.  */
21765 
21766 int
21767 main ()
21768 {
21769 
21770   ;
21771   return 0;
21772 }
21773 _ACEOF
21774 if ac_fn_cxx_try_compile "$LINENO"; then :
21775   ac_cv_prog_cxx_g=yes
21776 fi
21777 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21778 fi
21779 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21780 fi
21781 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21782    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21783 fi
21784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
21785 $as_echo "$ac_cv_prog_cxx_g" >&6; }
21786 if test "$ac_test_CXXFLAGS" = set; then
21787   CXXFLAGS=$ac_save_CXXFLAGS
21788 elif test $ac_cv_prog_cxx_g = yes; then
21789   if test "$GXX" = yes; then
21790     CXXFLAGS="-g -O2"
21791   else
21792     CXXFLAGS="-g"
21793   fi
21794 else
21795   if test "$GXX" = yes; then
21796     CXXFLAGS="-O2"
21797   else
21798     CXXFLAGS=
21799   fi
21800 fi
21801 ac_ext=cpp
21802 ac_cpp='$CXXCPP $CPPFLAGS'
21803 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21804 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21805 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21806 
21807 
21808 ### Locate other tools
21809 
21810 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21811     ac_ext=m
21812 ac_cpp='$OBJCPP $CPPFLAGS'
21813 ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21814 ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21815 ac_compiler_gnu=$ac_cv_objc_compiler_gnu
21816 if test -n "$ac_tool_prefix"; then
21817   for ac_prog in gcc objcc objc cc CC
21818   do
21819     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21820 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21822 $as_echo_n "checking for $ac_word... " >&6; }
21823 if ${ac_cv_prog_OBJC+:} false; then :
21824   $as_echo_n "(cached) " >&6
21825 else
21826   if test -n "$OBJC"; then
21827   ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
21828 else
21829 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21830 for as_dir in $PATH
21831 do
21832   IFS=$as_save_IFS
21833   test -z "$as_dir" && as_dir=.
21834     for ac_exec_ext in '' $ac_executable_extensions; do
21835   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21836     ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
21837     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21838     break 2
21839   fi
21840 done
21841   done
21842 IFS=$as_save_IFS
21843 
21844 fi
21845 fi
21846 OBJC=$ac_cv_prog_OBJC
21847 if test -n "$OBJC"; then
21848   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
21849 $as_echo "$OBJC" >&6; }
21850 else
21851   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21852 $as_echo "no" >&6; }
21853 fi
21854 
21855 
21856     test -n "$OBJC" && break
21857   done
21858 fi
21859 if test -z "$OBJC"; then
21860   ac_ct_OBJC=$OBJC
21861   for ac_prog in gcc objcc objc cc CC
21862 do
21863   # Extract the first word of "$ac_prog", so it can be a program name with args.
21864 set dummy $ac_prog; ac_word=$2
21865 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21866 $as_echo_n "checking for $ac_word... " >&6; }
21867 if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
21868   $as_echo_n "(cached) " >&6
21869 else
21870   if test -n "$ac_ct_OBJC"; then
21871   ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
21872 else
21873 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21874 for as_dir in $PATH
21875 do
21876   IFS=$as_save_IFS
21877   test -z "$as_dir" && as_dir=.
21878     for ac_exec_ext in '' $ac_executable_extensions; do
21879   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21880     ac_cv_prog_ac_ct_OBJC="$ac_prog"
21881     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21882     break 2
21883   fi
21884 done
21885   done
21886 IFS=$as_save_IFS
21887 
21888 fi
21889 fi
21890 ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
21891 if test -n "$ac_ct_OBJC"; then
21892   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
21893 $as_echo "$ac_ct_OBJC" >&6; }
21894 else
21895   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21896 $as_echo "no" >&6; }
21897 fi
21898 
21899 
21900   test -n "$ac_ct_OBJC" && break
21901 done
21902 
21903   if test "x$ac_ct_OBJC" = x; then
21904     OBJC="gcc"
21905   else
21906     case $cross_compiling:$ac_tool_warned in
21907 yes:)
21908 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21909 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21910 ac_tool_warned=yes ;;
21911 esac
21912     OBJC=$ac_ct_OBJC
21913   fi
21914 fi
21915 
21916 # Provide some information about the compiler.
21917 $as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
21918 set X $ac_compile
21919 ac_compiler=$2
21920 for ac_option in --version -v -V -qversion; do
21921   { { ac_try="$ac_compiler $ac_option >&5"
21922 case "(($ac_try" in
21923   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21924   *) ac_try_echo=$ac_try;;
21925 esac
21926 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21927 $as_echo "$ac_try_echo"; } >&5
21928   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21929   ac_status=$?
21930   if test -s conftest.err; then
21931     sed '10a\
21932 ... rest of stderr output deleted ...
21933          10q' conftest.err >conftest.er1
21934     cat conftest.er1 >&5
21935   fi
21936   rm -f conftest.er1 conftest.err
21937   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21938   test $ac_status = 0; }
21939 done
21940 
21941 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
21942 $as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
21943 if ${ac_cv_objc_compiler_gnu+:} false; then :
21944   $as_echo_n "(cached) " >&6
21945 else
21946   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21947 /* end confdefs.h.  */
21948 
21949 int
21950 main ()
21951 {
21952 #ifndef __GNUC__
21953        choke me
21954 #endif
21955 
21956   ;
21957   return 0;
21958 }
21959 _ACEOF
21960 if ac_fn_objc_try_compile "$LINENO"; then :
21961   ac_compiler_gnu=yes
21962 else
21963   ac_compiler_gnu=no
21964 fi
21965 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21966 ac_cv_objc_compiler_gnu=$ac_compiler_gnu
21967 
21968 fi
21969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
21970 $as_echo "$ac_cv_objc_compiler_gnu" >&6; }
21971 if test $ac_compiler_gnu = yes; then
21972   GOBJC=yes
21973 else
21974   GOBJC=
21975 fi
21976 ac_test_OBJCFLAGS=${OBJCFLAGS+set}
21977 ac_save_OBJCFLAGS=$OBJCFLAGS
21978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
21979 $as_echo_n "checking whether $OBJC accepts -g... " >&6; }
21980 if ${ac_cv_prog_objc_g+:} false; then :
21981   $as_echo_n "(cached) " >&6
21982 else
21983   ac_save_objc_werror_flag=$ac_objc_werror_flag
21984    ac_objc_werror_flag=yes
21985    ac_cv_prog_objc_g=no
21986    OBJCFLAGS="-g"
21987    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21988 /* end confdefs.h.  */
21989 
21990 int
21991 main ()
21992 {
21993 
21994   ;
21995   return 0;
21996 }
21997 _ACEOF
21998 if ac_fn_objc_try_compile "$LINENO"; then :
21999   ac_cv_prog_objc_g=yes
22000 else
22001   OBJCFLAGS=""
22002       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22003 /* end confdefs.h.  */
22004 
22005 int
22006 main ()
22007 {
22008 
22009   ;
22010   return 0;
22011 }
22012 _ACEOF
22013 if ac_fn_objc_try_compile "$LINENO"; then :
22014 
22015 else
22016   ac_objc_werror_flag=$ac_save_objc_werror_flag
22017          OBJCFLAGS="-g"
22018          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22019 /* end confdefs.h.  */
22020 
22021 int
22022 main ()
22023 {
22024 
22025   ;
22026   return 0;
22027 }
22028 _ACEOF
22029 if ac_fn_objc_try_compile "$LINENO"; then :
22030   ac_cv_prog_objc_g=yes
22031 fi
22032 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22033 fi
22034 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22035 fi
22036 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22037    ac_objc_werror_flag=$ac_save_objc_werror_flag
22038 fi
22039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
22040 $as_echo "$ac_cv_prog_objc_g" >&6; }
22041 if test "$ac_test_OBJCFLAGS" = set; then
22042   OBJCFLAGS=$ac_save_OBJCFLAGS
22043 elif test $ac_cv_prog_objc_g = yes; then
22044   if test "$GOBJC" = yes; then
22045     OBJCFLAGS="-g -O2"
22046   else
22047     OBJCFLAGS="-g"
22048   fi
22049 else
22050   if test "$GOBJC" = yes; then
22051     OBJCFLAGS="-O2"
22052   else
22053     OBJCFLAGS=
22054   fi
22055 fi
22056 ac_ext=cpp
22057 ac_cpp='$CXXCPP $CPPFLAGS'
22058 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22059 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22060 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22061 
22062 
22063   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22064 
22065   # First separate the path from the arguments. This will split at the first
22066   # space.
22067   complete="$OBJC"
22068   path="${complete%% *}"
22069   tmp="$complete EOL"
22070   arguments="${tmp#* }"
22071 
22072   # Input might be given as Windows format, start by converting to
22073   # unix format.
22074   new_path=`$CYGPATH -u "$path"`
22075 
22076   # Now try to locate executable using which
22077   new_path=`$WHICH "$new_path" 2> /dev/null`
22078   # bat and cmd files are not always considered executable in cygwin causing which
22079   # to not find them
22080   if test "x$new_path" = x \
22081            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22082            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22083     new_path=`$CYGPATH -u "$path"`
22084   fi
22085   if test "x$new_path" = x; then
22086     # Oops. Which didn't find the executable.
22087     # The splitting of arguments from the executable at a space might have been incorrect,
22088     # since paths with space are more likely in Windows. Give it another try with the whole
22089     # argument.
22090     path="$complete"
22091     arguments="EOL"
22092     new_path=`$CYGPATH -u "$path"`
22093     new_path=`$WHICH "$new_path" 2> /dev/null`
22094     # bat and cmd files are not always considered executable in cygwin causing which
22095     # to not find them
22096     if test "x$new_path" = x \
22097              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22098              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22099       new_path=`$CYGPATH -u "$path"`
22100     fi
22101     if test "x$new_path" = x; then
22102       # It's still not found. Now this is an unrecoverable error.
22103       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22104 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22105       has_space=`$ECHO "$complete" | $GREP " "`
22106       if test "x$has_space" != x; then
22107         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22108 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22109       fi
22110       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22111     fi
22112   fi
22113 
22114   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22115   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22116   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22117   # "foo.exe" is OK but "foo" is an error.
22118   #
22119   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22120   # It is also a way to make sure we got the proper file name for the real test later on.
22121   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22122   if test "x$test_shortpath" = x; then
22123     # Short path failed, file does not exist as specified.
22124     # Try adding .exe or .cmd
22125     if test -f "${new_path}.exe"; then
22126        input_to_shortpath="${new_path}.exe"
22127     elif test -f "${new_path}.cmd"; then
22128        input_to_shortpath="${new_path}.cmd"
22129     else
22130       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
22131 $as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
22132       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22133 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22134       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22135     fi
22136   else
22137     input_to_shortpath="$new_path"
22138   fi
22139 
22140   # Call helper function which possibly converts this using DOS-style short mode.
22141   # If so, the updated path is stored in $new_path.
22142   new_path="$input_to_shortpath"
22143 
22144   input_path="$input_to_shortpath"
22145   # Check if we need to convert this using DOS-style short mode. If the path
22146   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22147   # take no chances and rewrite it.
22148   # Note: m4 eats our [], so we need to use [ and ] instead.
22149   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22150   if test "x$has_forbidden_chars" != x; then
22151     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22152     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22153     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22154     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22155       # Going to short mode and back again did indeed matter. Since short mode is
22156       # case insensitive, let's make it lowercase to improve readability.
22157       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22158       # Now convert it back to Unix-stile (cygpath)
22159       input_path=`$CYGPATH -u "$shortmode_path"`
22160       new_path="$input_path"
22161     fi
22162   fi
22163 
22164   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22165   if test "x$test_cygdrive_prefix" = x; then
22166     # As a simple fix, exclude /usr/bin since it's not a real path.
22167     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22168       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22169       # a path prefixed by /cygdrive for fixpath to work.
22170       new_path="$CYGWIN_ROOT_PATH$input_path"
22171     fi
22172   fi
22173 
22174   # remove trailing .exe if any
22175   new_path="${new_path/%.exe/}"
22176 
22177   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22178 
22179   # First separate the path from the arguments. This will split at the first
22180   # space.
22181   complete="$OBJC"
22182   path="${complete%% *}"
22183   tmp="$complete EOL"
22184   arguments="${tmp#* }"
22185 
22186   # Input might be given as Windows format, start by converting to
22187   # unix format.
22188   new_path="$path"
22189 
22190   windows_path="$new_path"
22191   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22192     unix_path=`$CYGPATH -u "$windows_path"`
22193     new_path="$unix_path"
22194   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22195     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22196     new_path="$unix_path"
22197   fi
22198 
22199 
22200   # Now try to locate executable using which
22201   new_path=`$WHICH "$new_path" 2> /dev/null`
22202 
22203   if test "x$new_path" = x; then
22204     # Oops. Which didn't find the executable.
22205     # The splitting of arguments from the executable at a space might have been incorrect,
22206     # since paths with space are more likely in Windows. Give it another try with the whole
22207     # argument.
22208     path="$complete"
22209     arguments="EOL"
22210     new_path="$path"
22211 
22212   windows_path="$new_path"
22213   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22214     unix_path=`$CYGPATH -u "$windows_path"`
22215     new_path="$unix_path"
22216   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22217     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22218     new_path="$unix_path"
22219   fi
22220 
22221 
22222     new_path=`$WHICH "$new_path" 2> /dev/null`
22223 
22224     if test "x$new_path" = x; then
22225       # It's still not found. Now this is an unrecoverable error.
22226       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22227 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22228       has_space=`$ECHO "$complete" | $GREP " "`
22229       if test "x$has_space" != x; then
22230         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22231 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22232       fi
22233       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22234     fi
22235   fi
22236 
22237   # Now new_path has a complete unix path to the binary
22238   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22239     # Keep paths in /bin as-is, but remove trailing .exe if any
22240     new_path="${new_path/%.exe/}"
22241     # Do not save /bin paths to all_fixpath_prefixes!
22242   else
22243     # Not in mixed or Windows style, start by that.
22244     new_path=`cmd //c echo $new_path`
22245 
22246   input_path="$new_path"
22247   # Check if we need to convert this using DOS-style short mode. If the path
22248   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22249   # take no chances and rewrite it.
22250   # Note: m4 eats our [], so we need to use [ and ] instead.
22251   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22252   if test "x$has_forbidden_chars" != x; then
22253     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22254     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22255   fi
22256 
22257     # Output is in $new_path
22258 
22259   windows_path="$new_path"
22260   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22261     unix_path=`$CYGPATH -u "$windows_path"`
22262     new_path="$unix_path"
22263   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22264     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22265     new_path="$unix_path"
22266   fi
22267 
22268     # remove trailing .exe if any
22269     new_path="${new_path/%.exe/}"
22270 
22271     # Save the first 10 bytes of this path to the storage, so fixpath can work.
22272     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22273   fi
22274 
22275   else
22276     # We're on a posix platform. Hooray! :)
22277     # First separate the path from the arguments. This will split at the first
22278     # space.
22279     complete="$OBJC"
22280     path="${complete%% *}"
22281     tmp="$complete EOL"
22282     arguments="${tmp#* }"
22283 
22284     # Cannot rely on the command "which" here since it doesn't always work.
22285     is_absolute_path=`$ECHO "$path" | $GREP ^/`
22286     if test -z "$is_absolute_path"; then
22287       # Path to executable is not absolute. Find it.
22288       IFS_save="$IFS"
22289       IFS=:
22290       for p in $PATH; do
22291         if test -f "$p/$path" && test -x "$p/$path"; then
22292           new_path="$p/$path"
22293           break
22294         fi
22295       done
22296       IFS="$IFS_save"
22297     else
22298       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
22299 $as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
22300       new_path="$path"
22301     fi
22302 
22303     if test "x$new_path" = x; then
22304         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22305 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22306         has_space=`$ECHO "$complete" | $GREP " "`
22307         if test "x$has_space" != x; then
22308           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22309 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22310         fi
22311         as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22312       fi
22313   fi
22314 
22315       # Now join together the path and the arguments once again
22316       if test "x$arguments" != xEOL; then
22317         new_complete="$new_path ${arguments% *}"
22318       else
22319         new_complete="$new_path"
22320       fi
22321 
22322   if test "x$complete" != "x$new_complete"; then
22323       OBJC="$new_complete"
22324       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
22325 $as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
22326     fi
22327 
22328 else
22329     OBJC=
22330 fi
22331 
22332 # Restore the flags to the user specified values.
22333 # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
22334 CFLAGS="$ORG_CFLAGS"
22335 CXXFLAGS="$ORG_CXXFLAGS"
22336 OBJCFLAGS="$ORG_OBJCFLAGS"
22337 
22338 LD="$CC"
22339 LDEXE="$CC"
22340 LDCXX="$CXX"
22341 LDEXECXX="$CXX"
22342 
22343 # LDEXE is the linker to use, when creating executables.
22344 
22345 # Linking C++ libraries.
22346 
22347 # Linking C++ executables.
22348 
22349 
22350 if test "x$OPENJDK_TARGET_OS" != xwindows; then
22351     if test -n "$ac_tool_prefix"; then
22352   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
22353 set dummy ${ac_tool_prefix}ar; ac_word=$2
22354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22355 $as_echo_n "checking for $ac_word... " >&6; }
22356 if ${ac_cv_prog_AR+:} false; then :
22357   $as_echo_n "(cached) " >&6
22358 else
22359   if test -n "$AR"; then
22360   ac_cv_prog_AR="$AR" # Let the user override the test.
22361 else
22362 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22363 for as_dir in $PATH
22364 do
22365   IFS=$as_save_IFS
22366   test -z "$as_dir" && as_dir=.
22367     for ac_exec_ext in '' $ac_executable_extensions; do
22368   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22369     ac_cv_prog_AR="${ac_tool_prefix}ar"
22370     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22371     break 2
22372   fi
22373 done
22374   done
22375 IFS=$as_save_IFS
22376 
22377 fi
22378 fi
22379 AR=$ac_cv_prog_AR
22380 if test -n "$AR"; then
22381   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
22382 $as_echo "$AR" >&6; }
22383 else
22384   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22385 $as_echo "no" >&6; }
22386 fi
22387 
22388 
22389 fi
22390 if test -z "$ac_cv_prog_AR"; then
22391   ac_ct_AR=$AR
22392   # Extract the first word of "ar", so it can be a program name with args.
22393 set dummy ar; ac_word=$2
22394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22395 $as_echo_n "checking for $ac_word... " >&6; }
22396 if ${ac_cv_prog_ac_ct_AR+:} false; then :
22397   $as_echo_n "(cached) " >&6
22398 else
22399   if test -n "$ac_ct_AR"; then
22400   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
22401 else
22402 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22403 for as_dir in $PATH
22404 do
22405   IFS=$as_save_IFS
22406   test -z "$as_dir" && as_dir=.
22407     for ac_exec_ext in '' $ac_executable_extensions; do
22408   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22409     ac_cv_prog_ac_ct_AR="ar"
22410     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22411     break 2
22412   fi
22413 done
22414   done
22415 IFS=$as_save_IFS
22416 
22417 fi
22418 fi
22419 ac_ct_AR=$ac_cv_prog_ac_ct_AR
22420 if test -n "$ac_ct_AR"; then
22421   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
22422 $as_echo "$ac_ct_AR" >&6; }
22423 else
22424   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22425 $as_echo "no" >&6; }
22426 fi
22427 
22428   if test "x$ac_ct_AR" = x; then
22429     AR=""
22430   else
22431     case $cross_compiling:$ac_tool_warned in
22432 yes:)
22433 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22434 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22435 ac_tool_warned=yes ;;
22436 esac
22437     AR=$ac_ct_AR
22438   fi
22439 else
22440   AR="$ac_cv_prog_AR"
22441 fi
22442 
22443 
22444   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22445 
22446   # First separate the path from the arguments. This will split at the first
22447   # space.
22448   complete="$AR"
22449   path="${complete%% *}"
22450   tmp="$complete EOL"
22451   arguments="${tmp#* }"
22452 
22453   # Input might be given as Windows format, start by converting to
22454   # unix format.
22455   new_path=`$CYGPATH -u "$path"`
22456 
22457   # Now try to locate executable using which
22458   new_path=`$WHICH "$new_path" 2> /dev/null`
22459   # bat and cmd files are not always considered executable in cygwin causing which
22460   # to not find them
22461   if test "x$new_path" = x \
22462            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22463            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22464     new_path=`$CYGPATH -u "$path"`
22465   fi
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=`$CYGPATH -u "$path"`
22474     new_path=`$WHICH "$new_path" 2> /dev/null`
22475     # bat and cmd files are not always considered executable in cygwin causing which
22476     # to not find them
22477     if test "x$new_path" = x \
22478              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22479              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22480       new_path=`$CYGPATH -u "$path"`
22481     fi
22482     if test "x$new_path" = x; then
22483       # It's still not found. Now this is an unrecoverable error.
22484       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22485 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22486       has_space=`$ECHO "$complete" | $GREP " "`
22487       if test "x$has_space" != x; then
22488         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22489 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22490       fi
22491       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22492     fi
22493   fi
22494 
22495   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22496   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22497   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22498   # "foo.exe" is OK but "foo" is an error.
22499   #
22500   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22501   # It is also a way to make sure we got the proper file name for the real test later on.
22502   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22503   if test "x$test_shortpath" = x; then
22504     # Short path failed, file does not exist as specified.
22505     # Try adding .exe or .cmd
22506     if test -f "${new_path}.exe"; then
22507        input_to_shortpath="${new_path}.exe"
22508     elif test -f "${new_path}.cmd"; then
22509        input_to_shortpath="${new_path}.cmd"
22510     else
22511       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
22512 $as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
22513       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22514 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22515       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22516     fi
22517   else
22518     input_to_shortpath="$new_path"
22519   fi
22520 
22521   # Call helper function which possibly converts this using DOS-style short mode.
22522   # If so, the updated path is stored in $new_path.
22523   new_path="$input_to_shortpath"
22524 
22525   input_path="$input_to_shortpath"
22526   # Check if we need to convert this using DOS-style short mode. If the path
22527   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22528   # take no chances and rewrite it.
22529   # Note: m4 eats our [], so we need to use [ and ] instead.
22530   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22531   if test "x$has_forbidden_chars" != x; then
22532     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22533     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22534     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22535     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22536       # Going to short mode and back again did indeed matter. Since short mode is
22537       # case insensitive, let's make it lowercase to improve readability.
22538       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22539       # Now convert it back to Unix-stile (cygpath)
22540       input_path=`$CYGPATH -u "$shortmode_path"`
22541       new_path="$input_path"
22542     fi
22543   fi
22544 
22545   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22546   if test "x$test_cygdrive_prefix" = x; then
22547     # As a simple fix, exclude /usr/bin since it's not a real path.
22548     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22549       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22550       # a path prefixed by /cygdrive for fixpath to work.
22551       new_path="$CYGWIN_ROOT_PATH$input_path"
22552     fi
22553   fi
22554 
22555   # remove trailing .exe if any
22556   new_path="${new_path/%.exe/}"
22557 
22558   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22559 
22560   # First separate the path from the arguments. This will split at the first
22561   # space.
22562   complete="$AR"
22563   path="${complete%% *}"
22564   tmp="$complete EOL"
22565   arguments="${tmp#* }"
22566 
22567   # Input might be given as Windows format, start by converting to
22568   # unix format.
22569   new_path="$path"
22570 
22571   windows_path="$new_path"
22572   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22573     unix_path=`$CYGPATH -u "$windows_path"`
22574     new_path="$unix_path"
22575   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22576     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22577     new_path="$unix_path"
22578   fi
22579 
22580 
22581   # Now try to locate executable using which
22582   new_path=`$WHICH "$new_path" 2> /dev/null`
22583 
22584   if test "x$new_path" = x; then
22585     # Oops. Which didn't find the executable.
22586     # The splitting of arguments from the executable at a space might have been incorrect,
22587     # since paths with space are more likely in Windows. Give it another try with the whole
22588     # argument.
22589     path="$complete"
22590     arguments="EOL"
22591     new_path="$path"
22592 
22593   windows_path="$new_path"
22594   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22595     unix_path=`$CYGPATH -u "$windows_path"`
22596     new_path="$unix_path"
22597   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22598     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22599     new_path="$unix_path"
22600   fi
22601 
22602 
22603     new_path=`$WHICH "$new_path" 2> /dev/null`
22604 
22605     if test "x$new_path" = x; then
22606       # It's still not found. Now this is an unrecoverable error.
22607       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22608 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22609       has_space=`$ECHO "$complete" | $GREP " "`
22610       if test "x$has_space" != x; then
22611         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22612 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22613       fi
22614       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22615     fi
22616   fi
22617 
22618   # Now new_path has a complete unix path to the binary
22619   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22620     # Keep paths in /bin as-is, but remove trailing .exe if any
22621     new_path="${new_path/%.exe/}"
22622     # Do not save /bin paths to all_fixpath_prefixes!
22623   else
22624     # Not in mixed or Windows style, start by that.
22625     new_path=`cmd //c echo $new_path`
22626 
22627   input_path="$new_path"
22628   # Check if we need to convert this using DOS-style short mode. If the path
22629   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22630   # take no chances and rewrite it.
22631   # Note: m4 eats our [], so we need to use [ and ] instead.
22632   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22633   if test "x$has_forbidden_chars" != x; then
22634     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22635     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22636   fi
22637 
22638     # Output is in $new_path
22639 
22640   windows_path="$new_path"
22641   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22642     unix_path=`$CYGPATH -u "$windows_path"`
22643     new_path="$unix_path"
22644   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22645     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22646     new_path="$unix_path"
22647   fi
22648 
22649     # remove trailing .exe if any
22650     new_path="${new_path/%.exe/}"
22651 
22652     # Save the first 10 bytes of this path to the storage, so fixpath can work.
22653     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22654   fi
22655 
22656   else
22657     # We're on a posix platform. Hooray! :)
22658     # First separate the path from the arguments. This will split at the first
22659     # space.
22660     complete="$AR"
22661     path="${complete%% *}"
22662     tmp="$complete EOL"
22663     arguments="${tmp#* }"
22664 
22665     # Cannot rely on the command "which" here since it doesn't always work.
22666     is_absolute_path=`$ECHO "$path" | $GREP ^/`
22667     if test -z "$is_absolute_path"; then
22668       # Path to executable is not absolute. Find it.
22669       IFS_save="$IFS"
22670       IFS=:
22671       for p in $PATH; do
22672         if test -f "$p/$path" && test -x "$p/$path"; then
22673           new_path="$p/$path"
22674           break
22675         fi
22676       done
22677       IFS="$IFS_save"
22678     else
22679       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
22680 $as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
22681       new_path="$path"
22682     fi
22683 
22684     if test "x$new_path" = x; then
22685         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22686 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22687         has_space=`$ECHO "$complete" | $GREP " "`
22688         if test "x$has_space" != x; then
22689           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22690 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22691         fi
22692         as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22693       fi
22694   fi
22695 
22696       # Now join together the path and the arguments once again
22697       if test "x$arguments" != xEOL; then
22698         new_complete="$new_path ${arguments% *}"
22699       else
22700         new_complete="$new_path"
22701       fi
22702 
22703   if test "x$complete" != "x$new_complete"; then
22704       AR="$new_complete"
22705       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
22706 $as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
22707     fi
22708 
22709 fi
22710 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
22711     ARFLAGS="-r"
22712 else
22713     ARFLAGS=""
22714 fi
22715 
22716 
22717 # For hotspot, we need these in Windows mixed path; other platforms keep them the same
22718 HOTSPOT_CXX="$CXX"
22719 HOTSPOT_LD="$LD"
22720 
22721 
22722 
22723 COMPILER_NAME=gcc
22724 COMPILER_TYPE=CC
22725 if test "x$OPENJDK_TARGET_OS" = xwindows; then :
22726 
22727     # For now, assume that we are always compiling using cl.exe.
22728     CC_OUT_OPTION=-Fo
22729     EXE_OUT_OPTION=-out:
22730     LD_OUT_OPTION=-out:
22731     AR_OUT_OPTION=-out:
22732     # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
22733     # program for something completely different.
22734     # Extract the first word of "link", so it can be a program name with args.
22735 set dummy link; ac_word=$2
22736 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22737 $as_echo_n "checking for $ac_word... " >&6; }
22738 if ${ac_cv_prog_WINLD+:} false; then :
22739   $as_echo_n "(cached) " >&6
22740 else
22741   if test -n "$WINLD"; then
22742   ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
22743 else
22744   ac_prog_rejected=no
22745 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22746 for as_dir in $PATH
22747 do
22748   IFS=$as_save_IFS
22749   test -z "$as_dir" && as_dir=.
22750     for ac_exec_ext in '' $ac_executable_extensions; do
22751   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22752     if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
22753        ac_prog_rejected=yes
22754        continue
22755      fi
22756     ac_cv_prog_WINLD="link"
22757     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22758     break 2
22759   fi
22760 done
22761   done
22762 IFS=$as_save_IFS
22763 
22764 if test $ac_prog_rejected = yes; then
22765   # We found a bogon in the path, so make sure we never use it.
22766   set dummy $ac_cv_prog_WINLD
22767   shift
22768   if test $# != 0; then
22769     # We chose a different compiler from the bogus one.
22770     # However, it has the same basename, so the bogon will be chosen
22771     # first if we set WINLD to just the basename; use the full file name.
22772     shift
22773     ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
22774   fi
22775 fi
22776 fi
22777 fi
22778 WINLD=$ac_cv_prog_WINLD
22779 if test -n "$WINLD"; then
22780   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
22781 $as_echo "$WINLD" >&6; }
22782 else
22783   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22784 $as_echo "no" >&6; }
22785 fi
22786 
22787 
22788     # Since we must ignore the first found link, WINLD will contain
22789     # the full path to the link.exe program.
22790 
22791   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22792 
22793   # First separate the path from the arguments. This will split at the first
22794   # space.
22795   complete="$WINLD"
22796   path="${complete%% *}"
22797   tmp="$complete EOL"
22798   arguments="${tmp#* }"
22799 
22800   # Input might be given as Windows format, start by converting to
22801   # unix format.
22802   new_path=`$CYGPATH -u "$path"`
22803 
22804   # Now try to locate executable using which
22805   new_path=`$WHICH "$new_path" 2> /dev/null`
22806   # bat and cmd files are not always considered executable in cygwin causing which
22807   # to not find them
22808   if test "x$new_path" = x \
22809            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22810            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22811     new_path=`$CYGPATH -u "$path"`
22812   fi
22813   if test "x$new_path" = x; then
22814     # Oops. Which didn't find the executable.
22815     # The splitting of arguments from the executable at a space might have been incorrect,
22816     # since paths with space are more likely in Windows. Give it another try with the whole
22817     # argument.
22818     path="$complete"
22819     arguments="EOL"
22820     new_path=`$CYGPATH -u "$path"`
22821     new_path=`$WHICH "$new_path" 2> /dev/null`
22822     # bat and cmd files are not always considered executable in cygwin causing which
22823     # to not find them
22824     if test "x$new_path" = x \
22825              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22826              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22827       new_path=`$CYGPATH -u "$path"`
22828     fi
22829     if test "x$new_path" = x; then
22830       # It's still not found. Now this is an unrecoverable error.
22831       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22832 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22833       has_space=`$ECHO "$complete" | $GREP " "`
22834       if test "x$has_space" != x; then
22835         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22836 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22837       fi
22838       as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22839     fi
22840   fi
22841 
22842   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22843   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22844   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22845   # "foo.exe" is OK but "foo" is an error.
22846   #
22847   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22848   # It is also a way to make sure we got the proper file name for the real test later on.
22849   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22850   if test "x$test_shortpath" = x; then
22851     # Short path failed, file does not exist as specified.
22852     # Try adding .exe or .cmd
22853     if test -f "${new_path}.exe"; then
22854        input_to_shortpath="${new_path}.exe"
22855     elif test -f "${new_path}.cmd"; then
22856        input_to_shortpath="${new_path}.cmd"
22857     else
22858       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
22859 $as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
22860       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22861 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22862       as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22863     fi
22864   else
22865     input_to_shortpath="$new_path"
22866   fi
22867 
22868   # Call helper function which possibly converts this using DOS-style short mode.
22869   # If so, the updated path is stored in $new_path.
22870   new_path="$input_to_shortpath"
22871 
22872   input_path="$input_to_shortpath"
22873   # Check if we need to convert this using DOS-style short mode. If the path
22874   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22875   # take no chances and rewrite it.
22876   # Note: m4 eats our [], so we need to use [ and ] instead.
22877   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22878   if test "x$has_forbidden_chars" != x; then
22879     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22880     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22881     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22882     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22883       # Going to short mode and back again did indeed matter. Since short mode is
22884       # case insensitive, let's make it lowercase to improve readability.
22885       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22886       # Now convert it back to Unix-stile (cygpath)
22887       input_path=`$CYGPATH -u "$shortmode_path"`
22888       new_path="$input_path"
22889     fi
22890   fi
22891 
22892   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22893   if test "x$test_cygdrive_prefix" = x; then
22894     # As a simple fix, exclude /usr/bin since it's not a real path.
22895     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22896       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22897       # a path prefixed by /cygdrive for fixpath to work.
22898       new_path="$CYGWIN_ROOT_PATH$input_path"
22899     fi
22900   fi
22901 
22902   # remove trailing .exe if any
22903   new_path="${new_path/%.exe/}"
22904 
22905   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22906 
22907   # First separate the path from the arguments. This will split at the first
22908   # space.
22909   complete="$WINLD"
22910   path="${complete%% *}"
22911   tmp="$complete EOL"
22912   arguments="${tmp#* }"
22913 
22914   # Input might be given as Windows format, start by converting to
22915   # unix format.
22916   new_path="$path"
22917 
22918   windows_path="$new_path"
22919   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22920     unix_path=`$CYGPATH -u "$windows_path"`
22921     new_path="$unix_path"
22922   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22923     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22924     new_path="$unix_path"
22925   fi
22926 
22927 
22928   # Now try to locate executable using which
22929   new_path=`$WHICH "$new_path" 2> /dev/null`
22930 
22931   if test "x$new_path" = x; then
22932     # Oops. Which didn't find the executable.
22933     # The splitting of arguments from the executable at a space might have been incorrect,
22934     # since paths with space are more likely in Windows. Give it another try with the whole
22935     # argument.
22936     path="$complete"
22937     arguments="EOL"
22938     new_path="$path"
22939 
22940   windows_path="$new_path"
22941   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22942     unix_path=`$CYGPATH -u "$windows_path"`
22943     new_path="$unix_path"
22944   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22945     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22946     new_path="$unix_path"
22947   fi
22948 
22949 
22950     new_path=`$WHICH "$new_path" 2> /dev/null`
22951 
22952     if test "x$new_path" = x; then
22953       # It's still not found. Now this is an unrecoverable error.
22954       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22955 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22956       has_space=`$ECHO "$complete" | $GREP " "`
22957       if test "x$has_space" != x; then
22958         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22959 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22960       fi
22961       as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22962     fi
22963   fi
22964 
22965   # Now new_path has a complete unix path to the binary
22966   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22967     # Keep paths in /bin as-is, but remove trailing .exe if any
22968     new_path="${new_path/%.exe/}"
22969     # Do not save /bin paths to all_fixpath_prefixes!
22970   else
22971     # Not in mixed or Windows style, start by that.
22972     new_path=`cmd //c echo $new_path`
22973 
22974   input_path="$new_path"
22975   # Check if we need to convert this using DOS-style short mode. If the path
22976   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22977   # take no chances and rewrite it.
22978   # Note: m4 eats our [], so we need to use [ and ] instead.
22979   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22980   if test "x$has_forbidden_chars" != x; then
22981     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22982     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22983   fi
22984 
22985     # Output is in $new_path
22986 
22987   windows_path="$new_path"
22988   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22989     unix_path=`$CYGPATH -u "$windows_path"`
22990     new_path="$unix_path"
22991   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22992     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22993     new_path="$unix_path"
22994   fi
22995 
22996     # remove trailing .exe if any
22997     new_path="${new_path/%.exe/}"
22998 
22999     # Save the first 10 bytes of this path to the storage, so fixpath can work.
23000     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23001   fi
23002 
23003   else
23004     # We're on a posix platform. Hooray! :)
23005     # First separate the path from the arguments. This will split at the first
23006     # space.
23007     complete="$WINLD"
23008     path="${complete%% *}"
23009     tmp="$complete EOL"
23010     arguments="${tmp#* }"
23011 
23012     # Cannot rely on the command "which" here since it doesn't always work.
23013     is_absolute_path=`$ECHO "$path" | $GREP ^/`
23014     if test -z "$is_absolute_path"; then
23015       # Path to executable is not absolute. Find it.
23016       IFS_save="$IFS"
23017       IFS=:
23018       for p in $PATH; do
23019         if test -f "$p/$path" && test -x "$p/$path"; then
23020           new_path="$p/$path"
23021           break
23022         fi
23023       done
23024       IFS="$IFS_save"
23025     else
23026       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
23027 $as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
23028       new_path="$path"
23029     fi
23030 
23031     if test "x$new_path" = x; then
23032         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
23033 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
23034         has_space=`$ECHO "$complete" | $GREP " "`
23035         if test "x$has_space" != x; then
23036           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23037 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23038         fi
23039         as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23040       fi
23041   fi
23042 
23043       # Now join together the path and the arguments once again
23044       if test "x$arguments" != xEOL; then
23045         new_complete="$new_path ${arguments% *}"
23046       else
23047         new_complete="$new_path"
23048       fi
23049 
23050   if test "x$complete" != "x$new_complete"; then
23051       WINLD="$new_complete"
23052       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
23053 $as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
23054     fi
23055 
23056     printf "Windows linker was found at $WINLD\n"
23057     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
23058 $as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
23059     "$WINLD" --version > /dev/null
23060     if test $? -eq 0 ; then
23061       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23062 $as_echo "no" >&6; }
23063       as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
23064     else
23065       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23066 $as_echo "yes" >&6; }
23067     fi
23068     LD="$WINLD"
23069     LDEXE="$WINLD"
23070     LDCXX="$WINLD"
23071     LDEXECXX="$WINLD"
23072 
23073     # Extract the first word of "mt", so it can be a program name with args.
23074 set dummy mt; ac_word=$2
23075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23076 $as_echo_n "checking for $ac_word... " >&6; }
23077 if ${ac_cv_prog_MT+:} false; then :
23078   $as_echo_n "(cached) " >&6
23079 else
23080   if test -n "$MT"; then
23081   ac_cv_prog_MT="$MT" # Let the user override the test.
23082 else
23083   ac_prog_rejected=no
23084 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23085 for as_dir in $PATH
23086 do
23087   IFS=$as_save_IFS
23088   test -z "$as_dir" && as_dir=.
23089     for ac_exec_ext in '' $ac_executable_extensions; do
23090   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23091     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
23092        ac_prog_rejected=yes
23093        continue
23094      fi
23095     ac_cv_prog_MT="mt"
23096     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23097     break 2
23098   fi
23099 done
23100   done
23101 IFS=$as_save_IFS
23102 
23103 if test $ac_prog_rejected = yes; then
23104   # We found a bogon in the path, so make sure we never use it.
23105   set dummy $ac_cv_prog_MT
23106   shift
23107   if test $# != 0; then
23108     # We chose a different compiler from the bogus one.
23109     # However, it has the same basename, so the bogon will be chosen
23110     # first if we set MT to just the basename; use the full file name.
23111     shift
23112     ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
23113   fi
23114 fi
23115 fi
23116 fi
23117 MT=$ac_cv_prog_MT
23118 if test -n "$MT"; then
23119   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
23120 $as_echo "$MT" >&6; }
23121 else
23122   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23123 $as_echo "no" >&6; }
23124 fi
23125 
23126 
23127 
23128   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23129 
23130   # First separate the path from the arguments. This will split at the first
23131   # space.
23132   complete="$MT"
23133   path="${complete%% *}"
23134   tmp="$complete EOL"
23135   arguments="${tmp#* }"
23136 
23137   # Input might be given as Windows format, start by converting to
23138   # unix format.
23139   new_path=`$CYGPATH -u "$path"`
23140 
23141   # Now try to locate executable using which
23142   new_path=`$WHICH "$new_path" 2> /dev/null`
23143   # bat and cmd files are not always considered executable in cygwin causing which
23144   # to not find them
23145   if test "x$new_path" = x \
23146            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23147            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23148     new_path=`$CYGPATH -u "$path"`
23149   fi
23150   if test "x$new_path" = x; then
23151     # Oops. Which didn't find the executable.
23152     # The splitting of arguments from the executable at a space might have been incorrect,
23153     # since paths with space are more likely in Windows. Give it another try with the whole
23154     # argument.
23155     path="$complete"
23156     arguments="EOL"
23157     new_path=`$CYGPATH -u "$path"`
23158     new_path=`$WHICH "$new_path" 2> /dev/null`
23159     # bat and cmd files are not always considered executable in cygwin causing which
23160     # to not find them
23161     if test "x$new_path" = x \
23162              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23163              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23164       new_path=`$CYGPATH -u "$path"`
23165     fi
23166     if test "x$new_path" = x; then
23167       # It's still not found. Now this is an unrecoverable error.
23168       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23169 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23170       has_space=`$ECHO "$complete" | $GREP " "`
23171       if test "x$has_space" != x; then
23172         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23173 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23174       fi
23175       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23176     fi
23177   fi
23178 
23179   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23180   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23181   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23182   # "foo.exe" is OK but "foo" is an error.
23183   #
23184   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23185   # It is also a way to make sure we got the proper file name for the real test later on.
23186   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23187   if test "x$test_shortpath" = x; then
23188     # Short path failed, file does not exist as specified.
23189     # Try adding .exe or .cmd
23190     if test -f "${new_path}.exe"; then
23191        input_to_shortpath="${new_path}.exe"
23192     elif test -f "${new_path}.cmd"; then
23193        input_to_shortpath="${new_path}.cmd"
23194     else
23195       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
23196 $as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
23197       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23198 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23199       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23200     fi
23201   else
23202     input_to_shortpath="$new_path"
23203   fi
23204 
23205   # Call helper function which possibly converts this using DOS-style short mode.
23206   # If so, the updated path is stored in $new_path.
23207   new_path="$input_to_shortpath"
23208 
23209   input_path="$input_to_shortpath"
23210   # Check if we need to convert this using DOS-style short mode. If the path
23211   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23212   # take no chances and rewrite it.
23213   # Note: m4 eats our [], so we need to use [ and ] instead.
23214   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23215   if test "x$has_forbidden_chars" != x; then
23216     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23217     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23218     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23219     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23220       # Going to short mode and back again did indeed matter. Since short mode is
23221       # case insensitive, let's make it lowercase to improve readability.
23222       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23223       # Now convert it back to Unix-stile (cygpath)
23224       input_path=`$CYGPATH -u "$shortmode_path"`
23225       new_path="$input_path"
23226     fi
23227   fi
23228 
23229   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23230   if test "x$test_cygdrive_prefix" = x; then
23231     # As a simple fix, exclude /usr/bin since it's not a real path.
23232     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23233       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23234       # a path prefixed by /cygdrive for fixpath to work.
23235       new_path="$CYGWIN_ROOT_PATH$input_path"
23236     fi
23237   fi
23238 
23239   # remove trailing .exe if any
23240   new_path="${new_path/%.exe/}"
23241 
23242   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23243 
23244   # First separate the path from the arguments. This will split at the first
23245   # space.
23246   complete="$MT"
23247   path="${complete%% *}"
23248   tmp="$complete EOL"
23249   arguments="${tmp#* }"
23250 
23251   # Input might be given as Windows format, start by converting to
23252   # unix format.
23253   new_path="$path"
23254 
23255   windows_path="$new_path"
23256   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23257     unix_path=`$CYGPATH -u "$windows_path"`
23258     new_path="$unix_path"
23259   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23260     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23261     new_path="$unix_path"
23262   fi
23263 
23264 
23265   # Now try to locate executable using which
23266   new_path=`$WHICH "$new_path" 2> /dev/null`
23267 
23268   if test "x$new_path" = x; then
23269     # Oops. Which didn't find the executable.
23270     # The splitting of arguments from the executable at a space might have been incorrect,
23271     # since paths with space are more likely in Windows. Give it another try with the whole
23272     # argument.
23273     path="$complete"
23274     arguments="EOL"
23275     new_path="$path"
23276 
23277   windows_path="$new_path"
23278   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23279     unix_path=`$CYGPATH -u "$windows_path"`
23280     new_path="$unix_path"
23281   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23282     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23283     new_path="$unix_path"
23284   fi
23285 
23286 
23287     new_path=`$WHICH "$new_path" 2> /dev/null`
23288 
23289     if test "x$new_path" = x; then
23290       # It's still not found. Now this is an unrecoverable error.
23291       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23292 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23293       has_space=`$ECHO "$complete" | $GREP " "`
23294       if test "x$has_space" != x; then
23295         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23296 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23297       fi
23298       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23299     fi
23300   fi
23301 
23302   # Now new_path has a complete unix path to the binary
23303   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23304     # Keep paths in /bin as-is, but remove trailing .exe if any
23305     new_path="${new_path/%.exe/}"
23306     # Do not save /bin paths to all_fixpath_prefixes!
23307   else
23308     # Not in mixed or Windows style, start by that.
23309     new_path=`cmd //c echo $new_path`
23310 
23311   input_path="$new_path"
23312   # Check if we need to convert this using DOS-style short mode. If the path
23313   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23314   # take no chances and rewrite it.
23315   # Note: m4 eats our [], so we need to use [ and ] instead.
23316   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23317   if test "x$has_forbidden_chars" != x; then
23318     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23319     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23320   fi
23321 
23322     # Output is in $new_path
23323 
23324   windows_path="$new_path"
23325   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23326     unix_path=`$CYGPATH -u "$windows_path"`
23327     new_path="$unix_path"
23328   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23329     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23330     new_path="$unix_path"
23331   fi
23332 
23333     # remove trailing .exe if any
23334     new_path="${new_path/%.exe/}"
23335 
23336     # Save the first 10 bytes of this path to the storage, so fixpath can work.
23337     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23338   fi
23339 
23340   else
23341     # We're on a posix platform. Hooray! :)
23342     # First separate the path from the arguments. This will split at the first
23343     # space.
23344     complete="$MT"
23345     path="${complete%% *}"
23346     tmp="$complete EOL"
23347     arguments="${tmp#* }"
23348 
23349     # Cannot rely on the command "which" here since it doesn't always work.
23350     is_absolute_path=`$ECHO "$path" | $GREP ^/`
23351     if test -z "$is_absolute_path"; then
23352       # Path to executable is not absolute. Find it.
23353       IFS_save="$IFS"
23354       IFS=:
23355       for p in $PATH; do
23356         if test -f "$p/$path" && test -x "$p/$path"; then
23357           new_path="$p/$path"
23358           break
23359         fi
23360       done
23361       IFS="$IFS_save"
23362     else
23363       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
23364 $as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
23365       new_path="$path"
23366     fi
23367 
23368     if test "x$new_path" = x; then
23369         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23370 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23371         has_space=`$ECHO "$complete" | $GREP " "`
23372         if test "x$has_space" != x; then
23373           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23374 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23375         fi
23376         as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23377       fi
23378   fi
23379 
23380       # Now join together the path and the arguments once again
23381       if test "x$arguments" != xEOL; then
23382         new_complete="$new_path ${arguments% *}"
23383       else
23384         new_complete="$new_path"
23385       fi
23386 
23387   if test "x$complete" != "x$new_complete"; then
23388       MT="$new_complete"
23389       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
23390 $as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
23391     fi
23392 
23393     # The resource compiler
23394     # Extract the first word of "rc", so it can be a program name with args.
23395 set dummy rc; ac_word=$2
23396 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23397 $as_echo_n "checking for $ac_word... " >&6; }
23398 if ${ac_cv_prog_RC+:} false; then :
23399   $as_echo_n "(cached) " >&6
23400 else
23401   if test -n "$RC"; then
23402   ac_cv_prog_RC="$RC" # Let the user override the test.
23403 else
23404   ac_prog_rejected=no
23405 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23406 for as_dir in $PATH
23407 do
23408   IFS=$as_save_IFS
23409   test -z "$as_dir" && as_dir=.
23410     for ac_exec_ext in '' $ac_executable_extensions; do
23411   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23412     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
23413        ac_prog_rejected=yes
23414        continue
23415      fi
23416     ac_cv_prog_RC="rc"
23417     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23418     break 2
23419   fi
23420 done
23421   done
23422 IFS=$as_save_IFS
23423 
23424 if test $ac_prog_rejected = yes; then
23425   # We found a bogon in the path, so make sure we never use it.
23426   set dummy $ac_cv_prog_RC
23427   shift
23428   if test $# != 0; then
23429     # We chose a different compiler from the bogus one.
23430     # However, it has the same basename, so the bogon will be chosen
23431     # first if we set RC to just the basename; use the full file name.
23432     shift
23433     ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
23434   fi
23435 fi
23436 fi
23437 fi
23438 RC=$ac_cv_prog_RC
23439 if test -n "$RC"; then
23440   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
23441 $as_echo "$RC" >&6; }
23442 else
23443   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23444 $as_echo "no" >&6; }
23445 fi
23446 
23447 
23448 
23449   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23450 
23451   # First separate the path from the arguments. This will split at the first
23452   # space.
23453   complete="$RC"
23454   path="${complete%% *}"
23455   tmp="$complete EOL"
23456   arguments="${tmp#* }"
23457 
23458   # Input might be given as Windows format, start by converting to
23459   # unix format.
23460   new_path=`$CYGPATH -u "$path"`
23461 
23462   # Now try to locate executable using which
23463   new_path=`$WHICH "$new_path" 2> /dev/null`
23464   # bat and cmd files are not always considered executable in cygwin causing which
23465   # to not find them
23466   if test "x$new_path" = x \
23467            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23468            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23469     new_path=`$CYGPATH -u "$path"`
23470   fi
23471   if test "x$new_path" = x; then
23472     # Oops. Which didn't find the executable.
23473     # The splitting of arguments from the executable at a space might have been incorrect,
23474     # since paths with space are more likely in Windows. Give it another try with the whole
23475     # argument.
23476     path="$complete"
23477     arguments="EOL"
23478     new_path=`$CYGPATH -u "$path"`
23479     new_path=`$WHICH "$new_path" 2> /dev/null`
23480     # bat and cmd files are not always considered executable in cygwin causing which
23481     # to not find them
23482     if test "x$new_path" = x \
23483              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23484              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23485       new_path=`$CYGPATH -u "$path"`
23486     fi
23487     if test "x$new_path" = x; then
23488       # It's still not found. Now this is an unrecoverable error.
23489       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23490 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23491       has_space=`$ECHO "$complete" | $GREP " "`
23492       if test "x$has_space" != x; then
23493         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23494 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23495       fi
23496       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23497     fi
23498   fi
23499 
23500   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23501   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23502   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23503   # "foo.exe" is OK but "foo" is an error.
23504   #
23505   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23506   # It is also a way to make sure we got the proper file name for the real test later on.
23507   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23508   if test "x$test_shortpath" = x; then
23509     # Short path failed, file does not exist as specified.
23510     # Try adding .exe or .cmd
23511     if test -f "${new_path}.exe"; then
23512        input_to_shortpath="${new_path}.exe"
23513     elif test -f "${new_path}.cmd"; then
23514        input_to_shortpath="${new_path}.cmd"
23515     else
23516       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
23517 $as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
23518       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23519 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23520       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23521     fi
23522   else
23523     input_to_shortpath="$new_path"
23524   fi
23525 
23526   # Call helper function which possibly converts this using DOS-style short mode.
23527   # If so, the updated path is stored in $new_path.
23528   new_path="$input_to_shortpath"
23529 
23530   input_path="$input_to_shortpath"
23531   # Check if we need to convert this using DOS-style short mode. If the path
23532   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23533   # take no chances and rewrite it.
23534   # Note: m4 eats our [], so we need to use [ and ] instead.
23535   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23536   if test "x$has_forbidden_chars" != x; then
23537     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23538     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23539     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23540     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23541       # Going to short mode and back again did indeed matter. Since short mode is
23542       # case insensitive, let's make it lowercase to improve readability.
23543       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23544       # Now convert it back to Unix-stile (cygpath)
23545       input_path=`$CYGPATH -u "$shortmode_path"`
23546       new_path="$input_path"
23547     fi
23548   fi
23549 
23550   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23551   if test "x$test_cygdrive_prefix" = x; then
23552     # As a simple fix, exclude /usr/bin since it's not a real path.
23553     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23554       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23555       # a path prefixed by /cygdrive for fixpath to work.
23556       new_path="$CYGWIN_ROOT_PATH$input_path"
23557     fi
23558   fi
23559 
23560   # remove trailing .exe if any
23561   new_path="${new_path/%.exe/}"
23562 
23563   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23564 
23565   # First separate the path from the arguments. This will split at the first
23566   # space.
23567   complete="$RC"
23568   path="${complete%% *}"
23569   tmp="$complete EOL"
23570   arguments="${tmp#* }"
23571 
23572   # Input might be given as Windows format, start by converting to
23573   # unix format.
23574   new_path="$path"
23575 
23576   windows_path="$new_path"
23577   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23578     unix_path=`$CYGPATH -u "$windows_path"`
23579     new_path="$unix_path"
23580   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23581     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23582     new_path="$unix_path"
23583   fi
23584 
23585 
23586   # Now try to locate executable using which
23587   new_path=`$WHICH "$new_path" 2> /dev/null`
23588 
23589   if test "x$new_path" = x; then
23590     # Oops. Which didn't find the executable.
23591     # The splitting of arguments from the executable at a space might have been incorrect,
23592     # since paths with space are more likely in Windows. Give it another try with the whole
23593     # argument.
23594     path="$complete"
23595     arguments="EOL"
23596     new_path="$path"
23597 
23598   windows_path="$new_path"
23599   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23600     unix_path=`$CYGPATH -u "$windows_path"`
23601     new_path="$unix_path"
23602   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23603     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23604     new_path="$unix_path"
23605   fi
23606 
23607 
23608     new_path=`$WHICH "$new_path" 2> /dev/null`
23609 
23610     if test "x$new_path" = x; then
23611       # It's still not found. Now this is an unrecoverable error.
23612       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23613 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23614       has_space=`$ECHO "$complete" | $GREP " "`
23615       if test "x$has_space" != x; then
23616         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23617 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23618       fi
23619       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23620     fi
23621   fi
23622 
23623   # Now new_path has a complete unix path to the binary
23624   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23625     # Keep paths in /bin as-is, but remove trailing .exe if any
23626     new_path="${new_path/%.exe/}"
23627     # Do not save /bin paths to all_fixpath_prefixes!
23628   else
23629     # Not in mixed or Windows style, start by that.
23630     new_path=`cmd //c echo $new_path`
23631 
23632   input_path="$new_path"
23633   # Check if we need to convert this using DOS-style short mode. If the path
23634   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23635   # take no chances and rewrite it.
23636   # Note: m4 eats our [], so we need to use [ and ] instead.
23637   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23638   if test "x$has_forbidden_chars" != x; then
23639     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23640     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23641   fi
23642 
23643     # Output is in $new_path
23644 
23645   windows_path="$new_path"
23646   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23647     unix_path=`$CYGPATH -u "$windows_path"`
23648     new_path="$unix_path"
23649   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23650     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23651     new_path="$unix_path"
23652   fi
23653 
23654     # remove trailing .exe if any
23655     new_path="${new_path/%.exe/}"
23656 
23657     # Save the first 10 bytes of this path to the storage, so fixpath can work.
23658     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23659   fi
23660 
23661   else
23662     # We're on a posix platform. Hooray! :)
23663     # First separate the path from the arguments. This will split at the first
23664     # space.
23665     complete="$RC"
23666     path="${complete%% *}"
23667     tmp="$complete EOL"
23668     arguments="${tmp#* }"
23669 
23670     # Cannot rely on the command "which" here since it doesn't always work.
23671     is_absolute_path=`$ECHO "$path" | $GREP ^/`
23672     if test -z "$is_absolute_path"; then
23673       # Path to executable is not absolute. Find it.
23674       IFS_save="$IFS"
23675       IFS=:
23676       for p in $PATH; do
23677         if test -f "$p/$path" && test -x "$p/$path"; then
23678           new_path="$p/$path"
23679           break
23680         fi
23681       done
23682       IFS="$IFS_save"
23683     else
23684       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
23685 $as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
23686       new_path="$path"
23687     fi
23688 
23689     if test "x$new_path" = x; then
23690         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23691 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23692         has_space=`$ECHO "$complete" | $GREP " "`
23693         if test "x$has_space" != x; then
23694           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23695 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23696         fi
23697         as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23698       fi
23699   fi
23700 
23701       # Now join together the path and the arguments once again
23702       if test "x$arguments" != xEOL; then
23703         new_complete="$new_path ${arguments% *}"
23704       else
23705         new_complete="$new_path"
23706       fi
23707 
23708   if test "x$complete" != "x$new_complete"; then
23709       RC="$new_complete"
23710       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
23711 $as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
23712     fi
23713 
23714 
23715     # For hotspot, we need these in Windows mixed path,
23716     # so rewrite them all. Need added .exe suffix.
23717     HOTSPOT_CXX="$CXX.exe"
23718     HOTSPOT_LD="$LD.exe"
23719     HOTSPOT_MT="$MT.exe"
23720     HOTSPOT_RC="$RC.exe"
23721 
23722   unix_path="$HOTSPOT_CXX"
23723   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23724     windows_path=`$CYGPATH -m "$unix_path"`
23725     HOTSPOT_CXX="$windows_path"
23726   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23727     windows_path=`cmd //c echo $unix_path`
23728     HOTSPOT_CXX="$windows_path"
23729   fi
23730 
23731 
23732   unix_path="$HOTSPOT_LD"
23733   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23734     windows_path=`$CYGPATH -m "$unix_path"`
23735     HOTSPOT_LD="$windows_path"
23736   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23737     windows_path=`cmd //c echo $unix_path`
23738     HOTSPOT_LD="$windows_path"
23739   fi
23740 
23741 
23742   unix_path="$HOTSPOT_MT"
23743   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23744     windows_path=`$CYGPATH -m "$unix_path"`
23745     HOTSPOT_MT="$windows_path"
23746   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23747     windows_path=`cmd //c echo $unix_path`
23748     HOTSPOT_MT="$windows_path"
23749   fi
23750 
23751 
23752   unix_path="$HOTSPOT_RC"
23753   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23754     windows_path=`$CYGPATH -m "$unix_path"`
23755     HOTSPOT_RC="$windows_path"
23756   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23757     windows_path=`cmd //c echo $unix_path`
23758     HOTSPOT_RC="$windows_path"
23759   fi
23760 
23761 
23762 
23763 
23764     RC_FLAGS="-nologo -l 0x409 -r"
23765     if test "x$VARIANT" = xOPT; then :
23766 
23767         RC_FLAGS="$RC_FLAGS -d NDEBUG"
23768 
23769 fi
23770     JDK_UPDATE_VERSION_NOTNULL=$JDK_UPDATE_VERSION
23771     if test "x$JDK_UPDATE_VERSION" = x; then :
23772 
23773         JDK_UPDATE_VERSION_NOTNULL=0
23774 
23775 fi
23776     RC_FLAGS="$RC_FLAGS -d \"JDK_BUILD_ID=$FULL_VERSION\""
23777     RC_FLAGS="$RC_FLAGS -d \"JDK_COMPANY=$COMPANY_NAME\""
23778     RC_FLAGS="$RC_FLAGS -d \"JDK_COMPONENT=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME binary\""
23779     RC_FLAGS="$RC_FLAGS -d \"JDK_VER=$JDK_MINOR_VERSION.$JDK_MICRO_VERSION.$JDK_UPDATE_VERSION_NOTNULL.$COOKED_BUILD_NUMBER\""
23780     RC_FLAGS="$RC_FLAGS -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\""
23781     RC_FLAGS="$RC_FLAGS -d \"JDK_NAME=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME $JDK_MINOR_VERSION $JDK_UPDATE_META_TAG\""
23782     RC_FLAGS="$RC_FLAGS -d \"JDK_FVER=$JDK_MINOR_VERSION,$JDK_MICRO_VERSION,$JDK_UPDATE_VERSION_NOTNULL,$COOKED_BUILD_NUMBER\""
23783 
23784     # lib.exe is used to create static libraries.
23785     # Extract the first word of "lib", so it can be a program name with args.
23786 set dummy lib; ac_word=$2
23787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23788 $as_echo_n "checking for $ac_word... " >&6; }
23789 if ${ac_cv_prog_WINAR+:} false; then :
23790   $as_echo_n "(cached) " >&6
23791 else
23792   if test -n "$WINAR"; then
23793   ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
23794 else
23795 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23796 for as_dir in $PATH
23797 do
23798   IFS=$as_save_IFS
23799   test -z "$as_dir" && as_dir=.
23800     for ac_exec_ext in '' $ac_executable_extensions; do
23801   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23802     ac_cv_prog_WINAR="lib"
23803     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23804     break 2
23805   fi
23806 done
23807   done
23808 IFS=$as_save_IFS
23809 
23810 fi
23811 fi
23812 WINAR=$ac_cv_prog_WINAR
23813 if test -n "$WINAR"; then
23814   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
23815 $as_echo "$WINAR" >&6; }
23816 else
23817   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23818 $as_echo "no" >&6; }
23819 fi
23820 
23821 
23822 
23823   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23824 
23825   # First separate the path from the arguments. This will split at the first
23826   # space.
23827   complete="$WINAR"
23828   path="${complete%% *}"
23829   tmp="$complete EOL"
23830   arguments="${tmp#* }"
23831 
23832   # Input might be given as Windows format, start by converting to
23833   # unix format.
23834   new_path=`$CYGPATH -u "$path"`
23835 
23836   # Now try to locate executable using which
23837   new_path=`$WHICH "$new_path" 2> /dev/null`
23838   # bat and cmd files are not always considered executable in cygwin causing which
23839   # to not find them
23840   if test "x$new_path" = x \
23841            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23842            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23843     new_path=`$CYGPATH -u "$path"`
23844   fi
23845   if test "x$new_path" = x; then
23846     # Oops. Which didn't find the executable.
23847     # The splitting of arguments from the executable at a space might have been incorrect,
23848     # since paths with space are more likely in Windows. Give it another try with the whole
23849     # argument.
23850     path="$complete"
23851     arguments="EOL"
23852     new_path=`$CYGPATH -u "$path"`
23853     new_path=`$WHICH "$new_path" 2> /dev/null`
23854     # bat and cmd files are not always considered executable in cygwin causing which
23855     # to not find them
23856     if test "x$new_path" = x \
23857              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23858              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23859       new_path=`$CYGPATH -u "$path"`
23860     fi
23861     if test "x$new_path" = x; then
23862       # It's still not found. Now this is an unrecoverable error.
23863       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23864 $as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23865       has_space=`$ECHO "$complete" | $GREP " "`
23866       if test "x$has_space" != x; then
23867         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23868 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23869       fi
23870       as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23871     fi
23872   fi
23873 
23874   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23875   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23876   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23877   # "foo.exe" is OK but "foo" is an error.
23878   #
23879   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23880   # It is also a way to make sure we got the proper file name for the real test later on.
23881   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23882   if test "x$test_shortpath" = x; then
23883     # Short path failed, file does not exist as specified.
23884     # Try adding .exe or .cmd
23885     if test -f "${new_path}.exe"; then
23886        input_to_shortpath="${new_path}.exe"
23887     elif test -f "${new_path}.cmd"; then
23888        input_to_shortpath="${new_path}.cmd"
23889     else
23890       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
23891 $as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
23892       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23893 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23894       as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23895     fi
23896   else
23897     input_to_shortpath="$new_path"
23898   fi
23899 
23900   # Call helper function which possibly converts this using DOS-style short mode.
23901   # If so, the updated path is stored in $new_path.
23902   new_path="$input_to_shortpath"
23903 
23904   input_path="$input_to_shortpath"
23905   # Check if we need to convert this using DOS-style short mode. If the path
23906   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23907   # take no chances and rewrite it.
23908   # Note: m4 eats our [], so we need to use [ and ] instead.
23909   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23910   if test "x$has_forbidden_chars" != x; then
23911     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23912     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23913     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23914     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23915       # Going to short mode and back again did indeed matter. Since short mode is
23916       # case insensitive, let's make it lowercase to improve readability.
23917       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23918       # Now convert it back to Unix-stile (cygpath)
23919       input_path=`$CYGPATH -u "$shortmode_path"`
23920       new_path="$input_path"
23921     fi
23922   fi
23923 
23924   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23925   if test "x$test_cygdrive_prefix" = x; then
23926     # As a simple fix, exclude /usr/bin since it's not a real path.
23927     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23928       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23929       # a path prefixed by /cygdrive for fixpath to work.
23930       new_path="$CYGWIN_ROOT_PATH$input_path"
23931     fi
23932   fi
23933 
23934   # remove trailing .exe if any
23935   new_path="${new_path/%.exe/}"
23936 
23937   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23938 
23939   # First separate the path from the arguments. This will split at the first
23940   # space.
23941   complete="$WINAR"
23942   path="${complete%% *}"
23943   tmp="$complete EOL"
23944   arguments="${tmp#* }"
23945 
23946   # Input might be given as Windows format, start by converting to
23947   # unix format.
23948   new_path="$path"
23949 
23950   windows_path="$new_path"
23951   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23952     unix_path=`$CYGPATH -u "$windows_path"`
23953     new_path="$unix_path"
23954   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23955     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23956     new_path="$unix_path"
23957   fi
23958 
23959 
23960   # Now try to locate executable using which
23961   new_path=`$WHICH "$new_path" 2> /dev/null`
23962 
23963   if test "x$new_path" = x; then
23964     # Oops. Which didn't find the executable.
23965     # The splitting of arguments from the executable at a space might have been incorrect,
23966     # since paths with space are more likely in Windows. Give it another try with the whole
23967     # argument.
23968     path="$complete"
23969     arguments="EOL"
23970     new_path="$path"
23971 
23972   windows_path="$new_path"
23973   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23974     unix_path=`$CYGPATH -u "$windows_path"`
23975     new_path="$unix_path"
23976   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23977     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23978     new_path="$unix_path"
23979   fi
23980 
23981 
23982     new_path=`$WHICH "$new_path" 2> /dev/null`
23983 
23984     if test "x$new_path" = x; then
23985       # It's still not found. Now this is an unrecoverable error.
23986       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23987 $as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23988       has_space=`$ECHO "$complete" | $GREP " "`
23989       if test "x$has_space" != x; then
23990         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23991 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23992       fi
23993       as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23994     fi
23995   fi
23996 
23997   # Now new_path has a complete unix path to the binary
23998   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23999     # Keep paths in /bin as-is, but remove trailing .exe if any
24000     new_path="${new_path/%.exe/}"
24001     # Do not save /bin paths to all_fixpath_prefixes!
24002   else
24003     # Not in mixed or Windows style, start by that.
24004     new_path=`cmd //c echo $new_path`
24005 
24006   input_path="$new_path"
24007   # Check if we need to convert this using DOS-style short mode. If the path
24008   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24009   # take no chances and rewrite it.
24010   # Note: m4 eats our [], so we need to use [ and ] instead.
24011   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24012   if test "x$has_forbidden_chars" != x; then
24013     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24014     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24015   fi
24016 
24017     # Output is in $new_path
24018 
24019   windows_path="$new_path"
24020   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24021     unix_path=`$CYGPATH -u "$windows_path"`
24022     new_path="$unix_path"
24023   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24024     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24025     new_path="$unix_path"
24026   fi
24027 
24028     # remove trailing .exe if any
24029     new_path="${new_path/%.exe/}"
24030 
24031     # Save the first 10 bytes of this path to the storage, so fixpath can work.
24032     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24033   fi
24034 
24035   else
24036     # We're on a posix platform. Hooray! :)
24037     # First separate the path from the arguments. This will split at the first
24038     # space.
24039     complete="$WINAR"
24040     path="${complete%% *}"
24041     tmp="$complete EOL"
24042     arguments="${tmp#* }"
24043 
24044     # Cannot rely on the command "which" here since it doesn't always work.
24045     is_absolute_path=`$ECHO "$path" | $GREP ^/`
24046     if test -z "$is_absolute_path"; then
24047       # Path to executable is not absolute. Find it.
24048       IFS_save="$IFS"
24049       IFS=:
24050       for p in $PATH; do
24051         if test -f "$p/$path" && test -x "$p/$path"; then
24052           new_path="$p/$path"
24053           break
24054         fi
24055       done
24056       IFS="$IFS_save"
24057     else
24058       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
24059 $as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
24060       new_path="$path"
24061     fi
24062 
24063     if test "x$new_path" = x; then
24064         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
24065 $as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
24066         has_space=`$ECHO "$complete" | $GREP " "`
24067         if test "x$has_space" != x; then
24068           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24069 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24070         fi
24071         as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24072       fi
24073   fi
24074 
24075       # Now join together the path and the arguments once again
24076       if test "x$arguments" != xEOL; then
24077         new_complete="$new_path ${arguments% *}"
24078       else
24079         new_complete="$new_path"
24080       fi
24081 
24082   if test "x$complete" != "x$new_complete"; then
24083       WINAR="$new_complete"
24084       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
24085 $as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
24086     fi
24087 
24088     AR="$WINAR"
24089     ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
24090 
24091     # Extract the first word of "dumpbin", so it can be a program name with args.
24092 set dummy dumpbin; ac_word=$2
24093 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24094 $as_echo_n "checking for $ac_word... " >&6; }
24095 if ${ac_cv_prog_DUMPBIN+:} false; then :
24096   $as_echo_n "(cached) " >&6
24097 else
24098   if test -n "$DUMPBIN"; then
24099   ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
24100 else
24101 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24102 for as_dir in $PATH
24103 do
24104   IFS=$as_save_IFS
24105   test -z "$as_dir" && as_dir=.
24106     for ac_exec_ext in '' $ac_executable_extensions; do
24107   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24108     ac_cv_prog_DUMPBIN="dumpbin"
24109     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24110     break 2
24111   fi
24112 done
24113   done
24114 IFS=$as_save_IFS
24115 
24116 fi
24117 fi
24118 DUMPBIN=$ac_cv_prog_DUMPBIN
24119 if test -n "$DUMPBIN"; then
24120   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
24121 $as_echo "$DUMPBIN" >&6; }
24122 else
24123   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24124 $as_echo "no" >&6; }
24125 fi
24126 
24127 
24128 
24129   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24130 
24131   # First separate the path from the arguments. This will split at the first
24132   # space.
24133   complete="$DUMPBIN"
24134   path="${complete%% *}"
24135   tmp="$complete EOL"
24136   arguments="${tmp#* }"
24137 
24138   # Input might be given as Windows format, start by converting to
24139   # unix format.
24140   new_path=`$CYGPATH -u "$path"`
24141 
24142   # Now try to locate executable using which
24143   new_path=`$WHICH "$new_path" 2> /dev/null`
24144   # bat and cmd files are not always considered executable in cygwin causing which
24145   # to not find them
24146   if test "x$new_path" = x \
24147            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24148            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24149     new_path=`$CYGPATH -u "$path"`
24150   fi
24151   if test "x$new_path" = x; then
24152     # Oops. Which didn't find the executable.
24153     # The splitting of arguments from the executable at a space might have been incorrect,
24154     # since paths with space are more likely in Windows. Give it another try with the whole
24155     # argument.
24156     path="$complete"
24157     arguments="EOL"
24158     new_path=`$CYGPATH -u "$path"`
24159     new_path=`$WHICH "$new_path" 2> /dev/null`
24160     # bat and cmd files are not always considered executable in cygwin causing which
24161     # to not find them
24162     if test "x$new_path" = x \
24163              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24164              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24165       new_path=`$CYGPATH -u "$path"`
24166     fi
24167     if test "x$new_path" = x; then
24168       # It's still not found. Now this is an unrecoverable error.
24169       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24170 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24171       has_space=`$ECHO "$complete" | $GREP " "`
24172       if test "x$has_space" != x; then
24173         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24174 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24175       fi
24176       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24177     fi
24178   fi
24179 
24180   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24181   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24182   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24183   # "foo.exe" is OK but "foo" is an error.
24184   #
24185   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24186   # It is also a way to make sure we got the proper file name for the real test later on.
24187   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24188   if test "x$test_shortpath" = x; then
24189     # Short path failed, file does not exist as specified.
24190     # Try adding .exe or .cmd
24191     if test -f "${new_path}.exe"; then
24192        input_to_shortpath="${new_path}.exe"
24193     elif test -f "${new_path}.cmd"; then
24194        input_to_shortpath="${new_path}.cmd"
24195     else
24196       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
24197 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
24198       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24199 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24200       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24201     fi
24202   else
24203     input_to_shortpath="$new_path"
24204   fi
24205 
24206   # Call helper function which possibly converts this using DOS-style short mode.
24207   # If so, the updated path is stored in $new_path.
24208   new_path="$input_to_shortpath"
24209 
24210   input_path="$input_to_shortpath"
24211   # Check if we need to convert this using DOS-style short mode. If the path
24212   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24213   # take no chances and rewrite it.
24214   # Note: m4 eats our [], so we need to use [ and ] instead.
24215   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24216   if test "x$has_forbidden_chars" != x; then
24217     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24218     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24219     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24220     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24221       # Going to short mode and back again did indeed matter. Since short mode is
24222       # case insensitive, let's make it lowercase to improve readability.
24223       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24224       # Now convert it back to Unix-stile (cygpath)
24225       input_path=`$CYGPATH -u "$shortmode_path"`
24226       new_path="$input_path"
24227     fi
24228   fi
24229 
24230   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24231   if test "x$test_cygdrive_prefix" = x; then
24232     # As a simple fix, exclude /usr/bin since it's not a real path.
24233     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24234       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24235       # a path prefixed by /cygdrive for fixpath to work.
24236       new_path="$CYGWIN_ROOT_PATH$input_path"
24237     fi
24238   fi
24239 
24240   # remove trailing .exe if any
24241   new_path="${new_path/%.exe/}"
24242 
24243   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24244 
24245   # First separate the path from the arguments. This will split at the first
24246   # space.
24247   complete="$DUMPBIN"
24248   path="${complete%% *}"
24249   tmp="$complete EOL"
24250   arguments="${tmp#* }"
24251 
24252   # Input might be given as Windows format, start by converting to
24253   # unix format.
24254   new_path="$path"
24255 
24256   windows_path="$new_path"
24257   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24258     unix_path=`$CYGPATH -u "$windows_path"`
24259     new_path="$unix_path"
24260   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24261     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24262     new_path="$unix_path"
24263   fi
24264 
24265 
24266   # Now try to locate executable using which
24267   new_path=`$WHICH "$new_path" 2> /dev/null`
24268 
24269   if test "x$new_path" = x; then
24270     # Oops. Which didn't find the executable.
24271     # The splitting of arguments from the executable at a space might have been incorrect,
24272     # since paths with space are more likely in Windows. Give it another try with the whole
24273     # argument.
24274     path="$complete"
24275     arguments="EOL"
24276     new_path="$path"
24277 
24278   windows_path="$new_path"
24279   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24280     unix_path=`$CYGPATH -u "$windows_path"`
24281     new_path="$unix_path"
24282   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24283     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24284     new_path="$unix_path"
24285   fi
24286 
24287 
24288     new_path=`$WHICH "$new_path" 2> /dev/null`
24289 
24290     if test "x$new_path" = x; then
24291       # It's still not found. Now this is an unrecoverable error.
24292       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24293 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24294       has_space=`$ECHO "$complete" | $GREP " "`
24295       if test "x$has_space" != x; then
24296         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24297 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24298       fi
24299       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24300     fi
24301   fi
24302 
24303   # Now new_path has a complete unix path to the binary
24304   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24305     # Keep paths in /bin as-is, but remove trailing .exe if any
24306     new_path="${new_path/%.exe/}"
24307     # Do not save /bin paths to all_fixpath_prefixes!
24308   else
24309     # Not in mixed or Windows style, start by that.
24310     new_path=`cmd //c echo $new_path`
24311 
24312   input_path="$new_path"
24313   # Check if we need to convert this using DOS-style short mode. If the path
24314   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24315   # take no chances and rewrite it.
24316   # Note: m4 eats our [], so we need to use [ and ] instead.
24317   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24318   if test "x$has_forbidden_chars" != x; then
24319     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24320     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24321   fi
24322 
24323     # Output is in $new_path
24324 
24325   windows_path="$new_path"
24326   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24327     unix_path=`$CYGPATH -u "$windows_path"`
24328     new_path="$unix_path"
24329   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24330     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24331     new_path="$unix_path"
24332   fi
24333 
24334     # remove trailing .exe if any
24335     new_path="${new_path/%.exe/}"
24336 
24337     # Save the first 10 bytes of this path to the storage, so fixpath can work.
24338     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24339   fi
24340 
24341   else
24342     # We're on a posix platform. Hooray! :)
24343     # First separate the path from the arguments. This will split at the first
24344     # space.
24345     complete="$DUMPBIN"
24346     path="${complete%% *}"
24347     tmp="$complete EOL"
24348     arguments="${tmp#* }"
24349 
24350     # Cannot rely on the command "which" here since it doesn't always work.
24351     is_absolute_path=`$ECHO "$path" | $GREP ^/`
24352     if test -z "$is_absolute_path"; then
24353       # Path to executable is not absolute. Find it.
24354       IFS_save="$IFS"
24355       IFS=:
24356       for p in $PATH; do
24357         if test -f "$p/$path" && test -x "$p/$path"; then
24358           new_path="$p/$path"
24359           break
24360         fi
24361       done
24362       IFS="$IFS_save"
24363     else
24364       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5
24365 $as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;}
24366       new_path="$path"
24367     fi
24368 
24369     if test "x$new_path" = x; then
24370         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24371 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24372         has_space=`$ECHO "$complete" | $GREP " "`
24373         if test "x$has_space" != x; then
24374           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24375 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24376         fi
24377         as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24378       fi
24379   fi
24380 
24381       # Now join together the path and the arguments once again
24382       if test "x$arguments" != xEOL; then
24383         new_complete="$new_path ${arguments% *}"
24384       else
24385         new_complete="$new_path"
24386       fi
24387 
24388   if test "x$complete" != "x$new_complete"; then
24389       DUMPBIN="$new_complete"
24390       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
24391 $as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
24392     fi
24393 
24394 
24395     COMPILER_TYPE=CL
24396     CCXXFLAGS="$CCXXFLAGS -nologo"
24397 
24398 fi
24399 
24400 
24401 
24402 ac_ext=c
24403 ac_cpp='$CPP $CPPFLAGS'
24404 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24405 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24406 ac_compiler_gnu=$ac_cv_c_compiler_gnu
24407 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
24408 $as_echo_n "checking how to run the C preprocessor... " >&6; }
24409 # On Suns, sometimes $CPP names a directory.
24410 if test -n "$CPP" && test -d "$CPP"; then
24411   CPP=
24412 fi
24413 if test -z "$CPP"; then
24414   if ${ac_cv_prog_CPP+:} false; then :
24415   $as_echo_n "(cached) " >&6
24416 else
24417       # Double quotes because CPP needs to be expanded
24418     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
24419     do
24420       ac_preproc_ok=false
24421 for ac_c_preproc_warn_flag in '' yes
24422 do
24423   # Use a header file that comes with gcc, so configuring glibc
24424   # with a fresh cross-compiler works.
24425   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24426   # <limits.h> exists even on freestanding compilers.
24427   # On the NeXT, cc -E runs the code through the compiler's parser,
24428   # not just through cpp. "Syntax error" is here to catch this case.
24429   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24430 /* end confdefs.h.  */
24431 #ifdef __STDC__
24432 # include <limits.h>
24433 #else
24434 # include <assert.h>
24435 #endif
24436                      Syntax error
24437 _ACEOF
24438 if ac_fn_c_try_cpp "$LINENO"; then :
24439 
24440 else
24441   # Broken: fails on valid input.
24442 continue
24443 fi
24444 rm -f conftest.err conftest.i conftest.$ac_ext
24445 
24446   # OK, works on sane cases.  Now check whether nonexistent headers
24447   # can be detected and how.
24448   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24449 /* end confdefs.h.  */
24450 #include <ac_nonexistent.h>
24451 _ACEOF
24452 if ac_fn_c_try_cpp "$LINENO"; then :
24453   # Broken: success on invalid input.
24454 continue
24455 else
24456   # Passes both tests.
24457 ac_preproc_ok=:
24458 break
24459 fi
24460 rm -f conftest.err conftest.i conftest.$ac_ext
24461 
24462 done
24463 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24464 rm -f conftest.i conftest.err conftest.$ac_ext
24465 if $ac_preproc_ok; then :
24466   break
24467 fi
24468 
24469     done
24470     ac_cv_prog_CPP=$CPP
24471 
24472 fi
24473   CPP=$ac_cv_prog_CPP
24474 else
24475   ac_cv_prog_CPP=$CPP
24476 fi
24477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
24478 $as_echo "$CPP" >&6; }
24479 ac_preproc_ok=false
24480 for ac_c_preproc_warn_flag in '' yes
24481 do
24482   # Use a header file that comes with gcc, so configuring glibc
24483   # with a fresh cross-compiler works.
24484   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24485   # <limits.h> exists even on freestanding compilers.
24486   # On the NeXT, cc -E runs the code through the compiler's parser,
24487   # not just through cpp. "Syntax error" is here to catch this case.
24488   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24489 /* end confdefs.h.  */
24490 #ifdef __STDC__
24491 # include <limits.h>
24492 #else
24493 # include <assert.h>
24494 #endif
24495                      Syntax error
24496 _ACEOF
24497 if ac_fn_c_try_cpp "$LINENO"; then :
24498 
24499 else
24500   # Broken: fails on valid input.
24501 continue
24502 fi
24503 rm -f conftest.err conftest.i conftest.$ac_ext
24504 
24505   # OK, works on sane cases.  Now check whether nonexistent headers
24506   # can be detected and how.
24507   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24508 /* end confdefs.h.  */
24509 #include <ac_nonexistent.h>
24510 _ACEOF
24511 if ac_fn_c_try_cpp "$LINENO"; then :
24512   # Broken: success on invalid input.
24513 continue
24514 else
24515   # Passes both tests.
24516 ac_preproc_ok=:
24517 break
24518 fi
24519 rm -f conftest.err conftest.i conftest.$ac_ext
24520 
24521 done
24522 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24523 rm -f conftest.i conftest.err conftest.$ac_ext
24524 if $ac_preproc_ok; then :
24525 
24526 else
24527   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24528 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24529 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
24530 See \`config.log' for more details" "$LINENO" 5; }
24531 fi
24532 
24533 ac_ext=cpp
24534 ac_cpp='$CXXCPP $CPPFLAGS'
24535 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24536 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24537 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24538 
24539 
24540   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24541 
24542   # First separate the path from the arguments. This will split at the first
24543   # space.
24544   complete="$CPP"
24545   path="${complete%% *}"
24546   tmp="$complete EOL"
24547   arguments="${tmp#* }"
24548 
24549   # Input might be given as Windows format, start by converting to
24550   # unix format.
24551   new_path=`$CYGPATH -u "$path"`
24552 
24553   # Now try to locate executable using which
24554   new_path=`$WHICH "$new_path" 2> /dev/null`
24555   # bat and cmd files are not always considered executable in cygwin causing which
24556   # to not find them
24557   if test "x$new_path" = x \
24558            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24559            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24560     new_path=`$CYGPATH -u "$path"`
24561   fi
24562   if test "x$new_path" = x; then
24563     # Oops. Which didn't find the executable.
24564     # The splitting of arguments from the executable at a space might have been incorrect,
24565     # since paths with space are more likely in Windows. Give it another try with the whole
24566     # argument.
24567     path="$complete"
24568     arguments="EOL"
24569     new_path=`$CYGPATH -u "$path"`
24570     new_path=`$WHICH "$new_path" 2> /dev/null`
24571     # bat and cmd files are not always considered executable in cygwin causing which
24572     # to not find them
24573     if test "x$new_path" = x \
24574              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24575              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24576       new_path=`$CYGPATH -u "$path"`
24577     fi
24578     if test "x$new_path" = x; then
24579       # It's still not found. Now this is an unrecoverable error.
24580       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24581 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24582       has_space=`$ECHO "$complete" | $GREP " "`
24583       if test "x$has_space" != x; then
24584         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24585 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24586       fi
24587       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24588     fi
24589   fi
24590 
24591   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24592   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24593   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24594   # "foo.exe" is OK but "foo" is an error.
24595   #
24596   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24597   # It is also a way to make sure we got the proper file name for the real test later on.
24598   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24599   if test "x$test_shortpath" = x; then
24600     # Short path failed, file does not exist as specified.
24601     # Try adding .exe or .cmd
24602     if test -f "${new_path}.exe"; then
24603        input_to_shortpath="${new_path}.exe"
24604     elif test -f "${new_path}.cmd"; then
24605        input_to_shortpath="${new_path}.cmd"
24606     else
24607       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
24608 $as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
24609       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24610 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24611       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24612     fi
24613   else
24614     input_to_shortpath="$new_path"
24615   fi
24616 
24617   # Call helper function which possibly converts this using DOS-style short mode.
24618   # If so, the updated path is stored in $new_path.
24619   new_path="$input_to_shortpath"
24620 
24621   input_path="$input_to_shortpath"
24622   # Check if we need to convert this using DOS-style short mode. If the path
24623   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24624   # take no chances and rewrite it.
24625   # Note: m4 eats our [], so we need to use [ and ] instead.
24626   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24627   if test "x$has_forbidden_chars" != x; then
24628     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24629     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24630     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24631     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24632       # Going to short mode and back again did indeed matter. Since short mode is
24633       # case insensitive, let's make it lowercase to improve readability.
24634       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24635       # Now convert it back to Unix-stile (cygpath)
24636       input_path=`$CYGPATH -u "$shortmode_path"`
24637       new_path="$input_path"
24638     fi
24639   fi
24640 
24641   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24642   if test "x$test_cygdrive_prefix" = x; then
24643     # As a simple fix, exclude /usr/bin since it's not a real path.
24644     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24645       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24646       # a path prefixed by /cygdrive for fixpath to work.
24647       new_path="$CYGWIN_ROOT_PATH$input_path"
24648     fi
24649   fi
24650 
24651   # remove trailing .exe if any
24652   new_path="${new_path/%.exe/}"
24653 
24654   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24655 
24656   # First separate the path from the arguments. This will split at the first
24657   # space.
24658   complete="$CPP"
24659   path="${complete%% *}"
24660   tmp="$complete EOL"
24661   arguments="${tmp#* }"
24662 
24663   # Input might be given as Windows format, start by converting to
24664   # unix format.
24665   new_path="$path"
24666 
24667   windows_path="$new_path"
24668   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24669     unix_path=`$CYGPATH -u "$windows_path"`
24670     new_path="$unix_path"
24671   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24672     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24673     new_path="$unix_path"
24674   fi
24675 
24676 
24677   # Now try to locate executable using which
24678   new_path=`$WHICH "$new_path" 2> /dev/null`
24679 
24680   if test "x$new_path" = x; then
24681     # Oops. Which didn't find the executable.
24682     # The splitting of arguments from the executable at a space might have been incorrect,
24683     # since paths with space are more likely in Windows. Give it another try with the whole
24684     # argument.
24685     path="$complete"
24686     arguments="EOL"
24687     new_path="$path"
24688 
24689   windows_path="$new_path"
24690   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24691     unix_path=`$CYGPATH -u "$windows_path"`
24692     new_path="$unix_path"
24693   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24694     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24695     new_path="$unix_path"
24696   fi
24697 
24698 
24699     new_path=`$WHICH "$new_path" 2> /dev/null`
24700 
24701     if test "x$new_path" = x; then
24702       # It's still not found. Now this is an unrecoverable error.
24703       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24704 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24705       has_space=`$ECHO "$complete" | $GREP " "`
24706       if test "x$has_space" != x; then
24707         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24708 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24709       fi
24710       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24711     fi
24712   fi
24713 
24714   # Now new_path has a complete unix path to the binary
24715   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24716     # Keep paths in /bin as-is, but remove trailing .exe if any
24717     new_path="${new_path/%.exe/}"
24718     # Do not save /bin paths to all_fixpath_prefixes!
24719   else
24720     # Not in mixed or Windows style, start by that.
24721     new_path=`cmd //c echo $new_path`
24722 
24723   input_path="$new_path"
24724   # Check if we need to convert this using DOS-style short mode. If the path
24725   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24726   # take no chances and rewrite it.
24727   # Note: m4 eats our [], so we need to use [ and ] instead.
24728   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24729   if test "x$has_forbidden_chars" != x; then
24730     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24731     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24732   fi
24733 
24734     # Output is in $new_path
24735 
24736   windows_path="$new_path"
24737   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24738     unix_path=`$CYGPATH -u "$windows_path"`
24739     new_path="$unix_path"
24740   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24741     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24742     new_path="$unix_path"
24743   fi
24744 
24745     # remove trailing .exe if any
24746     new_path="${new_path/%.exe/}"
24747 
24748     # Save the first 10 bytes of this path to the storage, so fixpath can work.
24749     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24750   fi
24751 
24752   else
24753     # We're on a posix platform. Hooray! :)
24754     # First separate the path from the arguments. This will split at the first
24755     # space.
24756     complete="$CPP"
24757     path="${complete%% *}"
24758     tmp="$complete EOL"
24759     arguments="${tmp#* }"
24760 
24761     # Cannot rely on the command "which" here since it doesn't always work.
24762     is_absolute_path=`$ECHO "$path" | $GREP ^/`
24763     if test -z "$is_absolute_path"; then
24764       # Path to executable is not absolute. Find it.
24765       IFS_save="$IFS"
24766       IFS=:
24767       for p in $PATH; do
24768         if test -f "$p/$path" && test -x "$p/$path"; then
24769           new_path="$p/$path"
24770           break
24771         fi
24772       done
24773       IFS="$IFS_save"
24774     else
24775       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5
24776 $as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;}
24777       new_path="$path"
24778     fi
24779 
24780     if test "x$new_path" = x; then
24781         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24782 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24783         has_space=`$ECHO "$complete" | $GREP " "`
24784         if test "x$has_space" != x; then
24785           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24786 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24787         fi
24788         as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24789       fi
24790   fi
24791 
24792       # Now join together the path and the arguments once again
24793       if test "x$arguments" != xEOL; then
24794         new_complete="$new_path ${arguments% *}"
24795       else
24796         new_complete="$new_path"
24797       fi
24798 
24799   if test "x$complete" != "x$new_complete"; then
24800       CPP="$new_complete"
24801       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
24802 $as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
24803     fi
24804 
24805 
24806 ac_ext=cpp
24807 ac_cpp='$CXXCPP $CPPFLAGS'
24808 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24809 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24810 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
24812 $as_echo_n "checking how to run the C++ preprocessor... " >&6; }
24813 if test -z "$CXXCPP"; then
24814   if ${ac_cv_prog_CXXCPP+:} false; then :
24815   $as_echo_n "(cached) " >&6
24816 else
24817       # Double quotes because CXXCPP needs to be expanded
24818     for CXXCPP in "$CXX -E" "/lib/cpp"
24819     do
24820       ac_preproc_ok=false
24821 for ac_cxx_preproc_warn_flag in '' yes
24822 do
24823   # Use a header file that comes with gcc, so configuring glibc
24824   # with a fresh cross-compiler works.
24825   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24826   # <limits.h> exists even on freestanding compilers.
24827   # On the NeXT, cc -E runs the code through the compiler's parser,
24828   # not just through cpp. "Syntax error" is here to catch this case.
24829   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24830 /* end confdefs.h.  */
24831 #ifdef __STDC__
24832 # include <limits.h>
24833 #else
24834 # include <assert.h>
24835 #endif
24836                      Syntax error
24837 _ACEOF
24838 if ac_fn_cxx_try_cpp "$LINENO"; then :
24839 
24840 else
24841   # Broken: fails on valid input.
24842 continue
24843 fi
24844 rm -f conftest.err conftest.i conftest.$ac_ext
24845 
24846   # OK, works on sane cases.  Now check whether nonexistent headers
24847   # can be detected and how.
24848   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24849 /* end confdefs.h.  */
24850 #include <ac_nonexistent.h>
24851 _ACEOF
24852 if ac_fn_cxx_try_cpp "$LINENO"; then :
24853   # Broken: success on invalid input.
24854 continue
24855 else
24856   # Passes both tests.
24857 ac_preproc_ok=:
24858 break
24859 fi
24860 rm -f conftest.err conftest.i conftest.$ac_ext
24861 
24862 done
24863 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24864 rm -f conftest.i conftest.err conftest.$ac_ext
24865 if $ac_preproc_ok; then :
24866   break
24867 fi
24868 
24869     done
24870     ac_cv_prog_CXXCPP=$CXXCPP
24871 
24872 fi
24873   CXXCPP=$ac_cv_prog_CXXCPP
24874 else
24875   ac_cv_prog_CXXCPP=$CXXCPP
24876 fi
24877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
24878 $as_echo "$CXXCPP" >&6; }
24879 ac_preproc_ok=false
24880 for ac_cxx_preproc_warn_flag in '' yes
24881 do
24882   # Use a header file that comes with gcc, so configuring glibc
24883   # with a fresh cross-compiler works.
24884   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24885   # <limits.h> exists even on freestanding compilers.
24886   # On the NeXT, cc -E runs the code through the compiler's parser,
24887   # not just through cpp. "Syntax error" is here to catch this case.
24888   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24889 /* end confdefs.h.  */
24890 #ifdef __STDC__
24891 # include <limits.h>
24892 #else
24893 # include <assert.h>
24894 #endif
24895                      Syntax error
24896 _ACEOF
24897 if ac_fn_cxx_try_cpp "$LINENO"; then :
24898 
24899 else
24900   # Broken: fails on valid input.
24901 continue
24902 fi
24903 rm -f conftest.err conftest.i conftest.$ac_ext
24904 
24905   # OK, works on sane cases.  Now check whether nonexistent headers
24906   # can be detected and how.
24907   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24908 /* end confdefs.h.  */
24909 #include <ac_nonexistent.h>
24910 _ACEOF
24911 if ac_fn_cxx_try_cpp "$LINENO"; then :
24912   # Broken: success on invalid input.
24913 continue
24914 else
24915   # Passes both tests.
24916 ac_preproc_ok=:
24917 break
24918 fi
24919 rm -f conftest.err conftest.i conftest.$ac_ext
24920 
24921 done
24922 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24923 rm -f conftest.i conftest.err conftest.$ac_ext
24924 if $ac_preproc_ok; then :
24925 
24926 else
24927   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24928 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24929 as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
24930 See \`config.log' for more details" "$LINENO" 5; }
24931 fi
24932 
24933 ac_ext=cpp
24934 ac_cpp='$CXXCPP $CPPFLAGS'
24935 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24936 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24937 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24938 
24939 
24940   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24941 
24942   # First separate the path from the arguments. This will split at the first
24943   # space.
24944   complete="$CXXCPP"
24945   path="${complete%% *}"
24946   tmp="$complete EOL"
24947   arguments="${tmp#* }"
24948 
24949   # Input might be given as Windows format, start by converting to
24950   # unix format.
24951   new_path=`$CYGPATH -u "$path"`
24952 
24953   # Now try to locate executable using which
24954   new_path=`$WHICH "$new_path" 2> /dev/null`
24955   # bat and cmd files are not always considered executable in cygwin causing which
24956   # to not find them
24957   if test "x$new_path" = x \
24958            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24959            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24960     new_path=`$CYGPATH -u "$path"`
24961   fi
24962   if test "x$new_path" = x; then
24963     # Oops. Which didn't find the executable.
24964     # The splitting of arguments from the executable at a space might have been incorrect,
24965     # since paths with space are more likely in Windows. Give it another try with the whole
24966     # argument.
24967     path="$complete"
24968     arguments="EOL"
24969     new_path=`$CYGPATH -u "$path"`
24970     new_path=`$WHICH "$new_path" 2> /dev/null`
24971     # bat and cmd files are not always considered executable in cygwin causing which
24972     # to not find them
24973     if test "x$new_path" = x \
24974              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24975              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24976       new_path=`$CYGPATH -u "$path"`
24977     fi
24978     if test "x$new_path" = x; then
24979       # It's still not found. Now this is an unrecoverable error.
24980       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24981 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24982       has_space=`$ECHO "$complete" | $GREP " "`
24983       if test "x$has_space" != x; then
24984         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24985 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24986       fi
24987       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24988     fi
24989   fi
24990 
24991   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24992   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24993   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24994   # "foo.exe" is OK but "foo" is an error.
24995   #
24996   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24997   # It is also a way to make sure we got the proper file name for the real test later on.
24998   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24999   if test "x$test_shortpath" = x; then
25000     # Short path failed, file does not exist as specified.
25001     # Try adding .exe or .cmd
25002     if test -f "${new_path}.exe"; then
25003        input_to_shortpath="${new_path}.exe"
25004     elif test -f "${new_path}.cmd"; then
25005        input_to_shortpath="${new_path}.cmd"
25006     else
25007       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
25008 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
25009       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25010 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25011       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25012     fi
25013   else
25014     input_to_shortpath="$new_path"
25015   fi
25016 
25017   # Call helper function which possibly converts this using DOS-style short mode.
25018   # If so, the updated path is stored in $new_path.
25019   new_path="$input_to_shortpath"
25020 
25021   input_path="$input_to_shortpath"
25022   # Check if we need to convert this using DOS-style short mode. If the path
25023   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25024   # take no chances and rewrite it.
25025   # Note: m4 eats our [], so we need to use [ and ] instead.
25026   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25027   if test "x$has_forbidden_chars" != x; then
25028     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25029     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25030     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25031     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25032       # Going to short mode and back again did indeed matter. Since short mode is
25033       # case insensitive, let's make it lowercase to improve readability.
25034       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25035       # Now convert it back to Unix-stile (cygpath)
25036       input_path=`$CYGPATH -u "$shortmode_path"`
25037       new_path="$input_path"
25038     fi
25039   fi
25040 
25041   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25042   if test "x$test_cygdrive_prefix" = x; then
25043     # As a simple fix, exclude /usr/bin since it's not a real path.
25044     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25045       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25046       # a path prefixed by /cygdrive for fixpath to work.
25047       new_path="$CYGWIN_ROOT_PATH$input_path"
25048     fi
25049   fi
25050 
25051   # remove trailing .exe if any
25052   new_path="${new_path/%.exe/}"
25053 
25054   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25055 
25056   # First separate the path from the arguments. This will split at the first
25057   # space.
25058   complete="$CXXCPP"
25059   path="${complete%% *}"
25060   tmp="$complete EOL"
25061   arguments="${tmp#* }"
25062 
25063   # Input might be given as Windows format, start by converting to
25064   # unix format.
25065   new_path="$path"
25066 
25067   windows_path="$new_path"
25068   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25069     unix_path=`$CYGPATH -u "$windows_path"`
25070     new_path="$unix_path"
25071   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25072     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25073     new_path="$unix_path"
25074   fi
25075 
25076 
25077   # Now try to locate executable using which
25078   new_path=`$WHICH "$new_path" 2> /dev/null`
25079 
25080   if test "x$new_path" = x; then
25081     # Oops. Which didn't find the executable.
25082     # The splitting of arguments from the executable at a space might have been incorrect,
25083     # since paths with space are more likely in Windows. Give it another try with the whole
25084     # argument.
25085     path="$complete"
25086     arguments="EOL"
25087     new_path="$path"
25088 
25089   windows_path="$new_path"
25090   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25091     unix_path=`$CYGPATH -u "$windows_path"`
25092     new_path="$unix_path"
25093   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25094     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25095     new_path="$unix_path"
25096   fi
25097 
25098 
25099     new_path=`$WHICH "$new_path" 2> /dev/null`
25100 
25101     if test "x$new_path" = x; then
25102       # It's still not found. Now this is an unrecoverable error.
25103       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25104 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25105       has_space=`$ECHO "$complete" | $GREP " "`
25106       if test "x$has_space" != x; then
25107         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25108 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25109       fi
25110       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25111     fi
25112   fi
25113 
25114   # Now new_path has a complete unix path to the binary
25115   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25116     # Keep paths in /bin as-is, but remove trailing .exe if any
25117     new_path="${new_path/%.exe/}"
25118     # Do not save /bin paths to all_fixpath_prefixes!
25119   else
25120     # Not in mixed or Windows style, start by that.
25121     new_path=`cmd //c echo $new_path`
25122 
25123   input_path="$new_path"
25124   # Check if we need to convert this using DOS-style short mode. If the path
25125   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25126   # take no chances and rewrite it.
25127   # Note: m4 eats our [], so we need to use [ and ] instead.
25128   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25129   if test "x$has_forbidden_chars" != x; then
25130     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25131     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25132   fi
25133 
25134     # Output is in $new_path
25135 
25136   windows_path="$new_path"
25137   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25138     unix_path=`$CYGPATH -u "$windows_path"`
25139     new_path="$unix_path"
25140   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25141     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25142     new_path="$unix_path"
25143   fi
25144 
25145     # remove trailing .exe if any
25146     new_path="${new_path/%.exe/}"
25147 
25148     # Save the first 10 bytes of this path to the storage, so fixpath can work.
25149     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25150   fi
25151 
25152   else
25153     # We're on a posix platform. Hooray! :)
25154     # First separate the path from the arguments. This will split at the first
25155     # space.
25156     complete="$CXXCPP"
25157     path="${complete%% *}"
25158     tmp="$complete EOL"
25159     arguments="${tmp#* }"
25160 
25161     # Cannot rely on the command "which" here since it doesn't always work.
25162     is_absolute_path=`$ECHO "$path" | $GREP ^/`
25163     if test -z "$is_absolute_path"; then
25164       # Path to executable is not absolute. Find it.
25165       IFS_save="$IFS"
25166       IFS=:
25167       for p in $PATH; do
25168         if test -f "$p/$path" && test -x "$p/$path"; then
25169           new_path="$p/$path"
25170           break
25171         fi
25172       done
25173       IFS="$IFS_save"
25174     else
25175       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5
25176 $as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;}
25177       new_path="$path"
25178     fi
25179 
25180     if test "x$new_path" = x; then
25181         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25182 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25183         has_space=`$ECHO "$complete" | $GREP " "`
25184         if test "x$has_space" != x; then
25185           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25186 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25187         fi
25188         as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25189       fi
25190   fi
25191 
25192       # Now join together the path and the arguments once again
25193       if test "x$arguments" != xEOL; then
25194         new_complete="$new_path ${arguments% *}"
25195       else
25196         new_complete="$new_path"
25197       fi
25198 
25199   if test "x$complete" != "x$new_complete"; then
25200       CXXCPP="$new_complete"
25201       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
25202 $as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
25203     fi
25204 
25205 
25206 if test "x$COMPILE_TYPE" != "xcross"; then
25207     # If we are not cross compiling, use the same compilers for
25208     # building the build platform executables. The cross-compilation
25209     # case needed to be done earlier, but this can only be done after
25210     # the native tools have been localized.
25211     BUILD_CC="$CC"
25212     BUILD_CXX="$CXX"
25213     BUILD_LD="$LD"
25214 fi
25215 
25216 # for solaris we really need solaris tools, and not gnu equivalent
25217 #   these seems to normally reside in /usr/ccs/bin so add that to path before
25218 #   starting to probe
25219 #
25220 #   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
25221 #         so that it can be overriden --with-tools-dir
25222 if test "x$OPENJDK_BUILD_OS" = xsolaris; then
25223     PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
25224 fi
25225 
25226 # Find the right assembler.
25227 if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25228     # Extract the first word of "as", so it can be a program name with args.
25229 set dummy as; ac_word=$2
25230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25231 $as_echo_n "checking for $ac_word... " >&6; }
25232 if ${ac_cv_path_AS+:} false; then :
25233   $as_echo_n "(cached) " >&6
25234 else
25235   case $AS in
25236   [\\/]* | ?:[\\/]*)
25237   ac_cv_path_AS="$AS" # Let the user override the test with a path.
25238   ;;
25239   *)
25240   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25241 for as_dir in $PATH
25242 do
25243   IFS=$as_save_IFS
25244   test -z "$as_dir" && as_dir=.
25245     for ac_exec_ext in '' $ac_executable_extensions; do
25246   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25247     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
25248     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25249     break 2
25250   fi
25251 done
25252   done
25253 IFS=$as_save_IFS
25254 
25255   ;;
25256 esac
25257 fi
25258 AS=$ac_cv_path_AS
25259 if test -n "$AS"; then
25260   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
25261 $as_echo "$AS" >&6; }
25262 else
25263   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25264 $as_echo "no" >&6; }
25265 fi
25266 
25267 
25268 
25269   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25270 
25271   # First separate the path from the arguments. This will split at the first
25272   # space.
25273   complete="$AS"
25274   path="${complete%% *}"
25275   tmp="$complete EOL"
25276   arguments="${tmp#* }"
25277 
25278   # Input might be given as Windows format, start by converting to
25279   # unix format.
25280   new_path=`$CYGPATH -u "$path"`
25281 
25282   # Now try to locate executable using which
25283   new_path=`$WHICH "$new_path" 2> /dev/null`
25284   # bat and cmd files are not always considered executable in cygwin causing which
25285   # to not find them
25286   if test "x$new_path" = x \
25287            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25288            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25289     new_path=`$CYGPATH -u "$path"`
25290   fi
25291   if test "x$new_path" = x; then
25292     # Oops. Which didn't find the executable.
25293     # The splitting of arguments from the executable at a space might have been incorrect,
25294     # since paths with space are more likely in Windows. Give it another try with the whole
25295     # argument.
25296     path="$complete"
25297     arguments="EOL"
25298     new_path=`$CYGPATH -u "$path"`
25299     new_path=`$WHICH "$new_path" 2> /dev/null`
25300     # bat and cmd files are not always considered executable in cygwin causing which
25301     # to not find them
25302     if test "x$new_path" = x \
25303              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25304              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25305       new_path=`$CYGPATH -u "$path"`
25306     fi
25307     if test "x$new_path" = x; then
25308       # It's still not found. Now this is an unrecoverable error.
25309       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25310 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25311       has_space=`$ECHO "$complete" | $GREP " "`
25312       if test "x$has_space" != x; then
25313         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25314 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25315       fi
25316       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25317     fi
25318   fi
25319 
25320   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25321   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25322   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25323   # "foo.exe" is OK but "foo" is an error.
25324   #
25325   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25326   # It is also a way to make sure we got the proper file name for the real test later on.
25327   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25328   if test "x$test_shortpath" = x; then
25329     # Short path failed, file does not exist as specified.
25330     # Try adding .exe or .cmd
25331     if test -f "${new_path}.exe"; then
25332        input_to_shortpath="${new_path}.exe"
25333     elif test -f "${new_path}.cmd"; then
25334        input_to_shortpath="${new_path}.cmd"
25335     else
25336       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
25337 $as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
25338       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25339 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25340       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25341     fi
25342   else
25343     input_to_shortpath="$new_path"
25344   fi
25345 
25346   # Call helper function which possibly converts this using DOS-style short mode.
25347   # If so, the updated path is stored in $new_path.
25348   new_path="$input_to_shortpath"
25349 
25350   input_path="$input_to_shortpath"
25351   # Check if we need to convert this using DOS-style short mode. If the path
25352   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25353   # take no chances and rewrite it.
25354   # Note: m4 eats our [], so we need to use [ and ] instead.
25355   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25356   if test "x$has_forbidden_chars" != x; then
25357     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25358     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25359     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25360     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25361       # Going to short mode and back again did indeed matter. Since short mode is
25362       # case insensitive, let's make it lowercase to improve readability.
25363       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25364       # Now convert it back to Unix-stile (cygpath)
25365       input_path=`$CYGPATH -u "$shortmode_path"`
25366       new_path="$input_path"
25367     fi
25368   fi
25369 
25370   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25371   if test "x$test_cygdrive_prefix" = x; then
25372     # As a simple fix, exclude /usr/bin since it's not a real path.
25373     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25374       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25375       # a path prefixed by /cygdrive for fixpath to work.
25376       new_path="$CYGWIN_ROOT_PATH$input_path"
25377     fi
25378   fi
25379 
25380   # remove trailing .exe if any
25381   new_path="${new_path/%.exe/}"
25382 
25383   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25384 
25385   # First separate the path from the arguments. This will split at the first
25386   # space.
25387   complete="$AS"
25388   path="${complete%% *}"
25389   tmp="$complete EOL"
25390   arguments="${tmp#* }"
25391 
25392   # Input might be given as Windows format, start by converting to
25393   # unix format.
25394   new_path="$path"
25395 
25396   windows_path="$new_path"
25397   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25398     unix_path=`$CYGPATH -u "$windows_path"`
25399     new_path="$unix_path"
25400   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25401     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25402     new_path="$unix_path"
25403   fi
25404 
25405 
25406   # Now try to locate executable using which
25407   new_path=`$WHICH "$new_path" 2> /dev/null`
25408 
25409   if test "x$new_path" = x; then
25410     # Oops. Which didn't find the executable.
25411     # The splitting of arguments from the executable at a space might have been incorrect,
25412     # since paths with space are more likely in Windows. Give it another try with the whole
25413     # argument.
25414     path="$complete"
25415     arguments="EOL"
25416     new_path="$path"
25417 
25418   windows_path="$new_path"
25419   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25420     unix_path=`$CYGPATH -u "$windows_path"`
25421     new_path="$unix_path"
25422   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25423     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25424     new_path="$unix_path"
25425   fi
25426 
25427 
25428     new_path=`$WHICH "$new_path" 2> /dev/null`
25429 
25430     if test "x$new_path" = x; then
25431       # It's still not found. Now this is an unrecoverable error.
25432       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25433 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25434       has_space=`$ECHO "$complete" | $GREP " "`
25435       if test "x$has_space" != x; then
25436         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25437 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25438       fi
25439       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25440     fi
25441   fi
25442 
25443   # Now new_path has a complete unix path to the binary
25444   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25445     # Keep paths in /bin as-is, but remove trailing .exe if any
25446     new_path="${new_path/%.exe/}"
25447     # Do not save /bin paths to all_fixpath_prefixes!
25448   else
25449     # Not in mixed or Windows style, start by that.
25450     new_path=`cmd //c echo $new_path`
25451 
25452   input_path="$new_path"
25453   # Check if we need to convert this using DOS-style short mode. If the path
25454   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25455   # take no chances and rewrite it.
25456   # Note: m4 eats our [], so we need to use [ and ] instead.
25457   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25458   if test "x$has_forbidden_chars" != x; then
25459     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25460     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25461   fi
25462 
25463     # Output is in $new_path
25464 
25465   windows_path="$new_path"
25466   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25467     unix_path=`$CYGPATH -u "$windows_path"`
25468     new_path="$unix_path"
25469   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25470     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25471     new_path="$unix_path"
25472   fi
25473 
25474     # remove trailing .exe if any
25475     new_path="${new_path/%.exe/}"
25476 
25477     # Save the first 10 bytes of this path to the storage, so fixpath can work.
25478     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25479   fi
25480 
25481   else
25482     # We're on a posix platform. Hooray! :)
25483     # First separate the path from the arguments. This will split at the first
25484     # space.
25485     complete="$AS"
25486     path="${complete%% *}"
25487     tmp="$complete EOL"
25488     arguments="${tmp#* }"
25489 
25490     # Cannot rely on the command "which" here since it doesn't always work.
25491     is_absolute_path=`$ECHO "$path" | $GREP ^/`
25492     if test -z "$is_absolute_path"; then
25493       # Path to executable is not absolute. Find it.
25494       IFS_save="$IFS"
25495       IFS=:
25496       for p in $PATH; do
25497         if test -f "$p/$path" && test -x "$p/$path"; then
25498           new_path="$p/$path"
25499           break
25500         fi
25501       done
25502       IFS="$IFS_save"
25503     else
25504       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5
25505 $as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;}
25506       new_path="$path"
25507     fi
25508 
25509     if test "x$new_path" = x; then
25510         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25511 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25512         has_space=`$ECHO "$complete" | $GREP " "`
25513         if test "x$has_space" != x; then
25514           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25515 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25516         fi
25517         as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25518       fi
25519   fi
25520 
25521       # Now join together the path and the arguments once again
25522       if test "x$arguments" != xEOL; then
25523         new_complete="$new_path ${arguments% *}"
25524       else
25525         new_complete="$new_path"
25526       fi
25527 
25528   if test "x$complete" != "x$new_complete"; then
25529       AS="$new_complete"
25530       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
25531 $as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
25532     fi
25533 
25534 else
25535     AS="$CC -c"
25536 fi
25537 
25538 
25539 if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25540     # Extract the first word of "nm", so it can be a program name with args.
25541 set dummy nm; ac_word=$2
25542 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25543 $as_echo_n "checking for $ac_word... " >&6; }
25544 if ${ac_cv_path_NM+:} false; then :
25545   $as_echo_n "(cached) " >&6
25546 else
25547   case $NM in
25548   [\\/]* | ?:[\\/]*)
25549   ac_cv_path_NM="$NM" # Let the user override the test with a path.
25550   ;;
25551   *)
25552   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25553 for as_dir in $PATH
25554 do
25555   IFS=$as_save_IFS
25556   test -z "$as_dir" && as_dir=.
25557     for ac_exec_ext in '' $ac_executable_extensions; do
25558   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25559     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
25560     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25561     break 2
25562   fi
25563 done
25564   done
25565 IFS=$as_save_IFS
25566 
25567   ;;
25568 esac
25569 fi
25570 NM=$ac_cv_path_NM
25571 if test -n "$NM"; then
25572   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
25573 $as_echo "$NM" >&6; }
25574 else
25575   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25576 $as_echo "no" >&6; }
25577 fi
25578 
25579 
25580 
25581   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25582 
25583   # First separate the path from the arguments. This will split at the first
25584   # space.
25585   complete="$NM"
25586   path="${complete%% *}"
25587   tmp="$complete EOL"
25588   arguments="${tmp#* }"
25589 
25590   # Input might be given as Windows format, start by converting to
25591   # unix format.
25592   new_path=`$CYGPATH -u "$path"`
25593 
25594   # Now try to locate executable using which
25595   new_path=`$WHICH "$new_path" 2> /dev/null`
25596   # bat and cmd files are not always considered executable in cygwin causing which
25597   # to not find them
25598   if test "x$new_path" = x \
25599            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25600            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25601     new_path=`$CYGPATH -u "$path"`
25602   fi
25603   if test "x$new_path" = x; then
25604     # Oops. Which didn't find the executable.
25605     # The splitting of arguments from the executable at a space might have been incorrect,
25606     # since paths with space are more likely in Windows. Give it another try with the whole
25607     # argument.
25608     path="$complete"
25609     arguments="EOL"
25610     new_path=`$CYGPATH -u "$path"`
25611     new_path=`$WHICH "$new_path" 2> /dev/null`
25612     # bat and cmd files are not always considered executable in cygwin causing which
25613     # to not find them
25614     if test "x$new_path" = x \
25615              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25616              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25617       new_path=`$CYGPATH -u "$path"`
25618     fi
25619     if test "x$new_path" = x; then
25620       # It's still not found. Now this is an unrecoverable error.
25621       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25622 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25623       has_space=`$ECHO "$complete" | $GREP " "`
25624       if test "x$has_space" != x; then
25625         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25626 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25627       fi
25628       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25629     fi
25630   fi
25631 
25632   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25633   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25634   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25635   # "foo.exe" is OK but "foo" is an error.
25636   #
25637   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25638   # It is also a way to make sure we got the proper file name for the real test later on.
25639   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25640   if test "x$test_shortpath" = x; then
25641     # Short path failed, file does not exist as specified.
25642     # Try adding .exe or .cmd
25643     if test -f "${new_path}.exe"; then
25644        input_to_shortpath="${new_path}.exe"
25645     elif test -f "${new_path}.cmd"; then
25646        input_to_shortpath="${new_path}.cmd"
25647     else
25648       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
25649 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
25650       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25651 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25652       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25653     fi
25654   else
25655     input_to_shortpath="$new_path"
25656   fi
25657 
25658   # Call helper function which possibly converts this using DOS-style short mode.
25659   # If so, the updated path is stored in $new_path.
25660   new_path="$input_to_shortpath"
25661 
25662   input_path="$input_to_shortpath"
25663   # Check if we need to convert this using DOS-style short mode. If the path
25664   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25665   # take no chances and rewrite it.
25666   # Note: m4 eats our [], so we need to use [ and ] instead.
25667   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25668   if test "x$has_forbidden_chars" != x; then
25669     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25670     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25671     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25672     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25673       # Going to short mode and back again did indeed matter. Since short mode is
25674       # case insensitive, let's make it lowercase to improve readability.
25675       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25676       # Now convert it back to Unix-stile (cygpath)
25677       input_path=`$CYGPATH -u "$shortmode_path"`
25678       new_path="$input_path"
25679     fi
25680   fi
25681 
25682   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25683   if test "x$test_cygdrive_prefix" = x; then
25684     # As a simple fix, exclude /usr/bin since it's not a real path.
25685     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25686       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25687       # a path prefixed by /cygdrive for fixpath to work.
25688       new_path="$CYGWIN_ROOT_PATH$input_path"
25689     fi
25690   fi
25691 
25692   # remove trailing .exe if any
25693   new_path="${new_path/%.exe/}"
25694 
25695   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25696 
25697   # First separate the path from the arguments. This will split at the first
25698   # space.
25699   complete="$NM"
25700   path="${complete%% *}"
25701   tmp="$complete EOL"
25702   arguments="${tmp#* }"
25703 
25704   # Input might be given as Windows format, start by converting to
25705   # unix format.
25706   new_path="$path"
25707 
25708   windows_path="$new_path"
25709   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25710     unix_path=`$CYGPATH -u "$windows_path"`
25711     new_path="$unix_path"
25712   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25713     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25714     new_path="$unix_path"
25715   fi
25716 
25717 
25718   # Now try to locate executable using which
25719   new_path=`$WHICH "$new_path" 2> /dev/null`
25720 
25721   if test "x$new_path" = x; then
25722     # Oops. Which didn't find the executable.
25723     # The splitting of arguments from the executable at a space might have been incorrect,
25724     # since paths with space are more likely in Windows. Give it another try with the whole
25725     # argument.
25726     path="$complete"
25727     arguments="EOL"
25728     new_path="$path"
25729 
25730   windows_path="$new_path"
25731   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25732     unix_path=`$CYGPATH -u "$windows_path"`
25733     new_path="$unix_path"
25734   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25735     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25736     new_path="$unix_path"
25737   fi
25738 
25739 
25740     new_path=`$WHICH "$new_path" 2> /dev/null`
25741 
25742     if test "x$new_path" = x; then
25743       # It's still not found. Now this is an unrecoverable error.
25744       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25745 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25746       has_space=`$ECHO "$complete" | $GREP " "`
25747       if test "x$has_space" != x; then
25748         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25749 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25750       fi
25751       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25752     fi
25753   fi
25754 
25755   # Now new_path has a complete unix path to the binary
25756   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25757     # Keep paths in /bin as-is, but remove trailing .exe if any
25758     new_path="${new_path/%.exe/}"
25759     # Do not save /bin paths to all_fixpath_prefixes!
25760   else
25761     # Not in mixed or Windows style, start by that.
25762     new_path=`cmd //c echo $new_path`
25763 
25764   input_path="$new_path"
25765   # Check if we need to convert this using DOS-style short mode. If the path
25766   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25767   # take no chances and rewrite it.
25768   # Note: m4 eats our [], so we need to use [ and ] instead.
25769   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25770   if test "x$has_forbidden_chars" != x; then
25771     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25772     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25773   fi
25774 
25775     # Output is in $new_path
25776 
25777   windows_path="$new_path"
25778   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25779     unix_path=`$CYGPATH -u "$windows_path"`
25780     new_path="$unix_path"
25781   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25782     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25783     new_path="$unix_path"
25784   fi
25785 
25786     # remove trailing .exe if any
25787     new_path="${new_path/%.exe/}"
25788 
25789     # Save the first 10 bytes of this path to the storage, so fixpath can work.
25790     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25791   fi
25792 
25793   else
25794     # We're on a posix platform. Hooray! :)
25795     # First separate the path from the arguments. This will split at the first
25796     # space.
25797     complete="$NM"
25798     path="${complete%% *}"
25799     tmp="$complete EOL"
25800     arguments="${tmp#* }"
25801 
25802     # Cannot rely on the command "which" here since it doesn't always work.
25803     is_absolute_path=`$ECHO "$path" | $GREP ^/`
25804     if test -z "$is_absolute_path"; then
25805       # Path to executable is not absolute. Find it.
25806       IFS_save="$IFS"
25807       IFS=:
25808       for p in $PATH; do
25809         if test -f "$p/$path" && test -x "$p/$path"; then
25810           new_path="$p/$path"
25811           break
25812         fi
25813       done
25814       IFS="$IFS_save"
25815     else
25816       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
25817 $as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
25818       new_path="$path"
25819     fi
25820 
25821     if test "x$new_path" = x; then
25822         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25823 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25824         has_space=`$ECHO "$complete" | $GREP " "`
25825         if test "x$has_space" != x; then
25826           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25827 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25828         fi
25829         as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25830       fi
25831   fi
25832 
25833       # Now join together the path and the arguments once again
25834       if test "x$arguments" != xEOL; then
25835         new_complete="$new_path ${arguments% *}"
25836       else
25837         new_complete="$new_path"
25838       fi
25839 
25840   if test "x$complete" != "x$new_complete"; then
25841       NM="$new_complete"
25842       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
25843 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
25844     fi
25845 
25846     # Extract the first word of "gnm", so it can be a program name with args.
25847 set dummy gnm; ac_word=$2
25848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25849 $as_echo_n "checking for $ac_word... " >&6; }
25850 if ${ac_cv_path_GNM+:} false; then :
25851   $as_echo_n "(cached) " >&6
25852 else
25853   case $GNM in
25854   [\\/]* | ?:[\\/]*)
25855   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
25856   ;;
25857   *)
25858   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25859 for as_dir in $PATH
25860 do
25861   IFS=$as_save_IFS
25862   test -z "$as_dir" && as_dir=.
25863     for ac_exec_ext in '' $ac_executable_extensions; do
25864   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25865     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
25866     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25867     break 2
25868   fi
25869 done
25870   done
25871 IFS=$as_save_IFS
25872 
25873   ;;
25874 esac
25875 fi
25876 GNM=$ac_cv_path_GNM
25877 if test -n "$GNM"; then
25878   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
25879 $as_echo "$GNM" >&6; }
25880 else
25881   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25882 $as_echo "no" >&6; }
25883 fi
25884 
25885 
25886 
25887   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25888 
25889   # First separate the path from the arguments. This will split at the first
25890   # space.
25891   complete="$GNM"
25892   path="${complete%% *}"
25893   tmp="$complete EOL"
25894   arguments="${tmp#* }"
25895 
25896   # Input might be given as Windows format, start by converting to
25897   # unix format.
25898   new_path=`$CYGPATH -u "$path"`
25899 
25900   # Now try to locate executable using which
25901   new_path=`$WHICH "$new_path" 2> /dev/null`
25902   # bat and cmd files are not always considered executable in cygwin causing which
25903   # to not find them
25904   if test "x$new_path" = x \
25905            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25906            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25907     new_path=`$CYGPATH -u "$path"`
25908   fi
25909   if test "x$new_path" = x; then
25910     # Oops. Which didn't find the executable.
25911     # The splitting of arguments from the executable at a space might have been incorrect,
25912     # since paths with space are more likely in Windows. Give it another try with the whole
25913     # argument.
25914     path="$complete"
25915     arguments="EOL"
25916     new_path=`$CYGPATH -u "$path"`
25917     new_path=`$WHICH "$new_path" 2> /dev/null`
25918     # bat and cmd files are not always considered executable in cygwin causing which
25919     # to not find them
25920     if test "x$new_path" = x \
25921              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25922              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25923       new_path=`$CYGPATH -u "$path"`
25924     fi
25925     if test "x$new_path" = x; then
25926       # It's still not found. Now this is an unrecoverable error.
25927       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
25928 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
25929       has_space=`$ECHO "$complete" | $GREP " "`
25930       if test "x$has_space" != x; then
25931         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25932 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25933       fi
25934       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
25935     fi
25936   fi
25937 
25938   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25939   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25940   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25941   # "foo.exe" is OK but "foo" is an error.
25942   #
25943   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25944   # It is also a way to make sure we got the proper file name for the real test later on.
25945   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25946   if test "x$test_shortpath" = x; then
25947     # Short path failed, file does not exist as specified.
25948     # Try adding .exe or .cmd
25949     if test -f "${new_path}.exe"; then
25950        input_to_shortpath="${new_path}.exe"
25951     elif test -f "${new_path}.cmd"; then
25952        input_to_shortpath="${new_path}.cmd"
25953     else
25954       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
25955 $as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
25956       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25957 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25958       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
25959     fi
25960   else
25961     input_to_shortpath="$new_path"
25962   fi
25963 
25964   # Call helper function which possibly converts this using DOS-style short mode.
25965   # If so, the updated path is stored in $new_path.
25966   new_path="$input_to_shortpath"
25967 
25968   input_path="$input_to_shortpath"
25969   # Check if we need to convert this using DOS-style short mode. If the path
25970   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25971   # take no chances and rewrite it.
25972   # Note: m4 eats our [], so we need to use [ and ] instead.
25973   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25974   if test "x$has_forbidden_chars" != x; then
25975     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25976     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25977     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25978     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25979       # Going to short mode and back again did indeed matter. Since short mode is
25980       # case insensitive, let's make it lowercase to improve readability.
25981       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25982       # Now convert it back to Unix-stile (cygpath)
25983       input_path=`$CYGPATH -u "$shortmode_path"`
25984       new_path="$input_path"
25985     fi
25986   fi
25987 
25988   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25989   if test "x$test_cygdrive_prefix" = x; then
25990     # As a simple fix, exclude /usr/bin since it's not a real path.
25991     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25992       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25993       # a path prefixed by /cygdrive for fixpath to work.
25994       new_path="$CYGWIN_ROOT_PATH$input_path"
25995     fi
25996   fi
25997 
25998   # remove trailing .exe if any
25999   new_path="${new_path/%.exe/}"
26000 
26001   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26002 
26003   # First separate the path from the arguments. This will split at the first
26004   # space.
26005   complete="$GNM"
26006   path="${complete%% *}"
26007   tmp="$complete EOL"
26008   arguments="${tmp#* }"
26009 
26010   # Input might be given as Windows format, start by converting to
26011   # unix format.
26012   new_path="$path"
26013 
26014   windows_path="$new_path"
26015   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26016     unix_path=`$CYGPATH -u "$windows_path"`
26017     new_path="$unix_path"
26018   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26019     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26020     new_path="$unix_path"
26021   fi
26022 
26023 
26024   # Now try to locate executable using which
26025   new_path=`$WHICH "$new_path" 2> /dev/null`
26026 
26027   if test "x$new_path" = x; then
26028     # Oops. Which didn't find the executable.
26029     # The splitting of arguments from the executable at a space might have been incorrect,
26030     # since paths with space are more likely in Windows. Give it another try with the whole
26031     # argument.
26032     path="$complete"
26033     arguments="EOL"
26034     new_path="$path"
26035 
26036   windows_path="$new_path"
26037   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26038     unix_path=`$CYGPATH -u "$windows_path"`
26039     new_path="$unix_path"
26040   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26041     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26042     new_path="$unix_path"
26043   fi
26044 
26045 
26046     new_path=`$WHICH "$new_path" 2> /dev/null`
26047 
26048     if test "x$new_path" = x; then
26049       # It's still not found. Now this is an unrecoverable error.
26050       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26051 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26052       has_space=`$ECHO "$complete" | $GREP " "`
26053       if test "x$has_space" != x; then
26054         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26055 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26056       fi
26057       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26058     fi
26059   fi
26060 
26061   # Now new_path has a complete unix path to the binary
26062   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26063     # Keep paths in /bin as-is, but remove trailing .exe if any
26064     new_path="${new_path/%.exe/}"
26065     # Do not save /bin paths to all_fixpath_prefixes!
26066   else
26067     # Not in mixed or Windows style, start by that.
26068     new_path=`cmd //c echo $new_path`
26069 
26070   input_path="$new_path"
26071   # Check if we need to convert this using DOS-style short mode. If the path
26072   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26073   # take no chances and rewrite it.
26074   # Note: m4 eats our [], so we need to use [ and ] instead.
26075   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26076   if test "x$has_forbidden_chars" != x; then
26077     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26078     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26079   fi
26080 
26081     # Output is in $new_path
26082 
26083   windows_path="$new_path"
26084   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26085     unix_path=`$CYGPATH -u "$windows_path"`
26086     new_path="$unix_path"
26087   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26088     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26089     new_path="$unix_path"
26090   fi
26091 
26092     # remove trailing .exe if any
26093     new_path="${new_path/%.exe/}"
26094 
26095     # Save the first 10 bytes of this path to the storage, so fixpath can work.
26096     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26097   fi
26098 
26099   else
26100     # We're on a posix platform. Hooray! :)
26101     # First separate the path from the arguments. This will split at the first
26102     # space.
26103     complete="$GNM"
26104     path="${complete%% *}"
26105     tmp="$complete EOL"
26106     arguments="${tmp#* }"
26107 
26108     # Cannot rely on the command "which" here since it doesn't always work.
26109     is_absolute_path=`$ECHO "$path" | $GREP ^/`
26110     if test -z "$is_absolute_path"; then
26111       # Path to executable is not absolute. Find it.
26112       IFS_save="$IFS"
26113       IFS=:
26114       for p in $PATH; do
26115         if test -f "$p/$path" && test -x "$p/$path"; then
26116           new_path="$p/$path"
26117           break
26118         fi
26119       done
26120       IFS="$IFS_save"
26121     else
26122       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving GNM (as $path) failed, using $path directly." >&5
26123 $as_echo "$as_me: Resolving GNM (as $path) failed, using $path directly." >&6;}
26124       new_path="$path"
26125     fi
26126 
26127     if test "x$new_path" = x; then
26128         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26129 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26130         has_space=`$ECHO "$complete" | $GREP " "`
26131         if test "x$has_space" != x; then
26132           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26133 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26134         fi
26135         as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26136       fi
26137   fi
26138 
26139       # Now join together the path and the arguments once again
26140       if test "x$arguments" != xEOL; then
26141         new_complete="$new_path ${arguments% *}"
26142       else
26143         new_complete="$new_path"
26144       fi
26145 
26146   if test "x$complete" != "x$new_complete"; then
26147       GNM="$new_complete"
26148       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
26149 $as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
26150     fi
26151 
26152     # Extract the first word of "strip", so it can be a program name with args.
26153 set dummy strip; ac_word=$2
26154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26155 $as_echo_n "checking for $ac_word... " >&6; }
26156 if ${ac_cv_path_STRIP+:} false; then :
26157   $as_echo_n "(cached) " >&6
26158 else
26159   case $STRIP in
26160   [\\/]* | ?:[\\/]*)
26161   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
26162   ;;
26163   *)
26164   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26165 for as_dir in $PATH
26166 do
26167   IFS=$as_save_IFS
26168   test -z "$as_dir" && as_dir=.
26169     for ac_exec_ext in '' $ac_executable_extensions; do
26170   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26171     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
26172     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26173     break 2
26174   fi
26175 done
26176   done
26177 IFS=$as_save_IFS
26178 
26179   ;;
26180 esac
26181 fi
26182 STRIP=$ac_cv_path_STRIP
26183 if test -n "$STRIP"; then
26184   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
26185 $as_echo "$STRIP" >&6; }
26186 else
26187   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26188 $as_echo "no" >&6; }
26189 fi
26190 
26191 
26192 
26193   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26194 
26195   # First separate the path from the arguments. This will split at the first
26196   # space.
26197   complete="$STRIP"
26198   path="${complete%% *}"
26199   tmp="$complete EOL"
26200   arguments="${tmp#* }"
26201 
26202   # Input might be given as Windows format, start by converting to
26203   # unix format.
26204   new_path=`$CYGPATH -u "$path"`
26205 
26206   # Now try to locate executable using which
26207   new_path=`$WHICH "$new_path" 2> /dev/null`
26208   # bat and cmd files are not always considered executable in cygwin causing which
26209   # to not find them
26210   if test "x$new_path" = x \
26211            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26212            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26213     new_path=`$CYGPATH -u "$path"`
26214   fi
26215   if test "x$new_path" = x; then
26216     # Oops. Which didn't find the executable.
26217     # The splitting of arguments from the executable at a space might have been incorrect,
26218     # since paths with space are more likely in Windows. Give it another try with the whole
26219     # argument.
26220     path="$complete"
26221     arguments="EOL"
26222     new_path=`$CYGPATH -u "$path"`
26223     new_path=`$WHICH "$new_path" 2> /dev/null`
26224     # bat and cmd files are not always considered executable in cygwin causing which
26225     # to not find them
26226     if test "x$new_path" = x \
26227              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26228              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26229       new_path=`$CYGPATH -u "$path"`
26230     fi
26231     if test "x$new_path" = x; then
26232       # It's still not found. Now this is an unrecoverable error.
26233       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26234 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26235       has_space=`$ECHO "$complete" | $GREP " "`
26236       if test "x$has_space" != x; then
26237         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26238 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26239       fi
26240       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26241     fi
26242   fi
26243 
26244   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26245   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26246   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26247   # "foo.exe" is OK but "foo" is an error.
26248   #
26249   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26250   # It is also a way to make sure we got the proper file name for the real test later on.
26251   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26252   if test "x$test_shortpath" = x; then
26253     # Short path failed, file does not exist as specified.
26254     # Try adding .exe or .cmd
26255     if test -f "${new_path}.exe"; then
26256        input_to_shortpath="${new_path}.exe"
26257     elif test -f "${new_path}.cmd"; then
26258        input_to_shortpath="${new_path}.cmd"
26259     else
26260       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
26261 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
26262       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26263 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26264       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26265     fi
26266   else
26267     input_to_shortpath="$new_path"
26268   fi
26269 
26270   # Call helper function which possibly converts this using DOS-style short mode.
26271   # If so, the updated path is stored in $new_path.
26272   new_path="$input_to_shortpath"
26273 
26274   input_path="$input_to_shortpath"
26275   # Check if we need to convert this using DOS-style short mode. If the path
26276   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26277   # take no chances and rewrite it.
26278   # Note: m4 eats our [], so we need to use [ and ] instead.
26279   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26280   if test "x$has_forbidden_chars" != x; then
26281     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26282     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26283     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26284     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26285       # Going to short mode and back again did indeed matter. Since short mode is
26286       # case insensitive, let's make it lowercase to improve readability.
26287       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26288       # Now convert it back to Unix-stile (cygpath)
26289       input_path=`$CYGPATH -u "$shortmode_path"`
26290       new_path="$input_path"
26291     fi
26292   fi
26293 
26294   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26295   if test "x$test_cygdrive_prefix" = x; then
26296     # As a simple fix, exclude /usr/bin since it's not a real path.
26297     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26298       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26299       # a path prefixed by /cygdrive for fixpath to work.
26300       new_path="$CYGWIN_ROOT_PATH$input_path"
26301     fi
26302   fi
26303 
26304   # remove trailing .exe if any
26305   new_path="${new_path/%.exe/}"
26306 
26307   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26308 
26309   # First separate the path from the arguments. This will split at the first
26310   # space.
26311   complete="$STRIP"
26312   path="${complete%% *}"
26313   tmp="$complete EOL"
26314   arguments="${tmp#* }"
26315 
26316   # Input might be given as Windows format, start by converting to
26317   # unix format.
26318   new_path="$path"
26319 
26320   windows_path="$new_path"
26321   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26322     unix_path=`$CYGPATH -u "$windows_path"`
26323     new_path="$unix_path"
26324   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26325     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26326     new_path="$unix_path"
26327   fi
26328 
26329 
26330   # Now try to locate executable using which
26331   new_path=`$WHICH "$new_path" 2> /dev/null`
26332 
26333   if test "x$new_path" = x; then
26334     # Oops. Which didn't find the executable.
26335     # The splitting of arguments from the executable at a space might have been incorrect,
26336     # since paths with space are more likely in Windows. Give it another try with the whole
26337     # argument.
26338     path="$complete"
26339     arguments="EOL"
26340     new_path="$path"
26341 
26342   windows_path="$new_path"
26343   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26344     unix_path=`$CYGPATH -u "$windows_path"`
26345     new_path="$unix_path"
26346   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26347     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26348     new_path="$unix_path"
26349   fi
26350 
26351 
26352     new_path=`$WHICH "$new_path" 2> /dev/null`
26353 
26354     if test "x$new_path" = x; then
26355       # It's still not found. Now this is an unrecoverable error.
26356       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26357 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26358       has_space=`$ECHO "$complete" | $GREP " "`
26359       if test "x$has_space" != x; then
26360         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26361 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26362       fi
26363       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26364     fi
26365   fi
26366 
26367   # Now new_path has a complete unix path to the binary
26368   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26369     # Keep paths in /bin as-is, but remove trailing .exe if any
26370     new_path="${new_path/%.exe/}"
26371     # Do not save /bin paths to all_fixpath_prefixes!
26372   else
26373     # Not in mixed or Windows style, start by that.
26374     new_path=`cmd //c echo $new_path`
26375 
26376   input_path="$new_path"
26377   # Check if we need to convert this using DOS-style short mode. If the path
26378   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26379   # take no chances and rewrite it.
26380   # Note: m4 eats our [], so we need to use [ and ] instead.
26381   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26382   if test "x$has_forbidden_chars" != x; then
26383     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26384     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26385   fi
26386 
26387     # Output is in $new_path
26388 
26389   windows_path="$new_path"
26390   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26391     unix_path=`$CYGPATH -u "$windows_path"`
26392     new_path="$unix_path"
26393   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26394     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26395     new_path="$unix_path"
26396   fi
26397 
26398     # remove trailing .exe if any
26399     new_path="${new_path/%.exe/}"
26400 
26401     # Save the first 10 bytes of this path to the storage, so fixpath can work.
26402     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26403   fi
26404 
26405   else
26406     # We're on a posix platform. Hooray! :)
26407     # First separate the path from the arguments. This will split at the first
26408     # space.
26409     complete="$STRIP"
26410     path="${complete%% *}"
26411     tmp="$complete EOL"
26412     arguments="${tmp#* }"
26413 
26414     # Cannot rely on the command "which" here since it doesn't always work.
26415     is_absolute_path=`$ECHO "$path" | $GREP ^/`
26416     if test -z "$is_absolute_path"; then
26417       # Path to executable is not absolute. Find it.
26418       IFS_save="$IFS"
26419       IFS=:
26420       for p in $PATH; do
26421         if test -f "$p/$path" && test -x "$p/$path"; then
26422           new_path="$p/$path"
26423           break
26424         fi
26425       done
26426       IFS="$IFS_save"
26427     else
26428       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
26429 $as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
26430       new_path="$path"
26431     fi
26432 
26433     if test "x$new_path" = x; then
26434         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26435 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26436         has_space=`$ECHO "$complete" | $GREP " "`
26437         if test "x$has_space" != x; then
26438           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26439 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26440         fi
26441         as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26442       fi
26443   fi
26444 
26445       # Now join together the path and the arguments once again
26446       if test "x$arguments" != xEOL; then
26447         new_complete="$new_path ${arguments% *}"
26448       else
26449         new_complete="$new_path"
26450       fi
26451 
26452   if test "x$complete" != "x$new_complete"; then
26453       STRIP="$new_complete"
26454       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
26455 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
26456     fi
26457 
26458     # Extract the first word of "mcs", so it can be a program name with args.
26459 set dummy mcs; ac_word=$2
26460 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26461 $as_echo_n "checking for $ac_word... " >&6; }
26462 if ${ac_cv_path_MCS+:} false; then :
26463   $as_echo_n "(cached) " >&6
26464 else
26465   case $MCS in
26466   [\\/]* | ?:[\\/]*)
26467   ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
26468   ;;
26469   *)
26470   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26471 for as_dir in $PATH
26472 do
26473   IFS=$as_save_IFS
26474   test -z "$as_dir" && as_dir=.
26475     for ac_exec_ext in '' $ac_executable_extensions; do
26476   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26477     ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
26478     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26479     break 2
26480   fi
26481 done
26482   done
26483 IFS=$as_save_IFS
26484 
26485   ;;
26486 esac
26487 fi
26488 MCS=$ac_cv_path_MCS
26489 if test -n "$MCS"; then
26490   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
26491 $as_echo "$MCS" >&6; }
26492 else
26493   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26494 $as_echo "no" >&6; }
26495 fi
26496 
26497 
26498 
26499   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26500 
26501   # First separate the path from the arguments. This will split at the first
26502   # space.
26503   complete="$MCS"
26504   path="${complete%% *}"
26505   tmp="$complete EOL"
26506   arguments="${tmp#* }"
26507 
26508   # Input might be given as Windows format, start by converting to
26509   # unix format.
26510   new_path=`$CYGPATH -u "$path"`
26511 
26512   # Now try to locate executable using which
26513   new_path=`$WHICH "$new_path" 2> /dev/null`
26514   # bat and cmd files are not always considered executable in cygwin causing which
26515   # to not find them
26516   if test "x$new_path" = x \
26517            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26518            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26519     new_path=`$CYGPATH -u "$path"`
26520   fi
26521   if test "x$new_path" = x; then
26522     # Oops. Which didn't find the executable.
26523     # The splitting of arguments from the executable at a space might have been incorrect,
26524     # since paths with space are more likely in Windows. Give it another try with the whole
26525     # argument.
26526     path="$complete"
26527     arguments="EOL"
26528     new_path=`$CYGPATH -u "$path"`
26529     new_path=`$WHICH "$new_path" 2> /dev/null`
26530     # bat and cmd files are not always considered executable in cygwin causing which
26531     # to not find them
26532     if test "x$new_path" = x \
26533              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26534              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26535       new_path=`$CYGPATH -u "$path"`
26536     fi
26537     if test "x$new_path" = x; then
26538       # It's still not found. Now this is an unrecoverable error.
26539       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26540 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26541       has_space=`$ECHO "$complete" | $GREP " "`
26542       if test "x$has_space" != x; then
26543         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26544 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26545       fi
26546       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26547     fi
26548   fi
26549 
26550   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26551   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26552   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26553   # "foo.exe" is OK but "foo" is an error.
26554   #
26555   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26556   # It is also a way to make sure we got the proper file name for the real test later on.
26557   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26558   if test "x$test_shortpath" = x; then
26559     # Short path failed, file does not exist as specified.
26560     # Try adding .exe or .cmd
26561     if test -f "${new_path}.exe"; then
26562        input_to_shortpath="${new_path}.exe"
26563     elif test -f "${new_path}.cmd"; then
26564        input_to_shortpath="${new_path}.cmd"
26565     else
26566       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
26567 $as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
26568       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26569 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26570       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26571     fi
26572   else
26573     input_to_shortpath="$new_path"
26574   fi
26575 
26576   # Call helper function which possibly converts this using DOS-style short mode.
26577   # If so, the updated path is stored in $new_path.
26578   new_path="$input_to_shortpath"
26579 
26580   input_path="$input_to_shortpath"
26581   # Check if we need to convert this using DOS-style short mode. If the path
26582   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26583   # take no chances and rewrite it.
26584   # Note: m4 eats our [], so we need to use [ and ] instead.
26585   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26586   if test "x$has_forbidden_chars" != x; then
26587     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26588     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26589     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26590     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26591       # Going to short mode and back again did indeed matter. Since short mode is
26592       # case insensitive, let's make it lowercase to improve readability.
26593       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26594       # Now convert it back to Unix-stile (cygpath)
26595       input_path=`$CYGPATH -u "$shortmode_path"`
26596       new_path="$input_path"
26597     fi
26598   fi
26599 
26600   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26601   if test "x$test_cygdrive_prefix" = x; then
26602     # As a simple fix, exclude /usr/bin since it's not a real path.
26603     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26604       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26605       # a path prefixed by /cygdrive for fixpath to work.
26606       new_path="$CYGWIN_ROOT_PATH$input_path"
26607     fi
26608   fi
26609 
26610   # remove trailing .exe if any
26611   new_path="${new_path/%.exe/}"
26612 
26613   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26614 
26615   # First separate the path from the arguments. This will split at the first
26616   # space.
26617   complete="$MCS"
26618   path="${complete%% *}"
26619   tmp="$complete EOL"
26620   arguments="${tmp#* }"
26621 
26622   # Input might be given as Windows format, start by converting to
26623   # unix format.
26624   new_path="$path"
26625 
26626   windows_path="$new_path"
26627   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26628     unix_path=`$CYGPATH -u "$windows_path"`
26629     new_path="$unix_path"
26630   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26631     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26632     new_path="$unix_path"
26633   fi
26634 
26635 
26636   # Now try to locate executable using which
26637   new_path=`$WHICH "$new_path" 2> /dev/null`
26638 
26639   if test "x$new_path" = x; then
26640     # Oops. Which didn't find the executable.
26641     # The splitting of arguments from the executable at a space might have been incorrect,
26642     # since paths with space are more likely in Windows. Give it another try with the whole
26643     # argument.
26644     path="$complete"
26645     arguments="EOL"
26646     new_path="$path"
26647 
26648   windows_path="$new_path"
26649   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26650     unix_path=`$CYGPATH -u "$windows_path"`
26651     new_path="$unix_path"
26652   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26653     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26654     new_path="$unix_path"
26655   fi
26656 
26657 
26658     new_path=`$WHICH "$new_path" 2> /dev/null`
26659 
26660     if test "x$new_path" = x; then
26661       # It's still not found. Now this is an unrecoverable error.
26662       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26663 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26664       has_space=`$ECHO "$complete" | $GREP " "`
26665       if test "x$has_space" != x; then
26666         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26667 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26668       fi
26669       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26670     fi
26671   fi
26672 
26673   # Now new_path has a complete unix path to the binary
26674   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26675     # Keep paths in /bin as-is, but remove trailing .exe if any
26676     new_path="${new_path/%.exe/}"
26677     # Do not save /bin paths to all_fixpath_prefixes!
26678   else
26679     # Not in mixed or Windows style, start by that.
26680     new_path=`cmd //c echo $new_path`
26681 
26682   input_path="$new_path"
26683   # Check if we need to convert this using DOS-style short mode. If the path
26684   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26685   # take no chances and rewrite it.
26686   # Note: m4 eats our [], so we need to use [ and ] instead.
26687   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26688   if test "x$has_forbidden_chars" != x; then
26689     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26690     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26691   fi
26692 
26693     # Output is in $new_path
26694 
26695   windows_path="$new_path"
26696   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26697     unix_path=`$CYGPATH -u "$windows_path"`
26698     new_path="$unix_path"
26699   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26700     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26701     new_path="$unix_path"
26702   fi
26703 
26704     # remove trailing .exe if any
26705     new_path="${new_path/%.exe/}"
26706 
26707     # Save the first 10 bytes of this path to the storage, so fixpath can work.
26708     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26709   fi
26710 
26711   else
26712     # We're on a posix platform. Hooray! :)
26713     # First separate the path from the arguments. This will split at the first
26714     # space.
26715     complete="$MCS"
26716     path="${complete%% *}"
26717     tmp="$complete EOL"
26718     arguments="${tmp#* }"
26719 
26720     # Cannot rely on the command "which" here since it doesn't always work.
26721     is_absolute_path=`$ECHO "$path" | $GREP ^/`
26722     if test -z "$is_absolute_path"; then
26723       # Path to executable is not absolute. Find it.
26724       IFS_save="$IFS"
26725       IFS=:
26726       for p in $PATH; do
26727         if test -f "$p/$path" && test -x "$p/$path"; then
26728           new_path="$p/$path"
26729           break
26730         fi
26731       done
26732       IFS="$IFS_save"
26733     else
26734       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5
26735 $as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;}
26736       new_path="$path"
26737     fi
26738 
26739     if test "x$new_path" = x; then
26740         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26741 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26742         has_space=`$ECHO "$complete" | $GREP " "`
26743         if test "x$has_space" != x; then
26744           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26745 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26746         fi
26747         as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26748       fi
26749   fi
26750 
26751       # Now join together the path and the arguments once again
26752       if test "x$arguments" != xEOL; then
26753         new_complete="$new_path ${arguments% *}"
26754       else
26755         new_complete="$new_path"
26756       fi
26757 
26758   if test "x$complete" != "x$new_complete"; then
26759       MCS="$new_complete"
26760       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
26761 $as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
26762     fi
26763 
26764 elif test "x$OPENJDK_TARGET_OS" != xwindows; then
26765     if test -n "$ac_tool_prefix"; then
26766   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
26767 set dummy ${ac_tool_prefix}nm; ac_word=$2
26768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26769 $as_echo_n "checking for $ac_word... " >&6; }
26770 if ${ac_cv_prog_NM+:} false; then :
26771   $as_echo_n "(cached) " >&6
26772 else
26773   if test -n "$NM"; then
26774   ac_cv_prog_NM="$NM" # Let the user override the test.
26775 else
26776 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26777 for as_dir in $PATH
26778 do
26779   IFS=$as_save_IFS
26780   test -z "$as_dir" && as_dir=.
26781     for ac_exec_ext in '' $ac_executable_extensions; do
26782   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26783     ac_cv_prog_NM="${ac_tool_prefix}nm"
26784     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26785     break 2
26786   fi
26787 done
26788   done
26789 IFS=$as_save_IFS
26790 
26791 fi
26792 fi
26793 NM=$ac_cv_prog_NM
26794 if test -n "$NM"; then
26795   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
26796 $as_echo "$NM" >&6; }
26797 else
26798   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26799 $as_echo "no" >&6; }
26800 fi
26801 
26802 
26803 fi
26804 if test -z "$ac_cv_prog_NM"; then
26805   ac_ct_NM=$NM
26806   # Extract the first word of "nm", so it can be a program name with args.
26807 set dummy nm; ac_word=$2
26808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26809 $as_echo_n "checking for $ac_word... " >&6; }
26810 if ${ac_cv_prog_ac_ct_NM+:} false; then :
26811   $as_echo_n "(cached) " >&6
26812 else
26813   if test -n "$ac_ct_NM"; then
26814   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
26815 else
26816 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26817 for as_dir in $PATH
26818 do
26819   IFS=$as_save_IFS
26820   test -z "$as_dir" && as_dir=.
26821     for ac_exec_ext in '' $ac_executable_extensions; do
26822   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26823     ac_cv_prog_ac_ct_NM="nm"
26824     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26825     break 2
26826   fi
26827 done
26828   done
26829 IFS=$as_save_IFS
26830 
26831 fi
26832 fi
26833 ac_ct_NM=$ac_cv_prog_ac_ct_NM
26834 if test -n "$ac_ct_NM"; then
26835   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
26836 $as_echo "$ac_ct_NM" >&6; }
26837 else
26838   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26839 $as_echo "no" >&6; }
26840 fi
26841 
26842   if test "x$ac_ct_NM" = x; then
26843     NM=""
26844   else
26845     case $cross_compiling:$ac_tool_warned in
26846 yes:)
26847 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26848 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26849 ac_tool_warned=yes ;;
26850 esac
26851     NM=$ac_ct_NM
26852   fi
26853 else
26854   NM="$ac_cv_prog_NM"
26855 fi
26856 
26857 
26858   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26859 
26860   # First separate the path from the arguments. This will split at the first
26861   # space.
26862   complete="$NM"
26863   path="${complete%% *}"
26864   tmp="$complete EOL"
26865   arguments="${tmp#* }"
26866 
26867   # Input might be given as Windows format, start by converting to
26868   # unix format.
26869   new_path=`$CYGPATH -u "$path"`
26870 
26871   # Now try to locate executable using which
26872   new_path=`$WHICH "$new_path" 2> /dev/null`
26873   # bat and cmd files are not always considered executable in cygwin causing which
26874   # to not find them
26875   if test "x$new_path" = x \
26876            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26877            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26878     new_path=`$CYGPATH -u "$path"`
26879   fi
26880   if test "x$new_path" = x; then
26881     # Oops. Which didn't find the executable.
26882     # The splitting of arguments from the executable at a space might have been incorrect,
26883     # since paths with space are more likely in Windows. Give it another try with the whole
26884     # argument.
26885     path="$complete"
26886     arguments="EOL"
26887     new_path=`$CYGPATH -u "$path"`
26888     new_path=`$WHICH "$new_path" 2> /dev/null`
26889     # bat and cmd files are not always considered executable in cygwin causing which
26890     # to not find them
26891     if test "x$new_path" = x \
26892              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26893              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26894       new_path=`$CYGPATH -u "$path"`
26895     fi
26896     if test "x$new_path" = x; then
26897       # It's still not found. Now this is an unrecoverable error.
26898       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26899 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26900       has_space=`$ECHO "$complete" | $GREP " "`
26901       if test "x$has_space" != x; then
26902         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26903 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26904       fi
26905       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26906     fi
26907   fi
26908 
26909   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26910   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26911   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26912   # "foo.exe" is OK but "foo" is an error.
26913   #
26914   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26915   # It is also a way to make sure we got the proper file name for the real test later on.
26916   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26917   if test "x$test_shortpath" = x; then
26918     # Short path failed, file does not exist as specified.
26919     # Try adding .exe or .cmd
26920     if test -f "${new_path}.exe"; then
26921        input_to_shortpath="${new_path}.exe"
26922     elif test -f "${new_path}.cmd"; then
26923        input_to_shortpath="${new_path}.cmd"
26924     else
26925       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
26926 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
26927       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26928 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26929       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26930     fi
26931   else
26932     input_to_shortpath="$new_path"
26933   fi
26934 
26935   # Call helper function which possibly converts this using DOS-style short mode.
26936   # If so, the updated path is stored in $new_path.
26937   new_path="$input_to_shortpath"
26938 
26939   input_path="$input_to_shortpath"
26940   # Check if we need to convert this using DOS-style short mode. If the path
26941   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26942   # take no chances and rewrite it.
26943   # Note: m4 eats our [], so we need to use [ and ] instead.
26944   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26945   if test "x$has_forbidden_chars" != x; then
26946     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26947     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26948     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26949     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26950       # Going to short mode and back again did indeed matter. Since short mode is
26951       # case insensitive, let's make it lowercase to improve readability.
26952       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26953       # Now convert it back to Unix-stile (cygpath)
26954       input_path=`$CYGPATH -u "$shortmode_path"`
26955       new_path="$input_path"
26956     fi
26957   fi
26958 
26959   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26960   if test "x$test_cygdrive_prefix" = x; then
26961     # As a simple fix, exclude /usr/bin since it's not a real path.
26962     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26963       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26964       # a path prefixed by /cygdrive for fixpath to work.
26965       new_path="$CYGWIN_ROOT_PATH$input_path"
26966     fi
26967   fi
26968 
26969   # remove trailing .exe if any
26970   new_path="${new_path/%.exe/}"
26971 
26972   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26973 
26974   # First separate the path from the arguments. This will split at the first
26975   # space.
26976   complete="$NM"
26977   path="${complete%% *}"
26978   tmp="$complete EOL"
26979   arguments="${tmp#* }"
26980 
26981   # Input might be given as Windows format, start by converting to
26982   # unix format.
26983   new_path="$path"
26984 
26985   windows_path="$new_path"
26986   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26987     unix_path=`$CYGPATH -u "$windows_path"`
26988     new_path="$unix_path"
26989   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26990     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26991     new_path="$unix_path"
26992   fi
26993 
26994 
26995   # Now try to locate executable using which
26996   new_path=`$WHICH "$new_path" 2> /dev/null`
26997 
26998   if test "x$new_path" = x; then
26999     # Oops. Which didn't find the executable.
27000     # The splitting of arguments from the executable at a space might have been incorrect,
27001     # since paths with space are more likely in Windows. Give it another try with the whole
27002     # argument.
27003     path="$complete"
27004     arguments="EOL"
27005     new_path="$path"
27006 
27007   windows_path="$new_path"
27008   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27009     unix_path=`$CYGPATH -u "$windows_path"`
27010     new_path="$unix_path"
27011   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27012     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27013     new_path="$unix_path"
27014   fi
27015 
27016 
27017     new_path=`$WHICH "$new_path" 2> /dev/null`
27018 
27019     if test "x$new_path" = x; then
27020       # It's still not found. Now this is an unrecoverable error.
27021       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27022 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27023       has_space=`$ECHO "$complete" | $GREP " "`
27024       if test "x$has_space" != x; then
27025         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27026 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27027       fi
27028       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27029     fi
27030   fi
27031 
27032   # Now new_path has a complete unix path to the binary
27033   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27034     # Keep paths in /bin as-is, but remove trailing .exe if any
27035     new_path="${new_path/%.exe/}"
27036     # Do not save /bin paths to all_fixpath_prefixes!
27037   else
27038     # Not in mixed or Windows style, start by that.
27039     new_path=`cmd //c echo $new_path`
27040 
27041   input_path="$new_path"
27042   # Check if we need to convert this using DOS-style short mode. If the path
27043   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27044   # take no chances and rewrite it.
27045   # Note: m4 eats our [], so we need to use [ and ] instead.
27046   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27047   if test "x$has_forbidden_chars" != x; then
27048     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27049     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27050   fi
27051 
27052     # Output is in $new_path
27053 
27054   windows_path="$new_path"
27055   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27056     unix_path=`$CYGPATH -u "$windows_path"`
27057     new_path="$unix_path"
27058   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27059     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27060     new_path="$unix_path"
27061   fi
27062 
27063     # remove trailing .exe if any
27064     new_path="${new_path/%.exe/}"
27065 
27066     # Save the first 10 bytes of this path to the storage, so fixpath can work.
27067     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27068   fi
27069 
27070   else
27071     # We're on a posix platform. Hooray! :)
27072     # First separate the path from the arguments. This will split at the first
27073     # space.
27074     complete="$NM"
27075     path="${complete%% *}"
27076     tmp="$complete EOL"
27077     arguments="${tmp#* }"
27078 
27079     # Cannot rely on the command "which" here since it doesn't always work.
27080     is_absolute_path=`$ECHO "$path" | $GREP ^/`
27081     if test -z "$is_absolute_path"; then
27082       # Path to executable is not absolute. Find it.
27083       IFS_save="$IFS"
27084       IFS=:
27085       for p in $PATH; do
27086         if test -f "$p/$path" && test -x "$p/$path"; then
27087           new_path="$p/$path"
27088           break
27089         fi
27090       done
27091       IFS="$IFS_save"
27092     else
27093       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
27094 $as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
27095       new_path="$path"
27096     fi
27097 
27098     if test "x$new_path" = x; then
27099         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27100 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27101         has_space=`$ECHO "$complete" | $GREP " "`
27102         if test "x$has_space" != x; then
27103           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27104 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27105         fi
27106         as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27107       fi
27108   fi
27109 
27110       # Now join together the path and the arguments once again
27111       if test "x$arguments" != xEOL; then
27112         new_complete="$new_path ${arguments% *}"
27113       else
27114         new_complete="$new_path"
27115       fi
27116 
27117   if test "x$complete" != "x$new_complete"; then
27118       NM="$new_complete"
27119       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
27120 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
27121     fi
27122 
27123     GNM="$NM"
27124 
27125     if test -n "$ac_tool_prefix"; then
27126   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
27127 set dummy ${ac_tool_prefix}strip; ac_word=$2
27128 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27129 $as_echo_n "checking for $ac_word... " >&6; }
27130 if ${ac_cv_prog_STRIP+:} false; then :
27131   $as_echo_n "(cached) " >&6
27132 else
27133   if test -n "$STRIP"; then
27134   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
27135 else
27136 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27137 for as_dir in $PATH
27138 do
27139   IFS=$as_save_IFS
27140   test -z "$as_dir" && as_dir=.
27141     for ac_exec_ext in '' $ac_executable_extensions; do
27142   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27143     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
27144     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27145     break 2
27146   fi
27147 done
27148   done
27149 IFS=$as_save_IFS
27150 
27151 fi
27152 fi
27153 STRIP=$ac_cv_prog_STRIP
27154 if test -n "$STRIP"; then
27155   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
27156 $as_echo "$STRIP" >&6; }
27157 else
27158   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27159 $as_echo "no" >&6; }
27160 fi
27161 
27162 
27163 fi
27164 if test -z "$ac_cv_prog_STRIP"; then
27165   ac_ct_STRIP=$STRIP
27166   # Extract the first word of "strip", so it can be a program name with args.
27167 set dummy strip; ac_word=$2
27168 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27169 $as_echo_n "checking for $ac_word... " >&6; }
27170 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
27171   $as_echo_n "(cached) " >&6
27172 else
27173   if test -n "$ac_ct_STRIP"; then
27174   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
27175 else
27176 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27177 for as_dir in $PATH
27178 do
27179   IFS=$as_save_IFS
27180   test -z "$as_dir" && as_dir=.
27181     for ac_exec_ext in '' $ac_executable_extensions; do
27182   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27183     ac_cv_prog_ac_ct_STRIP="strip"
27184     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27185     break 2
27186   fi
27187 done
27188   done
27189 IFS=$as_save_IFS
27190 
27191 fi
27192 fi
27193 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
27194 if test -n "$ac_ct_STRIP"; then
27195   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
27196 $as_echo "$ac_ct_STRIP" >&6; }
27197 else
27198   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27199 $as_echo "no" >&6; }
27200 fi
27201 
27202   if test "x$ac_ct_STRIP" = x; then
27203     STRIP=""
27204   else
27205     case $cross_compiling:$ac_tool_warned in
27206 yes:)
27207 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27208 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27209 ac_tool_warned=yes ;;
27210 esac
27211     STRIP=$ac_ct_STRIP
27212   fi
27213 else
27214   STRIP="$ac_cv_prog_STRIP"
27215 fi
27216 
27217 
27218   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27219 
27220   # First separate the path from the arguments. This will split at the first
27221   # space.
27222   complete="$STRIP"
27223   path="${complete%% *}"
27224   tmp="$complete EOL"
27225   arguments="${tmp#* }"
27226 
27227   # Input might be given as Windows format, start by converting to
27228   # unix format.
27229   new_path=`$CYGPATH -u "$path"`
27230 
27231   # Now try to locate executable using which
27232   new_path=`$WHICH "$new_path" 2> /dev/null`
27233   # bat and cmd files are not always considered executable in cygwin causing which
27234   # to not find them
27235   if test "x$new_path" = x \
27236            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27237            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27238     new_path=`$CYGPATH -u "$path"`
27239   fi
27240   if test "x$new_path" = x; then
27241     # Oops. Which didn't find the executable.
27242     # The splitting of arguments from the executable at a space might have been incorrect,
27243     # since paths with space are more likely in Windows. Give it another try with the whole
27244     # argument.
27245     path="$complete"
27246     arguments="EOL"
27247     new_path=`$CYGPATH -u "$path"`
27248     new_path=`$WHICH "$new_path" 2> /dev/null`
27249     # bat and cmd files are not always considered executable in cygwin causing which
27250     # to not find them
27251     if test "x$new_path" = x \
27252              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27253              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27254       new_path=`$CYGPATH -u "$path"`
27255     fi
27256     if test "x$new_path" = x; then
27257       # It's still not found. Now this is an unrecoverable error.
27258       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27259 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27260       has_space=`$ECHO "$complete" | $GREP " "`
27261       if test "x$has_space" != x; then
27262         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27263 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27264       fi
27265       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27266     fi
27267   fi
27268 
27269   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27270   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27271   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27272   # "foo.exe" is OK but "foo" is an error.
27273   #
27274   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27275   # It is also a way to make sure we got the proper file name for the real test later on.
27276   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27277   if test "x$test_shortpath" = x; then
27278     # Short path failed, file does not exist as specified.
27279     # Try adding .exe or .cmd
27280     if test -f "${new_path}.exe"; then
27281        input_to_shortpath="${new_path}.exe"
27282     elif test -f "${new_path}.cmd"; then
27283        input_to_shortpath="${new_path}.cmd"
27284     else
27285       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
27286 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
27287       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27288 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27289       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27290     fi
27291   else
27292     input_to_shortpath="$new_path"
27293   fi
27294 
27295   # Call helper function which possibly converts this using DOS-style short mode.
27296   # If so, the updated path is stored in $new_path.
27297   new_path="$input_to_shortpath"
27298 
27299   input_path="$input_to_shortpath"
27300   # Check if we need to convert this using DOS-style short mode. If the path
27301   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27302   # take no chances and rewrite it.
27303   # Note: m4 eats our [], so we need to use [ and ] instead.
27304   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27305   if test "x$has_forbidden_chars" != x; then
27306     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27307     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27308     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27309     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27310       # Going to short mode and back again did indeed matter. Since short mode is
27311       # case insensitive, let's make it lowercase to improve readability.
27312       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27313       # Now convert it back to Unix-stile (cygpath)
27314       input_path=`$CYGPATH -u "$shortmode_path"`
27315       new_path="$input_path"
27316     fi
27317   fi
27318 
27319   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27320   if test "x$test_cygdrive_prefix" = x; then
27321     # As a simple fix, exclude /usr/bin since it's not a real path.
27322     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27323       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27324       # a path prefixed by /cygdrive for fixpath to work.
27325       new_path="$CYGWIN_ROOT_PATH$input_path"
27326     fi
27327   fi
27328 
27329   # remove trailing .exe if any
27330   new_path="${new_path/%.exe/}"
27331 
27332   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27333 
27334   # First separate the path from the arguments. This will split at the first
27335   # space.
27336   complete="$STRIP"
27337   path="${complete%% *}"
27338   tmp="$complete EOL"
27339   arguments="${tmp#* }"
27340 
27341   # Input might be given as Windows format, start by converting to
27342   # unix format.
27343   new_path="$path"
27344 
27345   windows_path="$new_path"
27346   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27347     unix_path=`$CYGPATH -u "$windows_path"`
27348     new_path="$unix_path"
27349   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27350     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27351     new_path="$unix_path"
27352   fi
27353 
27354 
27355   # Now try to locate executable using which
27356   new_path=`$WHICH "$new_path" 2> /dev/null`
27357 
27358   if test "x$new_path" = x; then
27359     # Oops. Which didn't find the executable.
27360     # The splitting of arguments from the executable at a space might have been incorrect,
27361     # since paths with space are more likely in Windows. Give it another try with the whole
27362     # argument.
27363     path="$complete"
27364     arguments="EOL"
27365     new_path="$path"
27366 
27367   windows_path="$new_path"
27368   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27369     unix_path=`$CYGPATH -u "$windows_path"`
27370     new_path="$unix_path"
27371   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27372     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27373     new_path="$unix_path"
27374   fi
27375 
27376 
27377     new_path=`$WHICH "$new_path" 2> /dev/null`
27378 
27379     if test "x$new_path" = x; then
27380       # It's still not found. Now this is an unrecoverable error.
27381       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27382 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27383       has_space=`$ECHO "$complete" | $GREP " "`
27384       if test "x$has_space" != x; then
27385         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27386 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27387       fi
27388       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27389     fi
27390   fi
27391 
27392   # Now new_path has a complete unix path to the binary
27393   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27394     # Keep paths in /bin as-is, but remove trailing .exe if any
27395     new_path="${new_path/%.exe/}"
27396     # Do not save /bin paths to all_fixpath_prefixes!
27397   else
27398     # Not in mixed or Windows style, start by that.
27399     new_path=`cmd //c echo $new_path`
27400 
27401   input_path="$new_path"
27402   # Check if we need to convert this using DOS-style short mode. If the path
27403   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27404   # take no chances and rewrite it.
27405   # Note: m4 eats our [], so we need to use [ and ] instead.
27406   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27407   if test "x$has_forbidden_chars" != x; then
27408     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27409     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27410   fi
27411 
27412     # Output is in $new_path
27413 
27414   windows_path="$new_path"
27415   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27416     unix_path=`$CYGPATH -u "$windows_path"`
27417     new_path="$unix_path"
27418   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27419     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27420     new_path="$unix_path"
27421   fi
27422 
27423     # remove trailing .exe if any
27424     new_path="${new_path/%.exe/}"
27425 
27426     # Save the first 10 bytes of this path to the storage, so fixpath can work.
27427     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27428   fi
27429 
27430   else
27431     # We're on a posix platform. Hooray! :)
27432     # First separate the path from the arguments. This will split at the first
27433     # space.
27434     complete="$STRIP"
27435     path="${complete%% *}"
27436     tmp="$complete EOL"
27437     arguments="${tmp#* }"
27438 
27439     # Cannot rely on the command "which" here since it doesn't always work.
27440     is_absolute_path=`$ECHO "$path" | $GREP ^/`
27441     if test -z "$is_absolute_path"; then
27442       # Path to executable is not absolute. Find it.
27443       IFS_save="$IFS"
27444       IFS=:
27445       for p in $PATH; do
27446         if test -f "$p/$path" && test -x "$p/$path"; then
27447           new_path="$p/$path"
27448           break
27449         fi
27450       done
27451       IFS="$IFS_save"
27452     else
27453       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
27454 $as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
27455       new_path="$path"
27456     fi
27457 
27458     if test "x$new_path" = x; then
27459         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27460 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27461         has_space=`$ECHO "$complete" | $GREP " "`
27462         if test "x$has_space" != x; then
27463           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27464 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27465         fi
27466         as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27467       fi
27468   fi
27469 
27470       # Now join together the path and the arguments once again
27471       if test "x$arguments" != xEOL; then
27472         new_complete="$new_path ${arguments% *}"
27473       else
27474         new_complete="$new_path"
27475       fi
27476 
27477   if test "x$complete" != "x$new_complete"; then
27478       STRIP="$new_complete"
27479       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
27480 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
27481     fi
27482 
27483 fi
27484 
27485 # objcopy is used for moving debug symbols to separate files when
27486 # full debug symbols are enabled.
27487 if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
27488     if test -n "$ac_tool_prefix"; then
27489   for ac_prog in gobjcopy objcopy
27490   do
27491     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27492 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27494 $as_echo_n "checking for $ac_word... " >&6; }
27495 if ${ac_cv_prog_OBJCOPY+:} false; then :
27496   $as_echo_n "(cached) " >&6
27497 else
27498   if test -n "$OBJCOPY"; then
27499   ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
27500 else
27501 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27502 for as_dir in $PATH
27503 do
27504   IFS=$as_save_IFS
27505   test -z "$as_dir" && as_dir=.
27506     for ac_exec_ext in '' $ac_executable_extensions; do
27507   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27508     ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
27509     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27510     break 2
27511   fi
27512 done
27513   done
27514 IFS=$as_save_IFS
27515 
27516 fi
27517 fi
27518 OBJCOPY=$ac_cv_prog_OBJCOPY
27519 if test -n "$OBJCOPY"; then
27520   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
27521 $as_echo "$OBJCOPY" >&6; }
27522 else
27523   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27524 $as_echo "no" >&6; }
27525 fi
27526 
27527 
27528     test -n "$OBJCOPY" && break
27529   done
27530 fi
27531 if test -z "$OBJCOPY"; then
27532   ac_ct_OBJCOPY=$OBJCOPY
27533   for ac_prog in gobjcopy objcopy
27534 do
27535   # Extract the first word of "$ac_prog", so it can be a program name with args.
27536 set dummy $ac_prog; ac_word=$2
27537 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27538 $as_echo_n "checking for $ac_word... " >&6; }
27539 if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
27540   $as_echo_n "(cached) " >&6
27541 else
27542   if test -n "$ac_ct_OBJCOPY"; then
27543   ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
27544 else
27545 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27546 for as_dir in $PATH
27547 do
27548   IFS=$as_save_IFS
27549   test -z "$as_dir" && as_dir=.
27550     for ac_exec_ext in '' $ac_executable_extensions; do
27551   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27552     ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
27553     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27554     break 2
27555   fi
27556 done
27557   done
27558 IFS=$as_save_IFS
27559 
27560 fi
27561 fi
27562 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
27563 if test -n "$ac_ct_OBJCOPY"; then
27564   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
27565 $as_echo "$ac_ct_OBJCOPY" >&6; }
27566 else
27567   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27568 $as_echo "no" >&6; }
27569 fi
27570 
27571 
27572   test -n "$ac_ct_OBJCOPY" && break
27573 done
27574 
27575   if test "x$ac_ct_OBJCOPY" = x; then
27576     OBJCOPY=""
27577   else
27578     case $cross_compiling:$ac_tool_warned in
27579 yes:)
27580 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27581 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27582 ac_tool_warned=yes ;;
27583 esac
27584     OBJCOPY=$ac_ct_OBJCOPY
27585   fi
27586 fi
27587 
27588     # Only call fixup if objcopy was found.
27589     if test -n "$OBJCOPY"; then
27590 
27591   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27592 
27593   # First separate the path from the arguments. This will split at the first
27594   # space.
27595   complete="$OBJCOPY"
27596   path="${complete%% *}"
27597   tmp="$complete EOL"
27598   arguments="${tmp#* }"
27599 
27600   # Input might be given as Windows format, start by converting to
27601   # unix format.
27602   new_path=`$CYGPATH -u "$path"`
27603 
27604   # Now try to locate executable using which
27605   new_path=`$WHICH "$new_path" 2> /dev/null`
27606   # bat and cmd files are not always considered executable in cygwin causing which
27607   # to not find them
27608   if test "x$new_path" = x \
27609            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27610            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27611     new_path=`$CYGPATH -u "$path"`
27612   fi
27613   if test "x$new_path" = x; then
27614     # Oops. Which didn't find the executable.
27615     # The splitting of arguments from the executable at a space might have been incorrect,
27616     # since paths with space are more likely in Windows. Give it another try with the whole
27617     # argument.
27618     path="$complete"
27619     arguments="EOL"
27620     new_path=`$CYGPATH -u "$path"`
27621     new_path=`$WHICH "$new_path" 2> /dev/null`
27622     # bat and cmd files are not always considered executable in cygwin causing which
27623     # to not find them
27624     if test "x$new_path" = x \
27625              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27626              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27627       new_path=`$CYGPATH -u "$path"`
27628     fi
27629     if test "x$new_path" = x; then
27630       # It's still not found. Now this is an unrecoverable error.
27631       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27632 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27633       has_space=`$ECHO "$complete" | $GREP " "`
27634       if test "x$has_space" != x; then
27635         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27636 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27637       fi
27638       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27639     fi
27640   fi
27641 
27642   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27643   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27644   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27645   # "foo.exe" is OK but "foo" is an error.
27646   #
27647   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27648   # It is also a way to make sure we got the proper file name for the real test later on.
27649   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27650   if test "x$test_shortpath" = x; then
27651     # Short path failed, file does not exist as specified.
27652     # Try adding .exe or .cmd
27653     if test -f "${new_path}.exe"; then
27654        input_to_shortpath="${new_path}.exe"
27655     elif test -f "${new_path}.cmd"; then
27656        input_to_shortpath="${new_path}.cmd"
27657     else
27658       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
27659 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
27660       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27661 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27662       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27663     fi
27664   else
27665     input_to_shortpath="$new_path"
27666   fi
27667 
27668   # Call helper function which possibly converts this using DOS-style short mode.
27669   # If so, the updated path is stored in $new_path.
27670   new_path="$input_to_shortpath"
27671 
27672   input_path="$input_to_shortpath"
27673   # Check if we need to convert this using DOS-style short mode. If the path
27674   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27675   # take no chances and rewrite it.
27676   # Note: m4 eats our [], so we need to use [ and ] instead.
27677   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27678   if test "x$has_forbidden_chars" != x; then
27679     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27680     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27681     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27682     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27683       # Going to short mode and back again did indeed matter. Since short mode is
27684       # case insensitive, let's make it lowercase to improve readability.
27685       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27686       # Now convert it back to Unix-stile (cygpath)
27687       input_path=`$CYGPATH -u "$shortmode_path"`
27688       new_path="$input_path"
27689     fi
27690   fi
27691 
27692   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27693   if test "x$test_cygdrive_prefix" = x; then
27694     # As a simple fix, exclude /usr/bin since it's not a real path.
27695     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27696       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27697       # a path prefixed by /cygdrive for fixpath to work.
27698       new_path="$CYGWIN_ROOT_PATH$input_path"
27699     fi
27700   fi
27701 
27702   # remove trailing .exe if any
27703   new_path="${new_path/%.exe/}"
27704 
27705   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27706 
27707   # First separate the path from the arguments. This will split at the first
27708   # space.
27709   complete="$OBJCOPY"
27710   path="${complete%% *}"
27711   tmp="$complete EOL"
27712   arguments="${tmp#* }"
27713 
27714   # Input might be given as Windows format, start by converting to
27715   # unix format.
27716   new_path="$path"
27717 
27718   windows_path="$new_path"
27719   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27720     unix_path=`$CYGPATH -u "$windows_path"`
27721     new_path="$unix_path"
27722   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27723     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27724     new_path="$unix_path"
27725   fi
27726 
27727 
27728   # Now try to locate executable using which
27729   new_path=`$WHICH "$new_path" 2> /dev/null`
27730 
27731   if test "x$new_path" = x; then
27732     # Oops. Which didn't find the executable.
27733     # The splitting of arguments from the executable at a space might have been incorrect,
27734     # since paths with space are more likely in Windows. Give it another try with the whole
27735     # argument.
27736     path="$complete"
27737     arguments="EOL"
27738     new_path="$path"
27739 
27740   windows_path="$new_path"
27741   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27742     unix_path=`$CYGPATH -u "$windows_path"`
27743     new_path="$unix_path"
27744   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27745     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27746     new_path="$unix_path"
27747   fi
27748 
27749 
27750     new_path=`$WHICH "$new_path" 2> /dev/null`
27751 
27752     if test "x$new_path" = x; then
27753       # It's still not found. Now this is an unrecoverable error.
27754       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27755 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27756       has_space=`$ECHO "$complete" | $GREP " "`
27757       if test "x$has_space" != x; then
27758         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27759 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27760       fi
27761       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27762     fi
27763   fi
27764 
27765   # Now new_path has a complete unix path to the binary
27766   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27767     # Keep paths in /bin as-is, but remove trailing .exe if any
27768     new_path="${new_path/%.exe/}"
27769     # Do not save /bin paths to all_fixpath_prefixes!
27770   else
27771     # Not in mixed or Windows style, start by that.
27772     new_path=`cmd //c echo $new_path`
27773 
27774   input_path="$new_path"
27775   # Check if we need to convert this using DOS-style short mode. If the path
27776   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27777   # take no chances and rewrite it.
27778   # Note: m4 eats our [], so we need to use [ and ] instead.
27779   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27780   if test "x$has_forbidden_chars" != x; then
27781     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27782     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27783   fi
27784 
27785     # Output is in $new_path
27786 
27787   windows_path="$new_path"
27788   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27789     unix_path=`$CYGPATH -u "$windows_path"`
27790     new_path="$unix_path"
27791   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27792     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27793     new_path="$unix_path"
27794   fi
27795 
27796     # remove trailing .exe if any
27797     new_path="${new_path/%.exe/}"
27798 
27799     # Save the first 10 bytes of this path to the storage, so fixpath can work.
27800     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27801   fi
27802 
27803   else
27804     # We're on a posix platform. Hooray! :)
27805     # First separate the path from the arguments. This will split at the first
27806     # space.
27807     complete="$OBJCOPY"
27808     path="${complete%% *}"
27809     tmp="$complete EOL"
27810     arguments="${tmp#* }"
27811 
27812     # Cannot rely on the command "which" here since it doesn't always work.
27813     is_absolute_path=`$ECHO "$path" | $GREP ^/`
27814     if test -z "$is_absolute_path"; then
27815       # Path to executable is not absolute. Find it.
27816       IFS_save="$IFS"
27817       IFS=:
27818       for p in $PATH; do
27819         if test -f "$p/$path" && test -x "$p/$path"; then
27820           new_path="$p/$path"
27821           break
27822         fi
27823       done
27824       IFS="$IFS_save"
27825     else
27826       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5
27827 $as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;}
27828       new_path="$path"
27829     fi
27830 
27831     if test "x$new_path" = x; then
27832         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27833 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27834         has_space=`$ECHO "$complete" | $GREP " "`
27835         if test "x$has_space" != x; then
27836           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27837 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27838         fi
27839         as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27840       fi
27841   fi
27842 
27843       # Now join together the path and the arguments once again
27844       if test "x$arguments" != xEOL; then
27845         new_complete="$new_path ${arguments% *}"
27846       else
27847         new_complete="$new_path"
27848       fi
27849 
27850   if test "x$complete" != "x$new_complete"; then
27851       OBJCOPY="$new_complete"
27852       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
27853 $as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
27854     fi
27855 
27856     fi
27857 fi
27858 
27859 if test -n "$ac_tool_prefix"; then
27860   for ac_prog in gobjdump objdump
27861   do
27862     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27863 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27864 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27865 $as_echo_n "checking for $ac_word... " >&6; }
27866 if ${ac_cv_prog_OBJDUMP+:} false; then :
27867   $as_echo_n "(cached) " >&6
27868 else
27869   if test -n "$OBJDUMP"; then
27870   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
27871 else
27872 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27873 for as_dir in $PATH
27874 do
27875   IFS=$as_save_IFS
27876   test -z "$as_dir" && as_dir=.
27877     for ac_exec_ext in '' $ac_executable_extensions; do
27878   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27879     ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
27880     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27881     break 2
27882   fi
27883 done
27884   done
27885 IFS=$as_save_IFS
27886 
27887 fi
27888 fi
27889 OBJDUMP=$ac_cv_prog_OBJDUMP
27890 if test -n "$OBJDUMP"; then
27891   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
27892 $as_echo "$OBJDUMP" >&6; }
27893 else
27894   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27895 $as_echo "no" >&6; }
27896 fi
27897 
27898 
27899     test -n "$OBJDUMP" && break
27900   done
27901 fi
27902 if test -z "$OBJDUMP"; then
27903   ac_ct_OBJDUMP=$OBJDUMP
27904   for ac_prog in gobjdump objdump
27905 do
27906   # Extract the first word of "$ac_prog", so it can be a program name with args.
27907 set dummy $ac_prog; ac_word=$2
27908 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27909 $as_echo_n "checking for $ac_word... " >&6; }
27910 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
27911   $as_echo_n "(cached) " >&6
27912 else
27913   if test -n "$ac_ct_OBJDUMP"; then
27914   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
27915 else
27916 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27917 for as_dir in $PATH
27918 do
27919   IFS=$as_save_IFS
27920   test -z "$as_dir" && as_dir=.
27921     for ac_exec_ext in '' $ac_executable_extensions; do
27922   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27923     ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
27924     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27925     break 2
27926   fi
27927 done
27928   done
27929 IFS=$as_save_IFS
27930 
27931 fi
27932 fi
27933 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
27934 if test -n "$ac_ct_OBJDUMP"; then
27935   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
27936 $as_echo "$ac_ct_OBJDUMP" >&6; }
27937 else
27938   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27939 $as_echo "no" >&6; }
27940 fi
27941 
27942 
27943   test -n "$ac_ct_OBJDUMP" && break
27944 done
27945 
27946   if test "x$ac_ct_OBJDUMP" = x; then
27947     OBJDUMP=""
27948   else
27949     case $cross_compiling:$ac_tool_warned in
27950 yes:)
27951 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27952 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27953 ac_tool_warned=yes ;;
27954 esac
27955     OBJDUMP=$ac_ct_OBJDUMP
27956   fi
27957 fi
27958 
27959 if test "x$OBJDUMP" != x; then
27960   # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
27961 
27962   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27963 
27964   # First separate the path from the arguments. This will split at the first
27965   # space.
27966   complete="$OBJDUMP"
27967   path="${complete%% *}"
27968   tmp="$complete EOL"
27969   arguments="${tmp#* }"
27970 
27971   # Input might be given as Windows format, start by converting to
27972   # unix format.
27973   new_path=`$CYGPATH -u "$path"`
27974 
27975   # Now try to locate executable using which
27976   new_path=`$WHICH "$new_path" 2> /dev/null`
27977   # bat and cmd files are not always considered executable in cygwin causing which
27978   # to not find them
27979   if test "x$new_path" = x \
27980            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27981            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27982     new_path=`$CYGPATH -u "$path"`
27983   fi
27984   if test "x$new_path" = x; then
27985     # Oops. Which didn't find the executable.
27986     # The splitting of arguments from the executable at a space might have been incorrect,
27987     # since paths with space are more likely in Windows. Give it another try with the whole
27988     # argument.
27989     path="$complete"
27990     arguments="EOL"
27991     new_path=`$CYGPATH -u "$path"`
27992     new_path=`$WHICH "$new_path" 2> /dev/null`
27993     # bat and cmd files are not always considered executable in cygwin causing which
27994     # to not find them
27995     if test "x$new_path" = x \
27996              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27997              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27998       new_path=`$CYGPATH -u "$path"`
27999     fi
28000     if test "x$new_path" = x; then
28001       # It's still not found. Now this is an unrecoverable error.
28002       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28003 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28004       has_space=`$ECHO "$complete" | $GREP " "`
28005       if test "x$has_space" != x; then
28006         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28007 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28008       fi
28009       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28010     fi
28011   fi
28012 
28013   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28014   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28015   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28016   # "foo.exe" is OK but "foo" is an error.
28017   #
28018   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28019   # It is also a way to make sure we got the proper file name for the real test later on.
28020   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28021   if test "x$test_shortpath" = x; then
28022     # Short path failed, file does not exist as specified.
28023     # Try adding .exe or .cmd
28024     if test -f "${new_path}.exe"; then
28025        input_to_shortpath="${new_path}.exe"
28026     elif test -f "${new_path}.cmd"; then
28027        input_to_shortpath="${new_path}.cmd"
28028     else
28029       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
28030 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
28031       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28032 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28033       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28034     fi
28035   else
28036     input_to_shortpath="$new_path"
28037   fi
28038 
28039   # Call helper function which possibly converts this using DOS-style short mode.
28040   # If so, the updated path is stored in $new_path.
28041   new_path="$input_to_shortpath"
28042 
28043   input_path="$input_to_shortpath"
28044   # Check if we need to convert this using DOS-style short mode. If the path
28045   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28046   # take no chances and rewrite it.
28047   # Note: m4 eats our [], so we need to use [ and ] instead.
28048   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28049   if test "x$has_forbidden_chars" != x; then
28050     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28051     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28052     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28053     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28054       # Going to short mode and back again did indeed matter. Since short mode is
28055       # case insensitive, let's make it lowercase to improve readability.
28056       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28057       # Now convert it back to Unix-stile (cygpath)
28058       input_path=`$CYGPATH -u "$shortmode_path"`
28059       new_path="$input_path"
28060     fi
28061   fi
28062 
28063   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28064   if test "x$test_cygdrive_prefix" = x; then
28065     # As a simple fix, exclude /usr/bin since it's not a real path.
28066     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28067       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28068       # a path prefixed by /cygdrive for fixpath to work.
28069       new_path="$CYGWIN_ROOT_PATH$input_path"
28070     fi
28071   fi
28072 
28073   # remove trailing .exe if any
28074   new_path="${new_path/%.exe/}"
28075 
28076   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28077 
28078   # First separate the path from the arguments. This will split at the first
28079   # space.
28080   complete="$OBJDUMP"
28081   path="${complete%% *}"
28082   tmp="$complete EOL"
28083   arguments="${tmp#* }"
28084 
28085   # Input might be given as Windows format, start by converting to
28086   # unix format.
28087   new_path="$path"
28088 
28089   windows_path="$new_path"
28090   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28091     unix_path=`$CYGPATH -u "$windows_path"`
28092     new_path="$unix_path"
28093   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28094     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28095     new_path="$unix_path"
28096   fi
28097 
28098 
28099   # Now try to locate executable using which
28100   new_path=`$WHICH "$new_path" 2> /dev/null`
28101 
28102   if test "x$new_path" = x; then
28103     # Oops. Which didn't find the executable.
28104     # The splitting of arguments from the executable at a space might have been incorrect,
28105     # since paths with space are more likely in Windows. Give it another try with the whole
28106     # argument.
28107     path="$complete"
28108     arguments="EOL"
28109     new_path="$path"
28110 
28111   windows_path="$new_path"
28112   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28113     unix_path=`$CYGPATH -u "$windows_path"`
28114     new_path="$unix_path"
28115   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28116     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28117     new_path="$unix_path"
28118   fi
28119 
28120 
28121     new_path=`$WHICH "$new_path" 2> /dev/null`
28122 
28123     if test "x$new_path" = x; then
28124       # It's still not found. Now this is an unrecoverable error.
28125       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28126 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28127       has_space=`$ECHO "$complete" | $GREP " "`
28128       if test "x$has_space" != x; then
28129         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28130 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28131       fi
28132       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28133     fi
28134   fi
28135 
28136   # Now new_path has a complete unix path to the binary
28137   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28138     # Keep paths in /bin as-is, but remove trailing .exe if any
28139     new_path="${new_path/%.exe/}"
28140     # Do not save /bin paths to all_fixpath_prefixes!
28141   else
28142     # Not in mixed or Windows style, start by that.
28143     new_path=`cmd //c echo $new_path`
28144 
28145   input_path="$new_path"
28146   # Check if we need to convert this using DOS-style short mode. If the path
28147   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28148   # take no chances and rewrite it.
28149   # Note: m4 eats our [], so we need to use [ and ] instead.
28150   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28151   if test "x$has_forbidden_chars" != x; then
28152     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28153     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28154   fi
28155 
28156     # Output is in $new_path
28157 
28158   windows_path="$new_path"
28159   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28160     unix_path=`$CYGPATH -u "$windows_path"`
28161     new_path="$unix_path"
28162   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28163     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28164     new_path="$unix_path"
28165   fi
28166 
28167     # remove trailing .exe if any
28168     new_path="${new_path/%.exe/}"
28169 
28170     # Save the first 10 bytes of this path to the storage, so fixpath can work.
28171     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28172   fi
28173 
28174   else
28175     # We're on a posix platform. Hooray! :)
28176     # First separate the path from the arguments. This will split at the first
28177     # space.
28178     complete="$OBJDUMP"
28179     path="${complete%% *}"
28180     tmp="$complete EOL"
28181     arguments="${tmp#* }"
28182 
28183     # Cannot rely on the command "which" here since it doesn't always work.
28184     is_absolute_path=`$ECHO "$path" | $GREP ^/`
28185     if test -z "$is_absolute_path"; then
28186       # Path to executable is not absolute. Find it.
28187       IFS_save="$IFS"
28188       IFS=:
28189       for p in $PATH; do
28190         if test -f "$p/$path" && test -x "$p/$path"; then
28191           new_path="$p/$path"
28192           break
28193         fi
28194       done
28195       IFS="$IFS_save"
28196     else
28197       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5
28198 $as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;}
28199       new_path="$path"
28200     fi
28201 
28202     if test "x$new_path" = x; then
28203         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28204 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28205         has_space=`$ECHO "$complete" | $GREP " "`
28206         if test "x$has_space" != x; then
28207           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28208 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28209         fi
28210         as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28211       fi
28212   fi
28213 
28214       # Now join together the path and the arguments once again
28215       if test "x$arguments" != xEOL; then
28216         new_complete="$new_path ${arguments% *}"
28217       else
28218         new_complete="$new_path"
28219       fi
28220 
28221   if test "x$complete" != "x$new_complete"; then
28222       OBJDUMP="$new_complete"
28223       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
28224 $as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
28225     fi
28226 
28227 fi
28228 
28229 if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
28230    # Extract the first word of "lipo", so it can be a program name with args.
28231 set dummy lipo; ac_word=$2
28232 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28233 $as_echo_n "checking for $ac_word... " >&6; }
28234 if ${ac_cv_path_LIPO+:} false; then :
28235   $as_echo_n "(cached) " >&6
28236 else
28237   case $LIPO in
28238   [\\/]* | ?:[\\/]*)
28239   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
28240   ;;
28241   *)
28242   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28243 for as_dir in $PATH
28244 do
28245   IFS=$as_save_IFS
28246   test -z "$as_dir" && as_dir=.
28247     for ac_exec_ext in '' $ac_executable_extensions; do
28248   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
28249     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
28250     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28251     break 2
28252   fi
28253 done
28254   done
28255 IFS=$as_save_IFS
28256 
28257   ;;
28258 esac
28259 fi
28260 LIPO=$ac_cv_path_LIPO
28261 if test -n "$LIPO"; then
28262   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
28263 $as_echo "$LIPO" >&6; }
28264 else
28265   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28266 $as_echo "no" >&6; }
28267 fi
28268 
28269 
28270 
28271   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28272 
28273   # First separate the path from the arguments. This will split at the first
28274   # space.
28275   complete="$LIPO"
28276   path="${complete%% *}"
28277   tmp="$complete EOL"
28278   arguments="${tmp#* }"
28279 
28280   # Input might be given as Windows format, start by converting to
28281   # unix format.
28282   new_path=`$CYGPATH -u "$path"`
28283 
28284   # Now try to locate executable using which
28285   new_path=`$WHICH "$new_path" 2> /dev/null`
28286   # bat and cmd files are not always considered executable in cygwin causing which
28287   # to not find them
28288   if test "x$new_path" = x \
28289            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28290            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28291     new_path=`$CYGPATH -u "$path"`
28292   fi
28293   if test "x$new_path" = x; then
28294     # Oops. Which didn't find the executable.
28295     # The splitting of arguments from the executable at a space might have been incorrect,
28296     # since paths with space are more likely in Windows. Give it another try with the whole
28297     # argument.
28298     path="$complete"
28299     arguments="EOL"
28300     new_path=`$CYGPATH -u "$path"`
28301     new_path=`$WHICH "$new_path" 2> /dev/null`
28302     # bat and cmd files are not always considered executable in cygwin causing which
28303     # to not find them
28304     if test "x$new_path" = x \
28305              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28306              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28307       new_path=`$CYGPATH -u "$path"`
28308     fi
28309     if test "x$new_path" = x; then
28310       # It's still not found. Now this is an unrecoverable error.
28311       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28312 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28313       has_space=`$ECHO "$complete" | $GREP " "`
28314       if test "x$has_space" != x; then
28315         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28316 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28317       fi
28318       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28319     fi
28320   fi
28321 
28322   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28323   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28324   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28325   # "foo.exe" is OK but "foo" is an error.
28326   #
28327   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28328   # It is also a way to make sure we got the proper file name for the real test later on.
28329   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28330   if test "x$test_shortpath" = x; then
28331     # Short path failed, file does not exist as specified.
28332     # Try adding .exe or .cmd
28333     if test -f "${new_path}.exe"; then
28334        input_to_shortpath="${new_path}.exe"
28335     elif test -f "${new_path}.cmd"; then
28336        input_to_shortpath="${new_path}.cmd"
28337     else
28338       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
28339 $as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
28340       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28341 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28342       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28343     fi
28344   else
28345     input_to_shortpath="$new_path"
28346   fi
28347 
28348   # Call helper function which possibly converts this using DOS-style short mode.
28349   # If so, the updated path is stored in $new_path.
28350   new_path="$input_to_shortpath"
28351 
28352   input_path="$input_to_shortpath"
28353   # Check if we need to convert this using DOS-style short mode. If the path
28354   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28355   # take no chances and rewrite it.
28356   # Note: m4 eats our [], so we need to use [ and ] instead.
28357   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28358   if test "x$has_forbidden_chars" != x; then
28359     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28360     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28361     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28362     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28363       # Going to short mode and back again did indeed matter. Since short mode is
28364       # case insensitive, let's make it lowercase to improve readability.
28365       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28366       # Now convert it back to Unix-stile (cygpath)
28367       input_path=`$CYGPATH -u "$shortmode_path"`
28368       new_path="$input_path"
28369     fi
28370   fi
28371 
28372   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28373   if test "x$test_cygdrive_prefix" = x; then
28374     # As a simple fix, exclude /usr/bin since it's not a real path.
28375     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28376       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28377       # a path prefixed by /cygdrive for fixpath to work.
28378       new_path="$CYGWIN_ROOT_PATH$input_path"
28379     fi
28380   fi
28381 
28382   # remove trailing .exe if any
28383   new_path="${new_path/%.exe/}"
28384 
28385   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28386 
28387   # First separate the path from the arguments. This will split at the first
28388   # space.
28389   complete="$LIPO"
28390   path="${complete%% *}"
28391   tmp="$complete EOL"
28392   arguments="${tmp#* }"
28393 
28394   # Input might be given as Windows format, start by converting to
28395   # unix format.
28396   new_path="$path"
28397 
28398   windows_path="$new_path"
28399   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28400     unix_path=`$CYGPATH -u "$windows_path"`
28401     new_path="$unix_path"
28402   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28403     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28404     new_path="$unix_path"
28405   fi
28406 
28407 
28408   # Now try to locate executable using which
28409   new_path=`$WHICH "$new_path" 2> /dev/null`
28410 
28411   if test "x$new_path" = x; then
28412     # Oops. Which didn't find the executable.
28413     # The splitting of arguments from the executable at a space might have been incorrect,
28414     # since paths with space are more likely in Windows. Give it another try with the whole
28415     # argument.
28416     path="$complete"
28417     arguments="EOL"
28418     new_path="$path"
28419 
28420   windows_path="$new_path"
28421   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28422     unix_path=`$CYGPATH -u "$windows_path"`
28423     new_path="$unix_path"
28424   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28425     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28426     new_path="$unix_path"
28427   fi
28428 
28429 
28430     new_path=`$WHICH "$new_path" 2> /dev/null`
28431 
28432     if test "x$new_path" = x; then
28433       # It's still not found. Now this is an unrecoverable error.
28434       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28435 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28436       has_space=`$ECHO "$complete" | $GREP " "`
28437       if test "x$has_space" != x; then
28438         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28439 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28440       fi
28441       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28442     fi
28443   fi
28444 
28445   # Now new_path has a complete unix path to the binary
28446   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28447     # Keep paths in /bin as-is, but remove trailing .exe if any
28448     new_path="${new_path/%.exe/}"
28449     # Do not save /bin paths to all_fixpath_prefixes!
28450   else
28451     # Not in mixed or Windows style, start by that.
28452     new_path=`cmd //c echo $new_path`
28453 
28454   input_path="$new_path"
28455   # Check if we need to convert this using DOS-style short mode. If the path
28456   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28457   # take no chances and rewrite it.
28458   # Note: m4 eats our [], so we need to use [ and ] instead.
28459   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28460   if test "x$has_forbidden_chars" != x; then
28461     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28462     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28463   fi
28464 
28465     # Output is in $new_path
28466 
28467   windows_path="$new_path"
28468   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28469     unix_path=`$CYGPATH -u "$windows_path"`
28470     new_path="$unix_path"
28471   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28472     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28473     new_path="$unix_path"
28474   fi
28475 
28476     # remove trailing .exe if any
28477     new_path="${new_path/%.exe/}"
28478 
28479     # Save the first 10 bytes of this path to the storage, so fixpath can work.
28480     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28481   fi
28482 
28483   else
28484     # We're on a posix platform. Hooray! :)
28485     # First separate the path from the arguments. This will split at the first
28486     # space.
28487     complete="$LIPO"
28488     path="${complete%% *}"
28489     tmp="$complete EOL"
28490     arguments="${tmp#* }"
28491 
28492     # Cannot rely on the command "which" here since it doesn't always work.
28493     is_absolute_path=`$ECHO "$path" | $GREP ^/`
28494     if test -z "$is_absolute_path"; then
28495       # Path to executable is not absolute. Find it.
28496       IFS_save="$IFS"
28497       IFS=:
28498       for p in $PATH; do
28499         if test -f "$p/$path" && test -x "$p/$path"; then
28500           new_path="$p/$path"
28501           break
28502         fi
28503       done
28504       IFS="$IFS_save"
28505     else
28506       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5
28507 $as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;}
28508       new_path="$path"
28509     fi
28510 
28511     if test "x$new_path" = x; then
28512         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28513 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28514         has_space=`$ECHO "$complete" | $GREP " "`
28515         if test "x$has_space" != x; then
28516           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28517 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28518         fi
28519         as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28520       fi
28521   fi
28522 
28523       # Now join together the path and the arguments once again
28524       if test "x$arguments" != xEOL; then
28525         new_complete="$new_path ${arguments% *}"
28526       else
28527         new_complete="$new_path"
28528       fi
28529 
28530   if test "x$complete" != "x$new_complete"; then
28531       LIPO="$new_complete"
28532       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
28533 $as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
28534     fi
28535 
28536 fi
28537 
28538 
28539 
28540 # Restore old path without tools dir
28541 PATH="$OLD_PATH"
28542 
28543 
28544 # FIXME: Currently we must test this after paths but before flags. Fix!
28545 
28546 # And we can test some aspects on the target using configure macros.
28547 
28548 
28549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
28550 $as_echo_n "checking for ANSI C header files... " >&6; }
28551 if ${ac_cv_header_stdc+:} false; then :
28552   $as_echo_n "(cached) " >&6
28553 else
28554   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28555 /* end confdefs.h.  */
28556 #include <stdlib.h>
28557 #include <stdarg.h>
28558 #include <string.h>
28559 #include <float.h>
28560 
28561 int
28562 main ()
28563 {
28564 
28565   ;
28566   return 0;
28567 }
28568 _ACEOF
28569 if ac_fn_cxx_try_compile "$LINENO"; then :
28570   ac_cv_header_stdc=yes
28571 else
28572   ac_cv_header_stdc=no
28573 fi
28574 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28575 
28576 if test $ac_cv_header_stdc = yes; then
28577   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
28578   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28579 /* end confdefs.h.  */
28580 #include <string.h>
28581 
28582 _ACEOF
28583 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28584   $EGREP "memchr" >/dev/null 2>&1; then :
28585 
28586 else
28587   ac_cv_header_stdc=no
28588 fi
28589 rm -f conftest*
28590 
28591 fi
28592 
28593 if test $ac_cv_header_stdc = yes; then
28594   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
28595   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28596 /* end confdefs.h.  */
28597 #include <stdlib.h>
28598 
28599 _ACEOF
28600 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28601   $EGREP "free" >/dev/null 2>&1; then :
28602 
28603 else
28604   ac_cv_header_stdc=no
28605 fi
28606 rm -f conftest*
28607 
28608 fi
28609 
28610 if test $ac_cv_header_stdc = yes; then
28611   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
28612   if test "$cross_compiling" = yes; then :
28613   :
28614 else
28615   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28616 /* end confdefs.h.  */
28617 #include <ctype.h>
28618 #include <stdlib.h>
28619 #if ((' ' & 0x0FF) == 0x020)
28620 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
28621 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
28622 #else
28623 # define ISLOWER(c) \
28624                    (('a' <= (c) && (c) <= 'i') \
28625                      || ('j' <= (c) && (c) <= 'r') \
28626                      || ('s' <= (c) && (c) <= 'z'))
28627 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
28628 #endif
28629 
28630 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
28631 int
28632 main ()
28633 {
28634   int i;
28635   for (i = 0; i < 256; i++)
28636     if (XOR (islower (i), ISLOWER (i))
28637         || toupper (i) != TOUPPER (i))
28638       return 2;
28639   return 0;
28640 }
28641 _ACEOF
28642 if ac_fn_cxx_try_run "$LINENO"; then :
28643 
28644 else
28645   ac_cv_header_stdc=no
28646 fi
28647 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28648   conftest.$ac_objext conftest.beam conftest.$ac_ext
28649 fi
28650 
28651 fi
28652 fi
28653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
28654 $as_echo "$ac_cv_header_stdc" >&6; }
28655 if test $ac_cv_header_stdc = yes; then
28656 
28657 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
28658 
28659 fi
28660 
28661 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
28662 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
28663                   inttypes.h stdint.h unistd.h
28664 do :
28665   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
28666 ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
28667 "
28668 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
28669   cat >>confdefs.h <<_ACEOF
28670 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
28671 _ACEOF
28672 
28673 fi
28674 
28675 done
28676 
28677 
28678 
28679 ###############################################################################
28680 #
28681 # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
28682 # (The JVM can use 32 or 64 bit Java pointers but that decision
28683 # is made at runtime.)
28684 #
28685 
28686 if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28687   # Always specify -m flags on Solaris
28688 
28689   # keep track of c/cxx flags that we added outselves...
28690   #   to prevent emitting warning...
28691   ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28692   ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28693   ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28694 
28695   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
28696   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
28697   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
28698 
28699   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
28700   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
28701   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
28702 
28703 elif test "x$COMPILE_TYPE" = xreduced; then
28704   if test "x$OPENJDK_TARGET_OS" != xwindows; then
28705     # Specify -m if running reduced on other Posix platforms
28706 
28707   # keep track of c/cxx flags that we added outselves...
28708   #   to prevent emitting warning...
28709   ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28710   ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28711   ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28712 
28713   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
28714   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
28715   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
28716 
28717   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
28718   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
28719   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
28720 
28721   fi
28722 fi
28723 
28724 # Make compilation sanity check
28725 for ac_header in stdio.h
28726 do :
28727   ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
28728 if test "x$ac_cv_header_stdio_h" = xyes; then :
28729   cat >>confdefs.h <<_ACEOF
28730 #define HAVE_STDIO_H 1
28731 _ACEOF
28732 
28733 else
28734 
28735   { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
28736 $as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
28737   if test "x$COMPILE_TYPE" = xreduced; then
28738     { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
28739 $as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
28740   elif test "x$COMPILE_TYPE" = xcross; then
28741     { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
28742 $as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
28743   fi
28744   as_fn_error $? "Cannot continue." "$LINENO" 5
28745 
28746 fi
28747 
28748 done
28749 
28750 
28751 # The cast to long int works around a bug in the HP C Compiler
28752 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
28753 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
28754 # This bug is HP SR number 8606223364.
28755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
28756 $as_echo_n "checking size of int *... " >&6; }
28757 if ${ac_cv_sizeof_int_p+:} false; then :
28758   $as_echo_n "(cached) " >&6
28759 else
28760   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
28761 
28762 else
28763   if test "$ac_cv_type_int_p" = yes; then
28764      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28765 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28766 as_fn_error 77 "cannot compute sizeof (int *)
28767 See \`config.log' for more details" "$LINENO" 5; }
28768    else
28769      ac_cv_sizeof_int_p=0
28770    fi
28771 fi
28772 
28773 fi
28774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
28775 $as_echo "$ac_cv_sizeof_int_p" >&6; }
28776 
28777 
28778 
28779 cat >>confdefs.h <<_ACEOF
28780 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
28781 _ACEOF
28782 
28783 
28784 
28785 if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
28786   # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
28787   SIZEOF_INT_P="$ac_cv_sizeof_int_p"
28788 fi
28789 
28790 if test "x$SIZEOF_INT_P" = x; then
28791     # The test failed, lets stick to the assumed value.
28792     { $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
28793 $as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
28794 else
28795     TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
28796 
28797     if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
28798         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
28799     fi
28800 fi
28801 
28802 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
28803 $as_echo_n "checking for target address size... " >&6; }
28804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
28805 $as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
28806 
28807 
28808 ###############################################################################
28809 #
28810 # Is the target little of big endian?
28811 #
28812  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
28813 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
28814 if ${ac_cv_c_bigendian+:} false; then :
28815   $as_echo_n "(cached) " >&6
28816 else
28817   ac_cv_c_bigendian=unknown
28818     # See if we're dealing with a universal compiler.
28819     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28820 /* end confdefs.h.  */
28821 #ifndef __APPLE_CC__
28822                not a universal capable compiler
28823              #endif
28824              typedef int dummy;
28825 
28826 _ACEOF
28827 if ac_fn_cxx_try_compile "$LINENO"; then :
28828 
28829         # Check for potential -arch flags.  It is not universal unless
28830         # there are at least two -arch flags with different values.
28831         ac_arch=
28832         ac_prev=
28833         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
28834          if test -n "$ac_prev"; then
28835            case $ac_word in
28836              i?86 | x86_64 | ppc | ppc64)
28837                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
28838                  ac_arch=$ac_word
28839                else
28840                  ac_cv_c_bigendian=universal
28841                  break
28842                fi
28843                ;;
28844            esac
28845            ac_prev=
28846          elif test "x$ac_word" = "x-arch"; then
28847            ac_prev=arch
28848          fi
28849        done
28850 fi
28851 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28852     if test $ac_cv_c_bigendian = unknown; then
28853       # See if sys/param.h defines the BYTE_ORDER macro.
28854       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28855 /* end confdefs.h.  */
28856 #include <sys/types.h>
28857              #include <sys/param.h>
28858 
28859 int
28860 main ()
28861 {
28862 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
28863                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
28864                      && LITTLE_ENDIAN)
28865               bogus endian macros
28866              #endif
28867 
28868   ;
28869   return 0;
28870 }
28871 _ACEOF
28872 if ac_fn_cxx_try_compile "$LINENO"; then :
28873   # It does; now see whether it defined to BIG_ENDIAN or not.
28874          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28875 /* end confdefs.h.  */
28876 #include <sys/types.h>
28877                 #include <sys/param.h>
28878 
28879 int
28880 main ()
28881 {
28882 #if BYTE_ORDER != BIG_ENDIAN
28883                  not big endian
28884                 #endif
28885 
28886   ;
28887   return 0;
28888 }
28889 _ACEOF
28890 if ac_fn_cxx_try_compile "$LINENO"; then :
28891   ac_cv_c_bigendian=yes
28892 else
28893   ac_cv_c_bigendian=no
28894 fi
28895 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28896 fi
28897 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28898     fi
28899     if test $ac_cv_c_bigendian = unknown; then
28900       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
28901       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28902 /* end confdefs.h.  */
28903 #include <limits.h>
28904 
28905 int
28906 main ()
28907 {
28908 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
28909               bogus endian macros
28910              #endif
28911 
28912   ;
28913   return 0;
28914 }
28915 _ACEOF
28916 if ac_fn_cxx_try_compile "$LINENO"; then :
28917   # It does; now see whether it defined to _BIG_ENDIAN or not.
28918          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28919 /* end confdefs.h.  */
28920 #include <limits.h>
28921 
28922 int
28923 main ()
28924 {
28925 #ifndef _BIG_ENDIAN
28926                  not big endian
28927                 #endif
28928 
28929   ;
28930   return 0;
28931 }
28932 _ACEOF
28933 if ac_fn_cxx_try_compile "$LINENO"; then :
28934   ac_cv_c_bigendian=yes
28935 else
28936   ac_cv_c_bigendian=no
28937 fi
28938 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28939 fi
28940 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28941     fi
28942     if test $ac_cv_c_bigendian = unknown; then
28943       # Compile a test program.
28944       if test "$cross_compiling" = yes; then :
28945   # Try to guess by grepping values from an object file.
28946          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28947 /* end confdefs.h.  */
28948 short int ascii_mm[] =
28949                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
28950                 short int ascii_ii[] =
28951                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
28952                 int use_ascii (int i) {
28953                   return ascii_mm[i] + ascii_ii[i];
28954                 }
28955                 short int ebcdic_ii[] =
28956                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
28957                 short int ebcdic_mm[] =
28958                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
28959                 int use_ebcdic (int i) {
28960                   return ebcdic_mm[i] + ebcdic_ii[i];
28961                 }
28962                 extern int foo;
28963 
28964 int
28965 main ()
28966 {
28967 return use_ascii (foo) == use_ebcdic (foo);
28968   ;
28969   return 0;
28970 }
28971 _ACEOF
28972 if ac_fn_cxx_try_compile "$LINENO"; then :
28973   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
28974               ac_cv_c_bigendian=yes
28975             fi
28976             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
28977               if test "$ac_cv_c_bigendian" = unknown; then
28978                 ac_cv_c_bigendian=no
28979               else
28980                 # finding both strings is unlikely to happen, but who knows?
28981                 ac_cv_c_bigendian=unknown
28982               fi
28983             fi
28984 fi
28985 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28986 else
28987   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28988 /* end confdefs.h.  */
28989 $ac_includes_default
28990 int
28991 main ()
28992 {
28993 
28994              /* Are we little or big endian?  From Harbison&Steele.  */
28995              union
28996              {
28997                long int l;
28998                char c[sizeof (long int)];
28999              } u;
29000              u.l = 1;
29001              return u.c[sizeof (long int) - 1] == 1;
29002 
29003   ;
29004   return 0;
29005 }
29006 _ACEOF
29007 if ac_fn_cxx_try_run "$LINENO"; then :
29008   ac_cv_c_bigendian=no
29009 else
29010   ac_cv_c_bigendian=yes
29011 fi
29012 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29013   conftest.$ac_objext conftest.beam conftest.$ac_ext
29014 fi
29015 
29016     fi
29017 fi
29018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
29019 $as_echo "$ac_cv_c_bigendian" >&6; }
29020  case $ac_cv_c_bigendian in #(
29021    yes)
29022      ENDIAN="big";; #(
29023    no)
29024      ENDIAN="little" ;; #(
29025    universal)
29026      ENDIAN="universal_endianness"
29027      ;; #(
29028    *)
29029      ENDIAN="unknown" ;;
29030  esac
29031 
29032 
29033 if test "x$ENDIAN" = xuniversal_endianness; then
29034     as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
29035 fi
29036 if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
29037     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
29038 fi
29039 
29040 
29041 # Configure flags for the tools
29042 
29043 
29044 ###############################################################################
29045 #
29046 # How to compile shared libraries.
29047 #
29048 
29049 if test "x$GCC" = xyes; then
29050     COMPILER_NAME=gcc
29051     PICFLAG="-fPIC"
29052     LIBRARY_PREFIX=lib
29053     SHARED_LIBRARY='lib$1.so'
29054     STATIC_LIBRARY='lib$1.a'
29055     SHARED_LIBRARY_FLAGS="-shared"
29056     SHARED_LIBRARY_SUFFIX='.so'
29057     STATIC_LIBRARY_SUFFIX='.a'
29058     OBJ_SUFFIX='.o'
29059     EXE_SUFFIX=''
29060     SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
29061     SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
29062     C_FLAG_REORDER=''
29063     CXX_FLAG_REORDER=''
29064     SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
29065     SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
29066     LD="$CC"
29067     LDEXE="$CC"
29068     LDCXX="$CXX"
29069     LDEXECXX="$CXX"
29070     POST_STRIP_CMD="$STRIP -g"
29071 
29072     # Linking is different on MacOSX
29073     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29074         # Might change in the future to clang.
29075         COMPILER_NAME=gcc
29076         SHARED_LIBRARY='lib$1.dylib'
29077         SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
29078         SHARED_LIBRARY_SUFFIX='.dylib'
29079         EXE_SUFFIX=''
29080         SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
29081         SET_SHARED_LIBRARY_MAPFILE=''
29082         SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
29083         SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
29084         POST_STRIP_CMD="$STRIP -S"
29085     fi
29086 else
29087     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29088         # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
29089         COMPILER_NAME=ossc
29090         PICFLAG="-KPIC"
29091         LIBRARY_PREFIX=lib
29092         SHARED_LIBRARY='lib$1.so'
29093         STATIC_LIBRARY='lib$1.a'
29094         SHARED_LIBRARY_FLAGS="-G"
29095         SHARED_LIBRARY_SUFFIX='.so'
29096         STATIC_LIBRARY_SUFFIX='.a'
29097         OBJ_SUFFIX='.o'
29098         EXE_SUFFIX=''
29099         SET_SHARED_LIBRARY_NAME=''
29100         SET_SHARED_LIBRARY_MAPFILE='-M$1'
29101         C_FLAG_REORDER='-xF'
29102         CXX_FLAG_REORDER='-xF'
29103         SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
29104         SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
29105         CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
29106         CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
29107         CFLAGS_JDKLIB_EXTRA='-xstrconst'
29108         POST_STRIP_CMD="$STRIP -x"
29109         POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
29110     fi
29111     if test "x$OPENJDK_TARGET_OS" = xwindows; then
29112         # If it is not gcc, then assume it is the MS Visual Studio compiler
29113         COMPILER_NAME=cl
29114         PICFLAG=""
29115         LIBRARY_PREFIX=
29116         SHARED_LIBRARY='$1.dll'
29117         STATIC_LIBRARY='$1.lib'
29118         SHARED_LIBRARY_FLAGS="-LD"
29119         SHARED_LIBRARY_SUFFIX='.dll'
29120         STATIC_LIBRARY_SUFFIX='.lib'
29121         OBJ_SUFFIX='.obj'
29122         EXE_SUFFIX='.exe'
29123         SET_SHARED_LIBRARY_NAME=''
29124         SET_SHARED_LIBRARY_MAPFILE=''
29125         SET_SHARED_LIBRARY_ORIGIN=''
29126         SET_EXECUTABLE_ORIGIN=''
29127     fi
29128 fi
29129 
29130 
29131 
29132 
29133 
29134 
29135 
29136 
29137 
29138 
29139 
29140 
29141 
29142 
29143 
29144 
29145 
29146 
29147 
29148 # The (cross) compiler is now configured, we can now test capabilities
29149 # of the target platform.
29150 
29151 
29152 
29153 ###############################################################################
29154 #
29155 # Setup the opt flags for different compilers
29156 # and different operating systems.
29157 #
29158 
29159 #
29160 # NOTE: check for -mstackrealign needs to be below potential addition of -m32
29161 #
29162 if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
29163     # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
29164     # While waiting for a better solution, the current workaround is to use -mstackrealign.
29165     CFLAGS="$CFLAGS -mstackrealign"
29166     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
29167 $as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
29168     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29169 /* end confdefs.h.  */
29170 int main() { return 0; }
29171 _ACEOF
29172 if ac_fn_cxx_try_link "$LINENO"; then :
29173 
29174                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29175 $as_echo "yes" >&6; }
29176 
29177 else
29178 
29179                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29180 $as_echo "no" >&6; }
29181                         as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
29182 
29183 fi
29184 rm -f core conftest.err conftest.$ac_objext \
29185     conftest$ac_exeext conftest.$ac_ext
29186 fi
29187 
29188 C_FLAG_DEPS="-MMD -MF"
29189 CXX_FLAG_DEPS="-MMD -MF"
29190 
29191 case $COMPILER_TYPE in
29192   CC )
29193     D_FLAG="-g"
29194     case $COMPILER_NAME in
29195       gcc )
29196         case $OPENJDK_TARGET_OS in
29197           macosx )
29198             # On MacOSX we optimize for size, something
29199             # we should do for all platforms?
29200             C_O_FLAG_HI="-Os"
29201             C_O_FLAG_NORM="-Os"
29202             C_O_FLAG_NONE=""
29203             ;;
29204           *)
29205             C_O_FLAG_HI="-O3"
29206             C_O_FLAG_NORM="-O2"
29207             C_O_FLAG_NONE="-O0"
29208             CFLAGS_DEBUG_SYMBOLS="-g"
29209             CXXFLAGS_DEBUG_SYMBOLS="-g"
29210             if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
29211                CFLAGS_DEBUG_SYMBOLS="-g1"
29212                CXXFLAGS_DEBUG_SYMBOLS="-g1"
29213             fi
29214             ;;
29215         esac
29216         CXX_O_FLAG_HI="$C_O_FLAG_HI"
29217         CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
29218         CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
29219         ;;
29220       ossc )
29221         #
29222         # Forte has different names for this with their C++ compiler...
29223         #
29224         C_FLAG_DEPS="-xMMD -xMF"
29225         CXX_FLAG_DEPS="-xMMD -xMF"
29226 
29227         # Extra options used with HIGHEST
29228         #
29229         # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
29230         #          done with care, there are some assumptions below that need to
29231         #          be understood about the use of pointers, and IEEE behavior.
29232         #
29233         # Use non-standard floating point mode (not IEEE 754)
29234         CC_HIGHEST="$CC_HIGHEST -fns"
29235         # Do some simplification of floating point arithmetic (not IEEE 754)
29236         CC_HIGHEST="$CC_HIGHEST -fsimple"
29237         # Use single precision floating point with 'float'
29238         CC_HIGHEST="$CC_HIGHEST -fsingle"
29239         # Assume memory references via basic pointer types do not alias
29240         #   (Source with excessing pointer casting and data access with mixed
29241         #    pointer types are not recommended)
29242         CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
29243         # Use intrinsic or inline versions for math/std functions
29244         #   (If you expect perfect errno behavior, do not use this)
29245         CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
29246         # Loop data dependency optimizations (need -xO3 or higher)
29247         CC_HIGHEST="$CC_HIGHEST -xdepend"
29248         # Pointer parameters to functions do not overlap
29249         #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
29250         #    If you pass in multiple pointers to the same data, do not use this)
29251         CC_HIGHEST="$CC_HIGHEST -xrestrict"
29252         # Inline some library routines
29253         #   (If you expect perfect errno behavior, do not use this)
29254         CC_HIGHEST="$CC_HIGHEST -xlibmil"
29255         # Use optimized math routines
29256         #   (If you expect perfect errno behavior, do not use this)
29257         #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
29258         #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
29259 
29260         if test "x$OPENJDK_TARGET_CPU" = xsparc; then
29261           CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
29262           CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
29263         fi
29264 
29265         case $OPENJDK_TARGET_CPU_ARCH in
29266           x86)
29267             C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
29268             C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
29269             C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
29270             C_O_FLAG_NONE="-xregs=no%frameptr"
29271             CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
29272             CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
29273             CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
29274             CXX_O_FLAG_NONE="-xregs=no%frameptr"
29275             if test "x$OPENJDK_TARGET_CPU" = xx86; then
29276                C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
29277                CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
29278             fi
29279             ;;
29280           sparc)
29281             CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
29282             CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
29283             C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
29284             C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
29285             C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
29286             C_O_FLAG_NONE=""
29287             CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
29288             CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29289             CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29290             CXX_O_FLAG_NONE=""
29291             ;;
29292         esac
29293 
29294     CFLAGS_DEBUG_SYMBOLS="-g -xs"
29295     CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
29296     esac
29297     ;;
29298   CL )
29299     D_FLAG=
29300     C_O_FLAG_HIGHEST="-O2"
29301     C_O_FLAG_HI="-O1"
29302     C_O_FLAG_NORM="-O1"
29303     C_O_FLAG_NONE="-Od"
29304     CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
29305     CXX_O_FLAG_HI="$C_O_FLAG_HI"
29306     CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
29307     CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
29308     ;;
29309 esac
29310 
29311 if test -z "$C_O_FLAG_HIGHEST"; then
29312    C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
29313 fi
29314 
29315 if test -z "$CXX_O_FLAG_HIGHEST"; then
29316    CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
29317 fi
29318 
29319 
29320 
29321 
29322 
29323 
29324 
29325 
29326 
29327 
29328 
29329 
29330 
29331 
29332 if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
29333    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
29334 $as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
29335 fi
29336 
29337 if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
29338    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
29339 $as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
29340 fi
29341 
29342 if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
29343    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
29344 $as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
29345 fi
29346 
29347 
29348 # Check whether --with-extra-cflags was given.
29349 if test "${with_extra_cflags+set}" = set; then :
29350   withval=$with_extra_cflags;
29351 fi
29352 
29353 
29354 
29355 # Check whether --with-extra-cxxflags was given.
29356 if test "${with_extra_cxxflags+set}" = set; then :
29357   withval=$with_extra_cxxflags;
29358 fi
29359 
29360 
29361 
29362 # Check whether --with-extra-ldflags was given.
29363 if test "${with_extra_ldflags+set}" = set; then :
29364   withval=$with_extra_ldflags;
29365 fi
29366 
29367 
29368 CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
29369 CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
29370 LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
29371 
29372 # Hotspot needs these set in their legacy form
29373 LEGACY_EXTRA_CFLAGS=$with_extra_cflags
29374 LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
29375 LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
29376 
29377 
29378 
29379 
29380 
29381 ###############################################################################
29382 #
29383 # Now setup the CFLAGS and LDFLAGS for the JDK build.
29384 # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
29385 #
29386 case $COMPILER_NAME in
29387       gcc )
29388           CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
29389                           -pipe \
29390                           -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
29391           case $OPENJDK_TARGET_CPU_ARCH in
29392           arm )
29393             # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
29394             CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29395           ;;
29396           ppc )
29397             # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
29398           ;;
29399           * )
29400             CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
29401             CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29402           ;;
29403           esac
29404           ;;
29405       ossc )
29406           CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
29407           case $OPENJDK_TARGET_CPU_ARCH in
29408           x86 )
29409             CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
29410             CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
29411           ;;
29412           esac
29413 
29414           CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
29415           CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
29416 
29417           LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
29418           LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
29419           ;;
29420       cl )
29421           CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
29422                -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
29423                -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
29424                -DWIN32 -DIAL"
29425           case $OPENJDK_TARGET_CPU in
29426               x86 )
29427                   CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
29428                   ;;
29429               x86_64 )
29430                   CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
29431                   ;;
29432           esac
29433           ;;
29434 esac
29435 
29436 ###############################################################################
29437 
29438 CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
29439 
29440 # The package path is used only on macosx?
29441 PACKAGE_PATH=/opt/local
29442 
29443 
29444 if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
29445     # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
29446     #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
29447     #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
29448     #   Note: -Dmacro         is the same as    #define macro 1
29449     #         -Dmacro=      is the same as    #define macro
29450     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29451         CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
29452     else
29453         CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
29454     fi
29455 else
29456     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
29457 fi
29458 if test "x$OPENJDK_TARGET_OS" = xlinux; then
29459     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
29460 fi
29461 if test "x$OPENJDK_TARGET_OS" = xwindows; then
29462     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
29463 fi
29464 if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29465     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
29466 fi
29467 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29468     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE"
29469     # Setting these parameters makes it an error to link to macosx APIs that are
29470     # newer than the given OS version and makes the linked binaries compatible even
29471     # if built on a newer version of the OS.
29472     # The expected format is X.Y.Z
29473     MACOSX_VERSION_MIN=10.7.0
29474 
29475     # The macro takes the version with no dots, ex: 1070
29476     # Let the flags variables get resolved in make for easier override on make
29477     # command line.
29478     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29479     LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29480 fi
29481 if test "x$OPENJDK_TARGET_OS" = xbsd; then
29482     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
29483 fi
29484 if test "x$DEBUG_LEVEL" = xrelease; then
29485     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
29486     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29487         CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
29488     fi
29489 else
29490     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
29491 fi
29492 
29493 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
29494 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
29495 
29496 CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
29497         -I${JDK_OUTPUTDIR}/include \
29498         -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
29499         -I${JDK_TOPDIR}/src/share/javavm/export \
29500         -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/javavm/export \
29501         -I${JDK_TOPDIR}/src/share/native/common \
29502         -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
29503 
29504 # The shared libraries are compiled using the picflag.
29505 CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
29506 CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
29507 
29508 # Executable flags
29509 CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
29510 CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
29511 
29512 # Now this is odd. The JDK native libraries have to link against libjvm.so
29513 # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
29514 # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
29515 # is identical for client and server? Yes. Which is picked at runtime (client or server)?
29516 # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
29517 # libraries will link to whatever is in memory. Yuck.
29518 #
29519 # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
29520 if test "x$COMPILER_NAME" = xcl; then
29521     LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
29522     if test "x$OPENJDK_TARGET_CPU" = xx86; then
29523         LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
29524     fi
29525     # TODO: make -debug optional "--disable-full-debug-symbols"
29526     LDFLAGS_JDK="$LDFLAGS_JDK -debug"
29527     LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
29528     LDFLAGS_JDKLIB_SUFFIX=""
29529     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
29530         LDFLAGS_STACK_SIZE=1048576
29531     else
29532         LDFLAGS_STACK_SIZE=327680
29533     fi
29534     LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
29535 else
29536     if test "x$COMPILER_NAME" = xgcc; then
29537         # If this is a --hash-style=gnu system, use --hash-style=both, why?
29538         HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
29539         if test -n "$HAS_GNU_HASH"; then
29540             LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
29541         fi
29542         if test "x$OPENJDK_TARGET_OS" = xlinux; then
29543           # And since we now know that the linker is gnu, then add -z defs, to forbid
29544           # undefined symbols in object files.
29545           LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
29546           if test "x$DEBUG_LEVEL" = "xrelease"; then
29547               # When building release libraries, tell the linker optimize them.
29548               # Should this be supplied to the OSS linker as well?
29549               LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
29550           fi
29551         fi
29552     fi
29553     LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
29554                     -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
29555 
29556     # On some platforms (mac) the linker warns about non existing -L dirs.
29557     # Add server first if available. Linking aginst client does not always produce the same results.
29558     # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
29559     # Default to server for other variants.
29560     if test "x$JVM_VARIANT_SERVER" = xtrue; then
29561         LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29562     elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
29563         LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
29564     elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
29565         LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
29566     else
29567         LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29568     fi
29569 
29570     LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
29571     if test "x$COMPILER_NAME" = xossc; then
29572         LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
29573     fi
29574 
29575     LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
29576     if test "x$OPENJDK_TARGET_OS" = xlinux; then
29577         LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
29578     fi
29579 fi
29580 
29581 # Adjust flags according to debug level.
29582 case $DEBUG_LEVEL in
29583       fastdebug )
29584               CFLAGS="$CFLAGS $D_FLAG"
29585               JAVAC_FLAGS="$JAVAC_FLAGS -g"
29586               ;;
29587       slowdebug )
29588               CFLAGS="$CFLAGS $D_FLAG"
29589               C_O_FLAG_HI="$C_O_FLAG_NONE"
29590               C_O_FLAG_NORM="$C_O_FLAG_NONE"
29591               CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
29592               CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
29593               JAVAC_FLAGS="$JAVAC_FLAGS -g"
29594               ;;
29595 esac
29596 
29597 
29598 
29599 
29600 
29601 
29602 
29603 
29604 
29605 
29606 
29607 
29608 
29609 
29610 
29611 
29612   # Some Zero and Shark settings.
29613   # ZERO_ARCHFLAG tells the compiler which mode to build for
29614   case "${OPENJDK_TARGET_CPU}" in
29615     s390)
29616       ZERO_ARCHFLAG="-m31"
29617       ;;
29618     *)
29619       ZERO_ARCHFLAG="-m${OPENJDK_TARGET_CPU_BITS}"
29620   esac
29621 
29622   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
29623 $as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
29624   supports=yes
29625 
29626   saved_cflags="$CFLAGS"
29627   CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
29628   ac_ext=c
29629 ac_cpp='$CPP $CPPFLAGS'
29630 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29631 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29632 ac_compiler_gnu=$ac_cv_c_compiler_gnu
29633 
29634   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29635 /* end confdefs.h.  */
29636 
29637     int i;
29638 
29639 _ACEOF
29640 if ac_fn_c_try_compile "$LINENO"; then :
29641 
29642 else
29643   supports=no
29644 fi
29645 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29646   ac_ext=cpp
29647 ac_cpp='$CXXCPP $CPPFLAGS'
29648 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29649 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29650 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29651 
29652   CFLAGS="$saved_cflags"
29653 
29654   saved_cxxflags="$CXXFLAGS"
29655   CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
29656   ac_ext=cpp
29657 ac_cpp='$CXXCPP $CPPFLAGS'
29658 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29659 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29660 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29661 
29662   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29663 /* end confdefs.h.  */
29664 
29665     int i;
29666 
29667 _ACEOF
29668 if ac_fn_cxx_try_compile "$LINENO"; then :
29669 
29670 else
29671   supports=no
29672 fi
29673 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29674   ac_ext=cpp
29675 ac_cpp='$CXXCPP $CPPFLAGS'
29676 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29677 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29678 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29679 
29680   CXXFLAGS="$saved_cxxflags"
29681 
29682   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
29683 $as_echo "$supports" >&6; }
29684   if test "x$supports" = "xyes" ; then
29685     :
29686   else
29687     ZERO_ARCHFLAG=""
29688   fi
29689 
29690 
29691 
29692   # Check that the compiler supports -mX flags
29693   # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
29694 
29695   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-m${OPENJDK_TARGET_CPU_BITS}\"" >&5
29696 $as_echo_n "checking if compiler supports \"-m${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
29697   supports=yes
29698 
29699   saved_cflags="$CFLAGS"
29700   CFLAGS="$CFLAGS -m${OPENJDK_TARGET_CPU_BITS}"
29701   ac_ext=c
29702 ac_cpp='$CPP $CPPFLAGS'
29703 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29704 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29705 ac_compiler_gnu=$ac_cv_c_compiler_gnu
29706 
29707   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29708 /* end confdefs.h.  */
29709 
29710     int i;
29711 
29712 _ACEOF
29713 if ac_fn_c_try_compile "$LINENO"; then :
29714 
29715 else
29716   supports=no
29717 fi
29718 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29719   ac_ext=cpp
29720 ac_cpp='$CXXCPP $CPPFLAGS'
29721 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29722 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29723 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29724 
29725   CFLAGS="$saved_cflags"
29726 
29727   saved_cxxflags="$CXXFLAGS"
29728   CXXFLAGS="$CXXFLAG -m${OPENJDK_TARGET_CPU_BITS}"
29729   ac_ext=cpp
29730 ac_cpp='$CXXCPP $CPPFLAGS'
29731 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29732 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29733 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29734 
29735   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29736 /* end confdefs.h.  */
29737 
29738     int i;
29739 
29740 _ACEOF
29741 if ac_fn_cxx_try_compile "$LINENO"; then :
29742 
29743 else
29744   supports=no
29745 fi
29746 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29747   ac_ext=cpp
29748 ac_cpp='$CXXCPP $CPPFLAGS'
29749 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29750 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29751 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29752 
29753   CXXFLAGS="$saved_cxxflags"
29754 
29755   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
29756 $as_echo "$supports" >&6; }
29757   if test "x$supports" = "xyes" ; then
29758     COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
29759   else
29760     COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
29761   fi
29762 
29763 
29764 
29765 
29766 # Setup debug symbols (need objcopy from the toolchain for that)
29767 
29768 #
29769 # ENABLE_DEBUG_SYMBOLS
29770 # This must be done after the toolchain is setup, since we're looking at objcopy.
29771 #
29772 # Check whether --enable-debug-symbols was given.
29773 if test "${enable_debug_symbols+set}" = set; then :
29774   enableval=$enable_debug_symbols;
29775 fi
29776 
29777 
29778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
29779 $as_echo_n "checking if we should generate debug symbols... " >&6; }
29780 
29781 if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
29782    # explicit enabling of enable-debug-symbols and can't find objcopy
29783    #   this is an error
29784    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
29785 fi
29786 
29787 if test "x$enable_debug_symbols" = "xyes"; then
29788   ENABLE_DEBUG_SYMBOLS=true
29789 elif test "x$enable_debug_symbols" = "xno"; then
29790   ENABLE_DEBUG_SYMBOLS=false
29791 else
29792   # default on macosx is false
29793   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29794     ENABLE_DEBUG_SYMBOLS=false
29795   # Default is on if objcopy is found, otherwise off
29796   elif test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
29797     ENABLE_DEBUG_SYMBOLS=true
29798   else
29799     ENABLE_DEBUG_SYMBOLS=false
29800   fi
29801 fi
29802 
29803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
29804 $as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
29805 
29806 #
29807 # ZIP_DEBUGINFO_FILES
29808 #
29809 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
29810 $as_echo_n "checking if we should zip debug-info files... " >&6; }
29811 # Check whether --enable-zip-debug-info was given.
29812 if test "${enable_zip_debug_info+set}" = set; then :
29813   enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
29814 else
29815   enable_zip_debug_info="yes"
29816 fi
29817 
29818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
29819 $as_echo "${enable_zip_debug_info}" >&6; }
29820 
29821 if test "x${enable_zip_debug_info}" = "xno"; then
29822    ZIP_DEBUGINFO_FILES=false
29823 else
29824    ZIP_DEBUGINFO_FILES=true
29825 fi
29826 
29827 
29828 
29829 
29830 
29831 
29832 
29833 ###############################################################################
29834 #
29835 # Check dependencies for external and internal libraries.
29836 #
29837 ###############################################################################
29838 
29839 
29840 
29841 ###############################################################################
29842 #
29843 # OS specific settings that we never will need to probe.
29844 #
29845 if test "x$OPENJDK_TARGET_OS" = xlinux; then
29846     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
29847 $as_echo_n "checking what is not needed on Linux?... " >&6; }
29848     PULSE_NOT_NEEDED=yes
29849     { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
29850 $as_echo "pulse" >&6; }
29851 fi
29852 
29853 if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29854     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
29855 $as_echo_n "checking what is not needed on Solaris?... " >&6; }
29856     ALSA_NOT_NEEDED=yes
29857     PULSE_NOT_NEEDED=yes
29858     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
29859 $as_echo "alsa pulse" >&6; }
29860 fi
29861 
29862 if test "x$OPENJDK_TARGET_OS" = xwindows; then
29863     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
29864 $as_echo_n "checking what is not needed on Windows?... " >&6; }
29865     CUPS_NOT_NEEDED=yes
29866     ALSA_NOT_NEEDED=yes
29867     PULSE_NOT_NEEDED=yes
29868     X11_NOT_NEEDED=yes
29869     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
29870 $as_echo "alsa cups pulse x11" >&6; }
29871 fi
29872 
29873 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29874     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
29875 $as_echo_n "checking what is not needed on MacOSX?... " >&6; }
29876     ALSA_NOT_NEEDED=yes
29877     PULSE_NOT_NEEDED=yes
29878     X11_NOT_NEEDED=yes
29879     FREETYPE2_NOT_NEEDED=yes
29880     # If the java runtime framework is disabled, then we need X11.
29881     # This will be adjusted below.
29882     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
29883 $as_echo "alsa pulse x11" >&6; }
29884 fi
29885 
29886 if test "x$OPENJDK_TARGET_OS" = xbsd; then
29887     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
29888 $as_echo_n "checking what is not needed on bsd?... " >&6; }
29889     ALSA_NOT_NEEDED=yes
29890     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
29891 $as_echo "alsa" >&6; }
29892 fi
29893 
29894 if test "x$OPENJDK" = "xfalse"; then
29895     FREETYPE2_NOT_NEEDED=yes
29896 fi
29897 
29898 if test "x$SUPPORT_HEADFUL" = xno; then
29899     X11_NOT_NEEDED=yes
29900 fi
29901 
29902 ###############################################################################
29903 #
29904 # Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
29905 # that uses this API.
29906 #
29907 # Check whether --enable-macosx-runtime-support was given.
29908 if test "${enable_macosx_runtime_support+set}" = set; then :
29909   enableval=$enable_macosx_runtime_support; MACOSX_RUNTIME_SUPPORT="${enableval}"
29910 else
29911   MACOSX_RUNTIME_SUPPORT="no"
29912 fi
29913 
29914 
29915 USE_MACOSX_RUNTIME_SUPPORT=no
29916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for explicit Java runtime support in the OS" >&5
29917 $as_echo_n "checking for explicit Java runtime support in the OS... " >&6; }
29918 if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
29919     if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
29920         MACOSX_RUNTIME_SUPPORT=yes
29921         USE_MACOSX_RUNTIME_SUPPORT=yes
29922         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, does not need alsa freetype2 pulse and X11" >&5
29923 $as_echo "yes, does not need alsa freetype2 pulse and X11" >&6; }
29924     else
29925         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, but explicitly disabled." >&5
29926 $as_echo "yes, but explicitly disabled." >&6; }
29927     fi
29928 else
29929     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29930 $as_echo "no" >&6; }
29931 fi
29932 
29933 if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
29934     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on an X11 build on MacOSX?" >&5
29935 $as_echo_n "checking what is not needed on an X11 build on MacOSX?... " >&6; }
29936     X11_NOT_NEEDED=
29937     FREETYPE2_NOT_NEEDED=
29938     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
29939 $as_echo "alsa pulse" >&6; }
29940 fi
29941 
29942 
29943 
29944 ###############################################################################
29945 #
29946 # Check for X Windows
29947 #
29948 
29949 # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
29950 # Make a simple check for the libraries at the sysroot, and setup --x-includes and
29951 # --x-libraries for the sysroot, if that seems to be correct.
29952 if test "x$SYS_ROOT" != "x/"; then
29953   if test "x$x_includes" = xNONE; then
29954     if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
29955       x_includes="$SYS_ROOT/usr/X11R6/include"
29956     fi
29957   fi
29958   if test "x$x_libraries" = xNONE; then
29959     if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
29960       x_libraries="$SYS_ROOT/usr/X11R6/lib"
29961     fi
29962   fi
29963 fi
29964 
29965 # Now let autoconf do it's magic
29966 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
29967 $as_echo_n "checking for X... " >&6; }
29968 
29969 
29970 # Check whether --with-x was given.
29971 if test "${with_x+set}" = set; then :
29972   withval=$with_x;
29973 fi
29974 
29975 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
29976 if test "x$with_x" = xno; then
29977   # The user explicitly disabled X.
29978   have_x=disabled
29979 else
29980   case $x_includes,$x_libraries in #(
29981     *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
29982     *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
29983   $as_echo_n "(cached) " >&6
29984 else
29985   # One or both of the vars are not set, and there is no cached value.
29986 ac_x_includes=no ac_x_libraries=no
29987 rm -f -r conftest.dir
29988 if mkdir conftest.dir; then
29989   cd conftest.dir
29990   cat >Imakefile <<'_ACEOF'
29991 incroot:
29992         @echo incroot='${INCROOT}'
29993 usrlibdir:
29994         @echo usrlibdir='${USRLIBDIR}'
29995 libdir:
29996         @echo libdir='${LIBDIR}'
29997 _ACEOF
29998   if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
29999     # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
30000     for ac_var in incroot usrlibdir libdir; do
30001       eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
30002     done
30003     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
30004     for ac_extension in a so sl dylib la dll; do
30005       if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
30006          test -f "$ac_im_libdir/libX11.$ac_extension"; then
30007         ac_im_usrlibdir=$ac_im_libdir; break
30008       fi
30009     done
30010     # Screen out bogus values from the imake configuration.  They are
30011     # bogus both because they are the default anyway, and because
30012     # using them would break gcc on systems where it needs fixed includes.
30013     case $ac_im_incroot in
30014         /usr/include) ac_x_includes= ;;
30015         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
30016     esac
30017     case $ac_im_usrlibdir in
30018         /usr/lib | /usr/lib64 | /lib | /lib64) ;;
30019         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
30020     esac
30021   fi
30022   cd ..
30023   rm -f -r conftest.dir
30024 fi
30025 
30026 # Standard set of common directories for X headers.
30027 # Check X11 before X11Rn because it is often a symlink to the current release.
30028 ac_x_header_dirs='
30029 /usr/X11/include
30030 /usr/X11R7/include
30031 /usr/X11R6/include
30032 /usr/X11R5/include
30033 /usr/X11R4/include
30034 
30035 /usr/include/X11
30036 /usr/include/X11R7
30037 /usr/include/X11R6
30038 /usr/include/X11R5
30039 /usr/include/X11R4
30040 
30041 /usr/local/X11/include
30042 /usr/local/X11R7/include
30043 /usr/local/X11R6/include
30044 /usr/local/X11R5/include
30045 /usr/local/X11R4/include
30046 
30047 /usr/local/include/X11
30048 /usr/local/include/X11R7
30049 /usr/local/include/X11R6
30050 /usr/local/include/X11R5
30051 /usr/local/include/X11R4
30052 
30053 /usr/X386/include
30054 /usr/x386/include
30055 /usr/XFree86/include/X11
30056 
30057 /usr/include
30058 /usr/local/include
30059 /usr/unsupported/include
30060 /usr/athena/include
30061 /usr/local/x11r5/include
30062 /usr/lpp/Xamples/include
30063 
30064 /usr/openwin/include
30065 /usr/openwin/share/include'
30066 
30067 if test "$ac_x_includes" = no; then
30068   # Guess where to find include files, by looking for Xlib.h.
30069   # First, try using that file with no special directory specified.
30070   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30071 /* end confdefs.h.  */
30072 #include <X11/Xlib.h>
30073 _ACEOF
30074 if ac_fn_cxx_try_cpp "$LINENO"; then :
30075   # We can compile using X headers with no special include directory.
30076 ac_x_includes=
30077 else
30078   for ac_dir in $ac_x_header_dirs; do
30079   if test -r "$ac_dir/X11/Xlib.h"; then
30080     ac_x_includes=$ac_dir
30081     break
30082   fi
30083 done
30084 fi
30085 rm -f conftest.err conftest.i conftest.$ac_ext
30086 fi # $ac_x_includes = no
30087 
30088 if test "$ac_x_libraries" = no; then
30089   # Check for the libraries.
30090   # See if we find them without any special options.
30091   # Don't add to $LIBS permanently.
30092   ac_save_LIBS=$LIBS
30093   LIBS="-lX11 $LIBS"
30094   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30095 /* end confdefs.h.  */
30096 #include <X11/Xlib.h>
30097 int
30098 main ()
30099 {
30100 XrmInitialize ()
30101   ;
30102   return 0;
30103 }
30104 _ACEOF
30105 if ac_fn_cxx_try_link "$LINENO"; then :
30106   LIBS=$ac_save_LIBS
30107 # We can link X programs with no special library path.
30108 ac_x_libraries=
30109 else
30110   LIBS=$ac_save_LIBS
30111 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
30112 do
30113   # Don't even attempt the hair of trying to link an X program!
30114   for ac_extension in a so sl dylib la dll; do
30115     if test -r "$ac_dir/libX11.$ac_extension"; then
30116       ac_x_libraries=$ac_dir
30117       break 2
30118     fi
30119   done
30120 done
30121 fi
30122 rm -f core conftest.err conftest.$ac_objext \
30123     conftest$ac_exeext conftest.$ac_ext
30124 fi # $ac_x_libraries = no
30125 
30126 case $ac_x_includes,$ac_x_libraries in #(
30127   no,* | *,no | *\'*)
30128     # Didn't find X, or a directory has "'" in its name.
30129     ac_cv_have_x="have_x=no";; #(
30130   *)
30131     # Record where we found X for the cache.
30132     ac_cv_have_x="have_x=yes\
30133         ac_x_includes='$ac_x_includes'\
30134         ac_x_libraries='$ac_x_libraries'"
30135 esac
30136 fi
30137 ;; #(
30138     *) have_x=yes;;
30139   esac
30140   eval "$ac_cv_have_x"
30141 fi # $with_x != no
30142 
30143 if test "$have_x" != yes; then
30144   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
30145 $as_echo "$have_x" >&6; }
30146   no_x=yes
30147 else
30148   # If each of the values was on the command line, it overrides each guess.
30149   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
30150   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
30151   # Update the cache value to reflect the command line values.
30152   ac_cv_have_x="have_x=yes\
30153         ac_x_includes='$x_includes'\
30154         ac_x_libraries='$x_libraries'"
30155   { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
30156 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
30157 fi
30158 
30159 if test "$no_x" = yes; then
30160   # Not all programs may use this symbol, but it does not hurt to define it.
30161 
30162 $as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
30163 
30164   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
30165 else
30166   if test -n "$x_includes"; then
30167     X_CFLAGS="$X_CFLAGS -I$x_includes"
30168   fi
30169 
30170   # It would also be nice to do this for all -L options, not just this one.
30171   if test -n "$x_libraries"; then
30172     X_LIBS="$X_LIBS -L$x_libraries"
30173     # For Solaris; some versions of Sun CC require a space after -R and
30174     # others require no space.  Words are not sufficient . . . .
30175     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
30176 $as_echo_n "checking whether -R must be followed by a space... " >&6; }
30177     ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
30178     ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
30179     ac_cxx_werror_flag=yes
30180     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30181 /* end confdefs.h.  */
30182 
30183 int
30184 main ()
30185 {
30186 
30187   ;
30188   return 0;
30189 }
30190 _ACEOF
30191 if ac_fn_cxx_try_link "$LINENO"; then :
30192   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30193 $as_echo "no" >&6; }
30194        X_LIBS="$X_LIBS -R$x_libraries"
30195 else
30196   LIBS="$ac_xsave_LIBS -R $x_libraries"
30197        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30198 /* end confdefs.h.  */
30199 
30200 int
30201 main ()
30202 {
30203 
30204   ;
30205   return 0;
30206 }
30207 _ACEOF
30208 if ac_fn_cxx_try_link "$LINENO"; then :
30209   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30210 $as_echo "yes" >&6; }
30211           X_LIBS="$X_LIBS -R $x_libraries"
30212 else
30213   { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
30214 $as_echo "neither works" >&6; }
30215 fi
30216 rm -f core conftest.err conftest.$ac_objext \
30217     conftest$ac_exeext conftest.$ac_ext
30218 fi
30219 rm -f core conftest.err conftest.$ac_objext \
30220     conftest$ac_exeext conftest.$ac_ext
30221     ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
30222     LIBS=$ac_xsave_LIBS
30223   fi
30224 
30225   # Check for system-dependent libraries X programs must link with.
30226   # Do this before checking for the system-independent R6 libraries
30227   # (-lICE), since we may need -lsocket or whatever for X linking.
30228 
30229   if test "$ISC" = yes; then
30230     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
30231   else
30232     # Martyn Johnson says this is needed for Ultrix, if the X
30233     # libraries were built with DECnet support.  And Karl Berry says
30234     # the Alpha needs dnet_stub (dnet does not exist).
30235     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
30236     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30237 /* end confdefs.h.  */
30238 
30239 /* Override any GCC internal prototype to avoid an error.
30240    Use char because int might match the return type of a GCC
30241    builtin and then its argument prototype would still apply.  */
30242 #ifdef __cplusplus
30243 extern "C"
30244 #endif
30245 char XOpenDisplay ();
30246 int
30247 main ()
30248 {
30249 return XOpenDisplay ();
30250   ;
30251   return 0;
30252 }
30253 _ACEOF
30254 if ac_fn_cxx_try_link "$LINENO"; then :
30255 
30256 else
30257   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
30258 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
30259 if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
30260   $as_echo_n "(cached) " >&6
30261 else
30262   ac_check_lib_save_LIBS=$LIBS
30263 LIBS="-ldnet  $LIBS"
30264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30265 /* end confdefs.h.  */
30266 
30267 /* Override any GCC internal prototype to avoid an error.
30268    Use char because int might match the return type of a GCC
30269    builtin and then its argument prototype would still apply.  */
30270 #ifdef __cplusplus
30271 extern "C"
30272 #endif
30273 char dnet_ntoa ();
30274 int
30275 main ()
30276 {
30277 return dnet_ntoa ();
30278   ;
30279   return 0;
30280 }
30281 _ACEOF
30282 if ac_fn_cxx_try_link "$LINENO"; then :
30283   ac_cv_lib_dnet_dnet_ntoa=yes
30284 else
30285   ac_cv_lib_dnet_dnet_ntoa=no
30286 fi
30287 rm -f core conftest.err conftest.$ac_objext \
30288     conftest$ac_exeext conftest.$ac_ext
30289 LIBS=$ac_check_lib_save_LIBS
30290 fi
30291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
30292 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
30293 if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
30294   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
30295 fi
30296 
30297     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
30298       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
30299 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
30300 if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
30301   $as_echo_n "(cached) " >&6
30302 else
30303   ac_check_lib_save_LIBS=$LIBS
30304 LIBS="-ldnet_stub  $LIBS"
30305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30306 /* end confdefs.h.  */
30307 
30308 /* Override any GCC internal prototype to avoid an error.
30309    Use char because int might match the return type of a GCC
30310    builtin and then its argument prototype would still apply.  */
30311 #ifdef __cplusplus
30312 extern "C"
30313 #endif
30314 char dnet_ntoa ();
30315 int
30316 main ()
30317 {
30318 return dnet_ntoa ();
30319   ;
30320   return 0;
30321 }
30322 _ACEOF
30323 if ac_fn_cxx_try_link "$LINENO"; then :
30324   ac_cv_lib_dnet_stub_dnet_ntoa=yes
30325 else
30326   ac_cv_lib_dnet_stub_dnet_ntoa=no
30327 fi
30328 rm -f core conftest.err conftest.$ac_objext \
30329     conftest$ac_exeext conftest.$ac_ext
30330 LIBS=$ac_check_lib_save_LIBS
30331 fi
30332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
30333 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
30334 if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
30335   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
30336 fi
30337 
30338     fi
30339 fi
30340 rm -f core conftest.err conftest.$ac_objext \
30341     conftest$ac_exeext conftest.$ac_ext
30342     LIBS="$ac_xsave_LIBS"
30343 
30344     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
30345     # to get the SysV transport functions.
30346     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
30347     # needs -lnsl.
30348     # The nsl library prevents programs from opening the X display
30349     # on Irix 5.2, according to T.E. Dickey.
30350     # The functions gethostbyname, getservbyname, and inet_addr are
30351     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
30352     ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
30353 if test "x$ac_cv_func_gethostbyname" = xyes; then :
30354 
30355 fi
30356 
30357     if test $ac_cv_func_gethostbyname = no; then
30358       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
30359 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
30360 if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
30361   $as_echo_n "(cached) " >&6
30362 else
30363   ac_check_lib_save_LIBS=$LIBS
30364 LIBS="-lnsl  $LIBS"
30365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30366 /* end confdefs.h.  */
30367 
30368 /* Override any GCC internal prototype to avoid an error.
30369    Use char because int might match the return type of a GCC
30370    builtin and then its argument prototype would still apply.  */
30371 #ifdef __cplusplus
30372 extern "C"
30373 #endif
30374 char gethostbyname ();
30375 int
30376 main ()
30377 {
30378 return gethostbyname ();
30379   ;
30380   return 0;
30381 }
30382 _ACEOF
30383 if ac_fn_cxx_try_link "$LINENO"; then :
30384   ac_cv_lib_nsl_gethostbyname=yes
30385 else
30386   ac_cv_lib_nsl_gethostbyname=no
30387 fi
30388 rm -f core conftest.err conftest.$ac_objext \
30389     conftest$ac_exeext conftest.$ac_ext
30390 LIBS=$ac_check_lib_save_LIBS
30391 fi
30392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
30393 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
30394 if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
30395   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
30396 fi
30397 
30398       if test $ac_cv_lib_nsl_gethostbyname = no; then
30399         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
30400 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
30401 if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
30402   $as_echo_n "(cached) " >&6
30403 else
30404   ac_check_lib_save_LIBS=$LIBS
30405 LIBS="-lbsd  $LIBS"
30406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30407 /* end confdefs.h.  */
30408 
30409 /* Override any GCC internal prototype to avoid an error.
30410    Use char because int might match the return type of a GCC
30411    builtin and then its argument prototype would still apply.  */
30412 #ifdef __cplusplus
30413 extern "C"
30414 #endif
30415 char gethostbyname ();
30416 int
30417 main ()
30418 {
30419 return gethostbyname ();
30420   ;
30421   return 0;
30422 }
30423 _ACEOF
30424 if ac_fn_cxx_try_link "$LINENO"; then :
30425   ac_cv_lib_bsd_gethostbyname=yes
30426 else
30427   ac_cv_lib_bsd_gethostbyname=no
30428 fi
30429 rm -f core conftest.err conftest.$ac_objext \
30430     conftest$ac_exeext conftest.$ac_ext
30431 LIBS=$ac_check_lib_save_LIBS
30432 fi
30433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
30434 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
30435 if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
30436   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
30437 fi
30438 
30439       fi
30440     fi
30441 
30442     # lieder@skyler.mavd.honeywell.com says without -lsocket,
30443     # socket/setsockopt and other routines are undefined under SCO ODT
30444     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
30445     # on later versions), says Simon Leinen: it contains gethostby*
30446     # variants that don't use the name server (or something).  -lsocket
30447     # must be given before -lnsl if both are needed.  We assume that
30448     # if connect needs -lnsl, so does gethostbyname.
30449     ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
30450 if test "x$ac_cv_func_connect" = xyes; then :
30451 
30452 fi
30453 
30454     if test $ac_cv_func_connect = no; then
30455       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
30456 $as_echo_n "checking for connect in -lsocket... " >&6; }
30457 if ${ac_cv_lib_socket_connect+:} false; then :
30458   $as_echo_n "(cached) " >&6
30459 else
30460   ac_check_lib_save_LIBS=$LIBS
30461 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
30462 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30463 /* end confdefs.h.  */
30464 
30465 /* Override any GCC internal prototype to avoid an error.
30466    Use char because int might match the return type of a GCC
30467    builtin and then its argument prototype would still apply.  */
30468 #ifdef __cplusplus
30469 extern "C"
30470 #endif
30471 char connect ();
30472 int
30473 main ()
30474 {
30475 return connect ();
30476   ;
30477   return 0;
30478 }
30479 _ACEOF
30480 if ac_fn_cxx_try_link "$LINENO"; then :
30481   ac_cv_lib_socket_connect=yes
30482 else
30483   ac_cv_lib_socket_connect=no
30484 fi
30485 rm -f core conftest.err conftest.$ac_objext \
30486     conftest$ac_exeext conftest.$ac_ext
30487 LIBS=$ac_check_lib_save_LIBS
30488 fi
30489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
30490 $as_echo "$ac_cv_lib_socket_connect" >&6; }
30491 if test "x$ac_cv_lib_socket_connect" = xyes; then :
30492   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
30493 fi
30494 
30495     fi
30496 
30497     # Guillermo Gomez says -lposix is necessary on A/UX.
30498     ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
30499 if test "x$ac_cv_func_remove" = xyes; then :
30500 
30501 fi
30502 
30503     if test $ac_cv_func_remove = no; then
30504       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
30505 $as_echo_n "checking for remove in -lposix... " >&6; }
30506 if ${ac_cv_lib_posix_remove+:} false; then :
30507   $as_echo_n "(cached) " >&6
30508 else
30509   ac_check_lib_save_LIBS=$LIBS
30510 LIBS="-lposix  $LIBS"
30511 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30512 /* end confdefs.h.  */
30513 
30514 /* Override any GCC internal prototype to avoid an error.
30515    Use char because int might match the return type of a GCC
30516    builtin and then its argument prototype would still apply.  */
30517 #ifdef __cplusplus
30518 extern "C"
30519 #endif
30520 char remove ();
30521 int
30522 main ()
30523 {
30524 return remove ();
30525   ;
30526   return 0;
30527 }
30528 _ACEOF
30529 if ac_fn_cxx_try_link "$LINENO"; then :
30530   ac_cv_lib_posix_remove=yes
30531 else
30532   ac_cv_lib_posix_remove=no
30533 fi
30534 rm -f core conftest.err conftest.$ac_objext \
30535     conftest$ac_exeext conftest.$ac_ext
30536 LIBS=$ac_check_lib_save_LIBS
30537 fi
30538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
30539 $as_echo "$ac_cv_lib_posix_remove" >&6; }
30540 if test "x$ac_cv_lib_posix_remove" = xyes; then :
30541   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
30542 fi
30543 
30544     fi
30545 
30546     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
30547     ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
30548 if test "x$ac_cv_func_shmat" = xyes; then :
30549 
30550 fi
30551 
30552     if test $ac_cv_func_shmat = no; then
30553       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
30554 $as_echo_n "checking for shmat in -lipc... " >&6; }
30555 if ${ac_cv_lib_ipc_shmat+:} false; then :
30556   $as_echo_n "(cached) " >&6
30557 else
30558   ac_check_lib_save_LIBS=$LIBS
30559 LIBS="-lipc  $LIBS"
30560 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30561 /* end confdefs.h.  */
30562 
30563 /* Override any GCC internal prototype to avoid an error.
30564    Use char because int might match the return type of a GCC
30565    builtin and then its argument prototype would still apply.  */
30566 #ifdef __cplusplus
30567 extern "C"
30568 #endif
30569 char shmat ();
30570 int
30571 main ()
30572 {
30573 return shmat ();
30574   ;
30575   return 0;
30576 }
30577 _ACEOF
30578 if ac_fn_cxx_try_link "$LINENO"; then :
30579   ac_cv_lib_ipc_shmat=yes
30580 else
30581   ac_cv_lib_ipc_shmat=no
30582 fi
30583 rm -f core conftest.err conftest.$ac_objext \
30584     conftest$ac_exeext conftest.$ac_ext
30585 LIBS=$ac_check_lib_save_LIBS
30586 fi
30587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
30588 $as_echo "$ac_cv_lib_ipc_shmat" >&6; }
30589 if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
30590   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
30591 fi
30592 
30593     fi
30594   fi
30595 
30596   # Check for libraries that X11R6 Xt/Xaw programs need.
30597   ac_save_LDFLAGS=$LDFLAGS
30598   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
30599   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
30600   # check for ICE first), but we must link in the order -lSM -lICE or
30601   # we get undefined symbols.  So assume we have SM if we have ICE.
30602   # These have to be linked with before -lX11, unlike the other
30603   # libraries we check for below, so use a different variable.
30604   # John Interrante, Karl Berry
30605   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
30606 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
30607 if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
30608   $as_echo_n "(cached) " >&6
30609 else
30610   ac_check_lib_save_LIBS=$LIBS
30611 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
30612 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30613 /* end confdefs.h.  */
30614 
30615 /* Override any GCC internal prototype to avoid an error.
30616    Use char because int might match the return type of a GCC
30617    builtin and then its argument prototype would still apply.  */
30618 #ifdef __cplusplus
30619 extern "C"
30620 #endif
30621 char IceConnectionNumber ();
30622 int
30623 main ()
30624 {
30625 return IceConnectionNumber ();
30626   ;
30627   return 0;
30628 }
30629 _ACEOF
30630 if ac_fn_cxx_try_link "$LINENO"; then :
30631   ac_cv_lib_ICE_IceConnectionNumber=yes
30632 else
30633   ac_cv_lib_ICE_IceConnectionNumber=no
30634 fi
30635 rm -f core conftest.err conftest.$ac_objext \
30636     conftest$ac_exeext conftest.$ac_ext
30637 LIBS=$ac_check_lib_save_LIBS
30638 fi
30639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
30640 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
30641 if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
30642   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
30643 fi
30644 
30645   LDFLAGS=$ac_save_LDFLAGS
30646 
30647 fi
30648 
30649 
30650 # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
30651 # this doesn't make sense so we remove it.
30652 if test "x$COMPILE_TYPE" = xcross; then
30653   X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
30654 fi
30655 
30656 if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
30657 
30658     # Print a helpful message on how to acquire the necessary build dependency.
30659     # x11 is the help tag: freetyp2, cups, pulse, alsa etc
30660     MISSING_DEPENDENCY=x11
30661     PKGHANDLER_COMMAND=
30662 
30663     case $PKGHANDLER in
30664         apt-get)
30665                 apt_help     $MISSING_DEPENDENCY ;;
30666     yum)
30667                 yum_help     $MISSING_DEPENDENCY ;;
30668         port)
30669                 port_help    $MISSING_DEPENDENCY ;;
30670         pkgutil)
30671                 pkgutil_help $MISSING_DEPENDENCY ;;
30672         pkgadd)
30673                 pkgadd_help  $MISSING_DEPENDENCY ;;
30674     * )
30675       break ;;
30676     esac
30677 
30678     if test "x$PKGHANDLER_COMMAND" != x; then
30679         HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30680     fi
30681 
30682     as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
30683 fi
30684 
30685 # Some of the old makefiles require a setting of OPENWIN_HOME
30686 # Since the X11R6 directory has disappeared on later Linuxes,
30687 # we need to probe for it.
30688 if test "x$OPENJDK_TARGET_OS" = xlinux; then
30689     if test -d "$SYS_ROOT/usr/include/X11"; then
30690         OPENWIN_HOME="$SYS_ROOT/usr"
30691     fi
30692     # Older Linuxes (e.g. SLES 10) may still have the X11R6 directory but also
30693     # a symlink from /usr/include/X11 to ../X11R6/include/X11 so we need to
30694     # check for the X11R6 directory AFTER we checked for /usr/include/X11
30695     if test -d "$SYS_ROOT/usr/X11R6"; then
30696         OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
30697     fi
30698 fi
30699 if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30700     OPENWIN_HOME="/usr/openwin"
30701 fi
30702 
30703 
30704 
30705 #
30706 # Weird Sol10 something check...TODO change to try compile
30707 #
30708 if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
30709   if test "`uname -r`" = "5.10"; then
30710      if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
30711         X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
30712      fi
30713   fi
30714 fi
30715 
30716 ac_ext=c
30717 ac_cpp='$CPP $CPPFLAGS'
30718 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30719 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30720 ac_compiler_gnu=$ac_cv_c_compiler_gnu
30721 
30722 OLD_CFLAGS="$CFLAGS"
30723 CFLAGS="$CFLAGS $X_CFLAGS"
30724 
30725 # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
30726 for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h
30727 do :
30728   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
30729 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " # include <X11/Xlib.h>
30730                    # include <X11/Xutil.h>
30731 
30732 "
30733 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
30734   cat >>confdefs.h <<_ACEOF
30735 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
30736 _ACEOF
30737  X11_A_OK=yes
30738 else
30739   X11_A_OK=no; break
30740 fi
30741 
30742 done
30743 
30744 
30745 CFLAGS="$OLD_CFLAGS"
30746 ac_ext=cpp
30747 ac_cpp='$CXXCPP $CPPFLAGS'
30748 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30749 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30750 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30751 
30752 
30753 if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
30754 
30755     # Print a helpful message on how to acquire the necessary build dependency.
30756     # x11 is the help tag: freetyp2, cups, pulse, alsa etc
30757     MISSING_DEPENDENCY=x11
30758     PKGHANDLER_COMMAND=
30759 
30760     case $PKGHANDLER in
30761         apt-get)
30762                 apt_help     $MISSING_DEPENDENCY ;;
30763     yum)
30764                 yum_help     $MISSING_DEPENDENCY ;;
30765         port)
30766                 port_help    $MISSING_DEPENDENCY ;;
30767         pkgutil)
30768                 pkgutil_help $MISSING_DEPENDENCY ;;
30769         pkgadd)
30770                 pkgadd_help  $MISSING_DEPENDENCY ;;
30771     * )
30772       break ;;
30773     esac
30774 
30775     if test "x$PKGHANDLER_COMMAND" != x; then
30776         HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30777     fi
30778 
30779     as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h). $HELP_MSG" "$LINENO" 5
30780 fi
30781 
30782 
30783 
30784 
30785 
30786 
30787 ###############################################################################
30788 #
30789 # The common unix printing system cups is used to print from java.
30790 #
30791 
30792 # Check whether --with-cups was given.
30793 if test "${with_cups+set}" = set; then :
30794   withval=$with_cups;
30795 fi
30796 
30797 
30798 # Check whether --with-cups-include was given.
30799 if test "${with_cups_include+set}" = set; then :
30800   withval=$with_cups_include;
30801 fi
30802 
30803 
30804 if test "x$CUPS_NOT_NEEDED" = xyes; then
30805         if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
30806                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
30807 $as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
30808         fi
30809         CUPS_CFLAGS=
30810 else
30811         CUPS_FOUND=no
30812 
30813         if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
30814             as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
30815         fi
30816 
30817         if test "x${with_cups}" != x; then
30818             CUPS_CFLAGS="-I${with_cups}/include"
30819             CUPS_FOUND=yes
30820         fi
30821         if test "x${with_cups_include}" != x; then
30822             CUPS_CFLAGS="-I${with_cups_include}"
30823             CUPS_FOUND=yes
30824         fi
30825         if test "x$CUPS_FOUND" = xno; then
30826 
30827 
30828     if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
30829         # Source the builddeps file again, to make sure it uses the latest variables!
30830         . $builddepsfile
30831         # Look for a target and build machine specific resource!
30832         eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
30833         if test "x$resource" = x; then
30834             # Ok, lets instead look for a target specific resource
30835             eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
30836         fi
30837         if test "x$resource" = x; then
30838             # Ok, lets instead look for a build specific resource
30839             eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
30840         fi
30841         if test "x$resource" = x; then
30842             # Ok, lets instead look for a generic resource
30843             # (The cups comes from M4 and not the shell, thus no need for eval here.)
30844             resource=${builddep_cups}
30845         fi
30846         if test "x$resource" != x; then
30847             { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
30848 $as_echo "$as_me: Using builddeps $resource for cups" >&6;}
30849             # If the resource in the builddeps.conf file is an existing directory,
30850             # for example /java/linux/cups
30851             if test -d ${resource}; then
30852                depdir=${resource}
30853             else
30854 
30855 # cups is for example mymodule
30856 # $resource is for example libs/general/libmymod_1_2_3.zip
30857 # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
30858 # $with_builddeps_dir is for example /localhome/builddeps
30859 # depdir is the name of the variable into which we store the depdir, eg MYMOD
30860 # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
30861 # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
30862     filename=`basename $resource`
30863     filebase=`echo $filename | sed 's/\.[^\.]*$//'`
30864     filebase=${filename%%.*}
30865     extension=${filename#*.}
30866     installdir=$with_builddeps_dir/$filebase
30867     if test ! -f $installdir/$filename.unpacked; then
30868         { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
30869 $as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
30870         if test ! -d $installdir; then
30871             mkdir -p $installdir
30872         fi
30873         if test ! -d $installdir; then
30874             as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
30875         fi
30876         tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
30877         touch $tmpfile
30878         if test ! -f $tmpfile; then
30879             as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
30880         fi
30881 
30882     # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
30883     # $tmpfile is the local file name for the downloaded file.
30884     VALID_TOOL=no
30885     if test "x$BDEPS_FTP" = xwget; then
30886        VALID_TOOL=yes
30887        wget -O $tmpfile $with_builddeps_server/$resource
30888     fi
30889     if test "x$BDEPS_FTP" = xlftp; then
30890        VALID_TOOL=yes
30891        lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
30892     fi
30893     if test "x$BDEPS_FTP" = xftp; then
30894         VALID_TOOL=yes
30895         FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
30896         FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
30897         FTPUSERPWD=${FTPSERVER%%@*}
30898         if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
30899             FTPUSER=${userpwd%%:*}
30900             FTPPWD=${userpwd#*@}
30901             FTPSERVER=${FTPSERVER#*@}
30902         else
30903             FTPUSER=ftp
30904             FTPPWD=ftp
30905         fi
30906         # the "pass" command does not work on some
30907         # ftp clients (read ftp.exe) but if it works,
30908         # passive mode is better!
30909         (\
30910             echo "user $FTPUSER $FTPPWD"        ;\
30911             echo "pass"                         ;\
30912             echo "bin"                          ;\
30913             echo "get $FTPPATH $tmpfile"              ;\
30914         ) | ftp -in $FTPSERVER
30915     fi
30916     if test "x$VALID_TOOL" != xyes; then
30917        as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
30918     fi
30919 
30920         mv $tmpfile $installdir/$filename
30921         if test ! -s $installdir/$filename; then
30922             as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
30923         fi
30924         case "$extension" in
30925             zip)  echo "Unzipping $installdir/$filename..."
30926                (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
30927             ;;
30928             tar.gz) echo "Untaring $installdir/$filename..."
30929                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30930             ;;
30931             tgz) echo "Untaring $installdir/$filename..."
30932                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30933             ;;
30934             *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
30935             ;;
30936         esac
30937     fi
30938     if test -f $installdir/$filename.unpacked; then
30939         depdir=$installdir
30940     fi
30941 
30942             fi
30943             # Source the builddeps file again, because in the previous command, the depdir
30944             # was updated to point at the current build dependency install directory.
30945             . $builddepsfile
30946             # Now extract variables from the builddeps.conf files.
30947             theroot=${builddep_cups_ROOT}
30948             thecflags=${builddep_cups_CFLAGS}
30949             thelibs=${builddep_cups_LIBS}
30950             if test "x$depdir" = x; then
30951                 as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
30952             fi
30953             CUPS=$depdir
30954             if test "x$theroot" != x; then
30955                CUPS="$theroot"
30956             fi
30957             if test "x$thecflags" != x; then
30958                CUPS_CFLAGS="$thecflags"
30959             fi
30960             if test "x$thelibs" != x; then
30961                CUPS_LIBS="$thelibs"
30962             fi
30963             CUPS_FOUND=yes
30964 
30965         fi
30966 
30967     fi
30968 
30969         fi
30970         if test "x$CUPS_FOUND" = xno; then
30971             # Are the cups headers installed in the default /usr/include location?
30972             for ac_header in cups/cups.h cups/ppd.h
30973 do :
30974   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
30975 ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
30976 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
30977   cat >>confdefs.h <<_ACEOF
30978 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
30979 _ACEOF
30980  CUPS_FOUND=yes
30981                               CUPS_CFLAGS=
30982                               DEFAULT_CUPS=yes
30983 fi
30984 
30985 done
30986 
30987         fi
30988         if test "x$CUPS_FOUND" = xno; then
30989             # Getting nervous now? Lets poke around for standard Solaris third-party
30990             # package installation locations.
30991             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
30992 $as_echo_n "checking for cups headers... " >&6; }
30993             if test -s /opt/sfw/cups/include/cups/cups.h; then
30994                # An SFW package seems to be installed!
30995                CUPS_FOUND=yes
30996                CUPS_CFLAGS="-I/opt/sfw/cups/include"
30997             elif test -s /opt/csw/include/cups/cups.h; then
30998                # A CSW package seems to be installed!
30999                CUPS_FOUND=yes
31000                CUPS_CFLAGS="-I/opt/csw/include"
31001             fi
31002             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
31003 $as_echo "$CUPS_FOUND" >&6; }
31004         fi
31005         if test "x$CUPS_FOUND" = xno; then
31006 
31007     # Print a helpful message on how to acquire the necessary build dependency.
31008     # cups is the help tag: freetyp2, cups, pulse, alsa etc
31009     MISSING_DEPENDENCY=cups
31010     PKGHANDLER_COMMAND=
31011 
31012     case $PKGHANDLER in
31013         apt-get)
31014                 apt_help     $MISSING_DEPENDENCY ;;
31015     yum)
31016                 yum_help     $MISSING_DEPENDENCY ;;
31017         port)
31018                 port_help    $MISSING_DEPENDENCY ;;
31019         pkgutil)
31020                 pkgutil_help $MISSING_DEPENDENCY ;;
31021         pkgadd)
31022                 pkgadd_help  $MISSING_DEPENDENCY ;;
31023     * )
31024       break ;;
31025     esac
31026 
31027     if test "x$PKGHANDLER_COMMAND" != x; then
31028         HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31029     fi
31030 
31031             as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
31032         fi
31033 fi
31034 
31035 
31036 
31037 
31038 
31039 
31040 ###############################################################################
31041 #
31042 # The ubiquitous freetype2 library is used to render fonts.
31043 #
31044 
31045 # Check whether --with-freetype was given.
31046 if test "${with_freetype+set}" = set; then :
31047   withval=$with_freetype;
31048 fi
31049 
31050 
31051 # If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
31052 USING_SYSTEM_FT_LIB=false
31053 
31054 if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
31055         if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
31056                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
31057 $as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
31058         fi
31059         FREETYPE2_CFLAGS=
31060         FREETYPE2_LIBS=
31061         FREETYPE2_LIB_PATH=
31062 else
31063         FREETYPE2_FOUND=no
31064 
31065         if test "x$with_freetype" != x; then
31066 
31067   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31068 
31069   # Input might be given as Windows format, start by converting to
31070   # unix format.
31071   path="$with_freetype"
31072   new_path=`$CYGPATH -u "$path"`
31073 
31074   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31075   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31076   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31077   # "foo.exe" is OK but "foo" is an error.
31078   #
31079   # This test is therefore slightly more accurate than "test -f" to check for file precense.
31080   # It is also a way to make sure we got the proper file name for the real test later on.
31081   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31082   if test "x$test_shortpath" = x; then
31083     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
31084 $as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
31085     as_fn_error $? "Cannot locate the the path of with_freetype" "$LINENO" 5
31086   fi
31087 
31088   # Call helper function which possibly converts this using DOS-style short mode.
31089   # If so, the updated path is stored in $new_path.
31090 
31091   input_path="$new_path"
31092   # Check if we need to convert this using DOS-style short mode. If the path
31093   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31094   # take no chances and rewrite it.
31095   # Note: m4 eats our [], so we need to use [ and ] instead.
31096   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31097   if test "x$has_forbidden_chars" != x; then
31098     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31099     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31100     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31101     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31102       # Going to short mode and back again did indeed matter. Since short mode is
31103       # case insensitive, let's make it lowercase to improve readability.
31104       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31105       # Now convert it back to Unix-stile (cygpath)
31106       input_path=`$CYGPATH -u "$shortmode_path"`
31107       new_path="$input_path"
31108     fi
31109   fi
31110 
31111   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31112   if test "x$test_cygdrive_prefix" = x; then
31113     # As a simple fix, exclude /usr/bin since it's not a real path.
31114     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31115       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31116       # a path prefixed by /cygdrive for fixpath to work.
31117       new_path="$CYGWIN_ROOT_PATH$input_path"
31118     fi
31119   fi
31120 
31121 
31122   if test "x$path" != "x$new_path"; then
31123     with_freetype="$new_path"
31124     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
31125 $as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
31126   fi
31127 
31128   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31129 
31130   path="$with_freetype"
31131   has_colon=`$ECHO $path | $GREP ^.:`
31132   new_path="$path"
31133   if test "x$has_colon" = x; then
31134     # Not in mixed or Windows style, start by that.
31135     new_path=`cmd //c echo $path`
31136   fi
31137 
31138 
31139   input_path="$new_path"
31140   # Check if we need to convert this using DOS-style short mode. If the path
31141   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31142   # take no chances and rewrite it.
31143   # Note: m4 eats our [], so we need to use [ and ] instead.
31144   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31145   if test "x$has_forbidden_chars" != x; then
31146     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31147     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31148   fi
31149 
31150 
31151   windows_path="$new_path"
31152   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31153     unix_path=`$CYGPATH -u "$windows_path"`
31154     new_path="$unix_path"
31155   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31156     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31157     new_path="$unix_path"
31158   fi
31159 
31160   if test "x$path" != "x$new_path"; then
31161     with_freetype="$new_path"
31162     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
31163 $as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
31164   fi
31165 
31166   # Save the first 10 bytes of this path to the storage, so fixpath can work.
31167   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31168 
31169   else
31170     # We're on a posix platform. Hooray! :)
31171     path="$with_freetype"
31172     has_space=`$ECHO "$path" | $GREP " "`
31173     if test "x$has_space" != x; then
31174       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
31175 $as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
31176       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31177     fi
31178 
31179     # Use eval to expand a potential ~
31180     eval path="$path"
31181     if test ! -f "$path" && test ! -d "$path"; then
31182       as_fn_error $? "The path of with_freetype, which resolves as \"$path\", is not found." "$LINENO" 5
31183     fi
31184 
31185     with_freetype="`cd "$path"; $THEPWDCMD -L`"
31186   fi
31187 
31188             FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
31189             FREETYPE2_LIB_PATH="$with_freetype/lib"
31190             if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then
31191                 FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype"
31192                 FREETYPE2_LIB_PATH="$with_freetype/lib/amd64"
31193             fi
31194             if test "x$OPENJDK_TARGET_OS" = xwindows; then
31195                 FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
31196             fi
31197             FREETYPE2_CFLAGS="-I$with_freetype/include"
31198             if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
31199                 FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
31200             fi
31201             FREETYPE2_FOUND=yes
31202             if test "x$FREETYPE2_FOUND" = xyes; then
31203                 # Verify that the directories exist
31204                 if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
31205                    as_fn_error $? "Could not find the expected directories $with_freetype/lib and $with_freetype/include" "$LINENO" 5
31206                 fi
31207                 # List the contents of the lib.
31208                 FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
31209                 if test "x$FREETYPELIB" = x; then
31210                    as_fn_error $? "Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" "$LINENO" 5
31211                 fi
31212                 # Check one h-file
31213                 if ! test -s "$with_freetype/include/ft2build.h"; then
31214                    as_fn_error $? "Could not find $with_freetype/include/ft2build.h" "$LINENO" 5
31215                 fi
31216             fi
31217         fi
31218         if test "x$FREETYPE2_FOUND" = xno; then
31219 
31220 
31221     if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31222         # Source the builddeps file again, to make sure it uses the latest variables!
31223         . $builddepsfile
31224         # Look for a target and build machine specific resource!
31225         eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31226         if test "x$resource" = x; then
31227             # Ok, lets instead look for a target specific resource
31228             eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
31229         fi
31230         if test "x$resource" = x; then
31231             # Ok, lets instead look for a build specific resource
31232             eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
31233         fi
31234         if test "x$resource" = x; then
31235             # Ok, lets instead look for a generic resource
31236             # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
31237             resource=${builddep_freetype2}
31238         fi
31239         if test "x$resource" != x; then
31240             { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
31241 $as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
31242             # If the resource in the builddeps.conf file is an existing directory,
31243             # for example /java/linux/cups
31244             if test -d ${resource}; then
31245                depdir=${resource}
31246             else
31247 
31248 # freetype2 is for example mymodule
31249 # $resource is for example libs/general/libmymod_1_2_3.zip
31250 # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31251 # $with_builddeps_dir is for example /localhome/builddeps
31252 # depdir is the name of the variable into which we store the depdir, eg MYMOD
31253 # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31254 # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31255     filename=`basename $resource`
31256     filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31257     filebase=${filename%%.*}
31258     extension=${filename#*.}
31259     installdir=$with_builddeps_dir/$filebase
31260     if test ! -f $installdir/$filename.unpacked; then
31261         { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
31262 $as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31263         if test ! -d $installdir; then
31264             mkdir -p $installdir
31265         fi
31266         if test ! -d $installdir; then
31267             as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31268         fi
31269         tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
31270         touch $tmpfile
31271         if test ! -f $tmpfile; then
31272             as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31273         fi
31274 
31275     # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31276     # $tmpfile is the local file name for the downloaded file.
31277     VALID_TOOL=no
31278     if test "x$BDEPS_FTP" = xwget; then
31279        VALID_TOOL=yes
31280        wget -O $tmpfile $with_builddeps_server/$resource
31281     fi
31282     if test "x$BDEPS_FTP" = xlftp; then
31283        VALID_TOOL=yes
31284        lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31285     fi
31286     if test "x$BDEPS_FTP" = xftp; then
31287         VALID_TOOL=yes
31288         FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31289         FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31290         FTPUSERPWD=${FTPSERVER%%@*}
31291         if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31292             FTPUSER=${userpwd%%:*}
31293             FTPPWD=${userpwd#*@}
31294             FTPSERVER=${FTPSERVER#*@}
31295         else
31296             FTPUSER=ftp
31297             FTPPWD=ftp
31298         fi
31299         # the "pass" command does not work on some
31300         # ftp clients (read ftp.exe) but if it works,
31301         # passive mode is better!
31302         (\
31303             echo "user $FTPUSER $FTPPWD"        ;\
31304             echo "pass"                         ;\
31305             echo "bin"                          ;\
31306             echo "get $FTPPATH $tmpfile"              ;\
31307         ) | ftp -in $FTPSERVER
31308     fi
31309     if test "x$VALID_TOOL" != xyes; then
31310        as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31311     fi
31312 
31313         mv $tmpfile $installdir/$filename
31314         if test ! -s $installdir/$filename; then
31315             as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31316         fi
31317         case "$extension" in
31318             zip)  echo "Unzipping $installdir/$filename..."
31319                (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31320             ;;
31321             tar.gz) echo "Untaring $installdir/$filename..."
31322                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31323             ;;
31324             tgz) echo "Untaring $installdir/$filename..."
31325                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31326             ;;
31327             *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31328             ;;
31329         esac
31330     fi
31331     if test -f $installdir/$filename.unpacked; then
31332         depdir=$installdir
31333     fi
31334 
31335             fi
31336             # Source the builddeps file again, because in the previous command, the depdir
31337             # was updated to point at the current build dependency install directory.
31338             . $builddepsfile
31339             # Now extract variables from the builddeps.conf files.
31340             theroot=${builddep_freetype2_ROOT}
31341             thecflags=${builddep_freetype2_CFLAGS}
31342             thelibs=${builddep_freetype2_LIBS}
31343             if test "x$depdir" = x; then
31344                 as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
31345             fi
31346             FREETYPE2=$depdir
31347             if test "x$theroot" != x; then
31348                FREETYPE2="$theroot"
31349             fi
31350             if test "x$thecflags" != x; then
31351                FREETYPE2_CFLAGS="$thecflags"
31352             fi
31353             if test "x$thelibs" != x; then
31354                FREETYPE2_LIBS="$thelibs"
31355             fi
31356             FREETYPE2_FOUND=yes
31357             else FREETYPE2_FOUND=no
31358 
31359         fi
31360         else FREETYPE2_FOUND=no
31361 
31362     fi
31363 
31364             USING_SYSTEM_FT_LIB=true
31365         fi
31366         if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then
31367             FREETYPELOCATION="$PROGRAMFILES/GnuWin32"
31368 
31369   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31370 
31371   # Input might be given as Windows format, start by converting to
31372   # unix format.
31373   path="$FREETYPELOCATION"
31374   new_path=`$CYGPATH -u "$path"`
31375 
31376   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31377   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31378   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31379   # "foo.exe" is OK but "foo" is an error.
31380   #
31381   # This test is therefore slightly more accurate than "test -f" to check for file precense.
31382   # It is also a way to make sure we got the proper file name for the real test later on.
31383   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31384   if test "x$test_shortpath" = x; then
31385     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
31386 $as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
31387     as_fn_error $? "Cannot locate the the path of FREETYPELOCATION" "$LINENO" 5
31388   fi
31389 
31390   # Call helper function which possibly converts this using DOS-style short mode.
31391   # If so, the updated path is stored in $new_path.
31392 
31393   input_path="$new_path"
31394   # Check if we need to convert this using DOS-style short mode. If the path
31395   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31396   # take no chances and rewrite it.
31397   # Note: m4 eats our [], so we need to use [ and ] instead.
31398   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31399   if test "x$has_forbidden_chars" != x; then
31400     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31401     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31402     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31403     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31404       # Going to short mode and back again did indeed matter. Since short mode is
31405       # case insensitive, let's make it lowercase to improve readability.
31406       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31407       # Now convert it back to Unix-stile (cygpath)
31408       input_path=`$CYGPATH -u "$shortmode_path"`
31409       new_path="$input_path"
31410     fi
31411   fi
31412 
31413   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31414   if test "x$test_cygdrive_prefix" = x; then
31415     # As a simple fix, exclude /usr/bin since it's not a real path.
31416     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31417       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31418       # a path prefixed by /cygdrive for fixpath to work.
31419       new_path="$CYGWIN_ROOT_PATH$input_path"
31420     fi
31421   fi
31422 
31423 
31424   if test "x$path" != "x$new_path"; then
31425     FREETYPELOCATION="$new_path"
31426     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
31427 $as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
31428   fi
31429 
31430   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31431 
31432   path="$FREETYPELOCATION"
31433   has_colon=`$ECHO $path | $GREP ^.:`
31434   new_path="$path"
31435   if test "x$has_colon" = x; then
31436     # Not in mixed or Windows style, start by that.
31437     new_path=`cmd //c echo $path`
31438   fi
31439 
31440 
31441   input_path="$new_path"
31442   # Check if we need to convert this using DOS-style short mode. If the path
31443   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31444   # take no chances and rewrite it.
31445   # Note: m4 eats our [], so we need to use [ and ] instead.
31446   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31447   if test "x$has_forbidden_chars" != x; then
31448     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31449     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31450   fi
31451 
31452 
31453   windows_path="$new_path"
31454   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31455     unix_path=`$CYGPATH -u "$windows_path"`
31456     new_path="$unix_path"
31457   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31458     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31459     new_path="$unix_path"
31460   fi
31461 
31462   if test "x$path" != "x$new_path"; then
31463     FREETYPELOCATION="$new_path"
31464     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
31465 $as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
31466   fi
31467 
31468   # Save the first 10 bytes of this path to the storage, so fixpath can work.
31469   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31470 
31471   else
31472     # We're on a posix platform. Hooray! :)
31473     path="$FREETYPELOCATION"
31474     has_space=`$ECHO "$path" | $GREP " "`
31475     if test "x$has_space" != x; then
31476       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
31477 $as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
31478       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31479     fi
31480 
31481     # Use eval to expand a potential ~
31482     eval path="$path"
31483     if test ! -f "$path" && test ! -d "$path"; then
31484       as_fn_error $? "The path of FREETYPELOCATION, which resolves as \"$path\", is not found." "$LINENO" 5
31485     fi
31486 
31487     FREETYPELOCATION="`cd "$path"; $THEPWDCMD -L`"
31488   fi
31489 
31490             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard windows locations" >&5
31491 $as_echo_n "checking for freetype in some standard windows locations... " >&6; }
31492             if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then
31493                 FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include"
31494                 FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib"
31495                 FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib"
31496                 if ! test -s "$FREETYPE2_LIBS"; then
31497                    as_fn_error $? "Could not find $FREETYPE2_LIBS" "$LINENO" 5
31498                 fi
31499                 if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then
31500                    as_fn_error $? "Could not find $FREETYPE2_LIB_PATH/freetype.dll" "$LINENO" 5
31501                 fi
31502                 USING_SYSTEM_FT_LIB=true
31503                 FREETYPE2_FOUND=yes
31504             fi
31505             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
31506 $as_echo "$FREETYPE2_FOUND" >&6; }
31507         fi
31508         if test "x$FREETYPE2_FOUND" = xno; then
31509 
31510 pkg_failed=no
31511 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE2" >&5
31512 $as_echo_n "checking for FREETYPE2... " >&6; }
31513 
31514 if test -n "$FREETYPE2_CFLAGS"; then
31515     pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS"
31516  elif test -n "$PKG_CONFIG"; then
31517     if test -n "$PKG_CONFIG" && \
31518     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
31519   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31520   ac_status=$?
31521   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31522   test $ac_status = 0; }; then
31523   pkg_cv_FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
31524 else
31525   pkg_failed=yes
31526 fi
31527  else
31528     pkg_failed=untried
31529 fi
31530 if test -n "$FREETYPE2_LIBS"; then
31531     pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS"
31532  elif test -n "$PKG_CONFIG"; then
31533     if test -n "$PKG_CONFIG" && \
31534     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
31535   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31536   ac_status=$?
31537   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31538   test $ac_status = 0; }; then
31539   pkg_cv_FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
31540 else
31541   pkg_failed=yes
31542 fi
31543  else
31544     pkg_failed=untried
31545 fi
31546 
31547 
31548 
31549 if test $pkg_failed = yes; then
31550 
31551 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
31552         _pkg_short_errors_supported=yes
31553 else
31554         _pkg_short_errors_supported=no
31555 fi
31556         if test $_pkg_short_errors_supported = yes; then
31557                 FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
31558         else
31559                 FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
31560         fi
31561         # Put the nasty error message in config.log where it belongs
31562         echo "$FREETYPE2_PKG_ERRORS" >&5
31563 
31564         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31565 $as_echo "no" >&6; }
31566                 FREETYPE2_FOUND=no
31567 elif test $pkg_failed = untried; then
31568         FREETYPE2_FOUND=no
31569 else
31570         FREETYPE2_CFLAGS=$pkg_cv_FREETYPE2_CFLAGS
31571         FREETYPE2_LIBS=$pkg_cv_FREETYPE2_LIBS
31572         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31573 $as_echo "yes" >&6; }
31574         FREETYPE2_FOUND=yes
31575 fi
31576             # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
31577             FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'`
31578             USING_SYSTEM_FT_LIB=true
31579             # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
31580             if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
31581               FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'`
31582             fi
31583         fi
31584         if test "x$FREETYPE2_FOUND" = xno; then
31585             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard locations" >&5
31586 $as_echo_n "checking for freetype in some standard locations... " >&6; }
31587 
31588             if test -s /usr/X11/include/ft2build.h && test -d /usr/X11/include/freetype2/freetype; then
31589                 DEFAULT_FREETYPE_CFLAGS="-I/usr/X11/include/freetype2 -I/usr/X11/include"
31590                 DEFAULT_FREETYPE_LIBS="-L/usr/X11/lib -lfreetype"
31591             fi
31592             if test -s /usr/include/ft2build.h && test -d /usr/include/freetype2/freetype; then
31593                 DEFAULT_FREETYPE_CFLAGS="-I/usr/include/freetype2"
31594                 DEFAULT_FREETYPE_LIBS="-lfreetype"
31595             fi
31596 
31597             PREV_CXXCFLAGS="$CXXFLAGS"
31598             PREV_LDFLAGS="$LDFLAGS"
31599             CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
31600             LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
31601             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31602 /* end confdefs.h.  */
31603 #include<ft2build.h>
31604                             #include FT_FREETYPE_H
31605                            int main() { return 0; }
31606 
31607 _ACEOF
31608 if ac_fn_cxx_try_link "$LINENO"; then :
31609 
31610                               # Yes, the default cflags and libs did the trick.
31611                               FREETYPE2_FOUND=yes
31612                               FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
31613                               FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
31614 
31615 else
31616 
31617                               FREETYPE2_FOUND=no
31618 
31619 fi
31620 rm -f core conftest.err conftest.$ac_objext \
31621     conftest$ac_exeext conftest.$ac_ext
31622             CXXCFLAGS="$PREV_CXXFLAGS"
31623             LDFLAGS="$PREV_LDFLAGS"
31624             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
31625 $as_echo "$FREETYPE2_FOUND" >&6; }
31626             USING_SYSTEM_FT_LIB=true
31627         fi
31628         if test "x$FREETYPE2_FOUND" = xno; then
31629 
31630     # Print a helpful message on how to acquire the necessary build dependency.
31631     # freetype2 is the help tag: freetyp2, cups, pulse, alsa etc
31632     MISSING_DEPENDENCY=freetype2
31633     PKGHANDLER_COMMAND=
31634 
31635     case $PKGHANDLER in
31636         apt-get)
31637                 apt_help     $MISSING_DEPENDENCY ;;
31638     yum)
31639                 yum_help     $MISSING_DEPENDENCY ;;
31640         port)
31641                 port_help    $MISSING_DEPENDENCY ;;
31642         pkgutil)
31643                 pkgutil_help $MISSING_DEPENDENCY ;;
31644         pkgadd)
31645                 pkgadd_help  $MISSING_DEPENDENCY ;;
31646     * )
31647       break ;;
31648     esac
31649 
31650     if test "x$PKGHANDLER_COMMAND" != x; then
31651         HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31652     fi
31653 
31654                 as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
31655         fi
31656 
31657         if test "x$OPENJDK_TARGET_OS" != xwindows; then
31658             # AC_CHECK_LIB does not support use of cl.exe
31659             PREV_LDFLAGS="$LDFLAGS"
31660             LDFLAGS="$FREETYPE2_LIBS"
31661             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_Init_FreeType in -lfreetype" >&5
31662 $as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; }
31663 if ${ac_cv_lib_freetype_FT_Init_FreeType+:} false; then :
31664   $as_echo_n "(cached) " >&6
31665 else
31666   ac_check_lib_save_LIBS=$LIBS
31667 LIBS="-lfreetype  $LIBS"
31668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31669 /* end confdefs.h.  */
31670 
31671 /* Override any GCC internal prototype to avoid an error.
31672    Use char because int might match the return type of a GCC
31673    builtin and then its argument prototype would still apply.  */
31674 #ifdef __cplusplus
31675 extern "C"
31676 #endif
31677 char FT_Init_FreeType ();
31678 int
31679 main ()
31680 {
31681 return FT_Init_FreeType ();
31682   ;
31683   return 0;
31684 }
31685 _ACEOF
31686 if ac_fn_cxx_try_link "$LINENO"; then :
31687   ac_cv_lib_freetype_FT_Init_FreeType=yes
31688 else
31689   ac_cv_lib_freetype_FT_Init_FreeType=no
31690 fi
31691 rm -f core conftest.err conftest.$ac_objext \
31692     conftest$ac_exeext conftest.$ac_ext
31693 LIBS=$ac_check_lib_save_LIBS
31694 fi
31695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5
31696 $as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; }
31697 if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = xyes; then :
31698   FREETYPE2_FOUND=true
31699 else
31700   as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
31701 fi
31702 
31703             LDFLAGS="$PREV_LDFLAGS"
31704         fi
31705 fi
31706 
31707 
31708 
31709 
31710 
31711 
31712 
31713 
31714 
31715 ###############################################################################
31716 #
31717 # Check for alsa headers and libraries. Used on Linux/GNU systems.
31718 #
31719 
31720 # Check whether --with-alsa was given.
31721 if test "${with_alsa+set}" = set; then :
31722   withval=$with_alsa;
31723 fi
31724 
31725 
31726 # Check whether --with-alsa-include was given.
31727 if test "${with_alsa_include+set}" = set; then :
31728   withval=$with_alsa_include;
31729 fi
31730 
31731 
31732 # Check whether --with-alsa-lib was given.
31733 if test "${with_alsa_lib+set}" = set; then :
31734   withval=$with_alsa_lib;
31735 fi
31736 
31737 
31738 if test "x$ALSA_NOT_NEEDED" = xyes; then
31739         if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
31740                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
31741 $as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
31742         fi
31743         ALSA_CFLAGS=
31744         ALSA_LIBS=
31745 else
31746         ALSA_FOUND=no
31747 
31748         if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
31749             as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
31750         fi
31751 
31752         if test "x${with_alsa}" != x; then
31753             ALSA_LIBS="-L${with_alsa}/lib -lalsa"
31754             ALSA_CFLAGS="-I${with_alsa}/include"
31755             ALSA_FOUND=yes
31756         fi
31757         if test "x${with_alsa_include}" != x; then
31758             ALSA_CFLAGS="-I${with_alsa_include}"
31759             ALSA_FOUND=yes
31760         fi
31761         if test "x${with_alsa_lib}" != x; then
31762             ALSA_LIBS="-L${with_alsa_lib} -lalsa"
31763             ALSA_FOUND=yes
31764         fi
31765         if test "x$ALSA_FOUND" = xno; then
31766 
31767 
31768     if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31769         # Source the builddeps file again, to make sure it uses the latest variables!
31770         . $builddepsfile
31771         # Look for a target and build machine specific resource!
31772         eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31773         if test "x$resource" = x; then
31774             # Ok, lets instead look for a target specific resource
31775             eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
31776         fi
31777         if test "x$resource" = x; then
31778             # Ok, lets instead look for a build specific resource
31779             eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
31780         fi
31781         if test "x$resource" = x; then
31782             # Ok, lets instead look for a generic resource
31783             # (The alsa comes from M4 and not the shell, thus no need for eval here.)
31784             resource=${builddep_alsa}
31785         fi
31786         if test "x$resource" != x; then
31787             { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
31788 $as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
31789             # If the resource in the builddeps.conf file is an existing directory,
31790             # for example /java/linux/cups
31791             if test -d ${resource}; then
31792                depdir=${resource}
31793             else
31794 
31795 # alsa is for example mymodule
31796 # $resource is for example libs/general/libmymod_1_2_3.zip
31797 # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31798 # $with_builddeps_dir is for example /localhome/builddeps
31799 # depdir is the name of the variable into which we store the depdir, eg MYMOD
31800 # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31801 # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31802     filename=`basename $resource`
31803     filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31804     filebase=${filename%%.*}
31805     extension=${filename#*.}
31806     installdir=$with_builddeps_dir/$filebase
31807     if test ! -f $installdir/$filename.unpacked; then
31808         { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
31809 $as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31810         if test ! -d $installdir; then
31811             mkdir -p $installdir
31812         fi
31813         if test ! -d $installdir; then
31814             as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31815         fi
31816         tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
31817         touch $tmpfile
31818         if test ! -f $tmpfile; then
31819             as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31820         fi
31821 
31822     # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31823     # $tmpfile is the local file name for the downloaded file.
31824     VALID_TOOL=no
31825     if test "x$BDEPS_FTP" = xwget; then
31826        VALID_TOOL=yes
31827        wget -O $tmpfile $with_builddeps_server/$resource
31828     fi
31829     if test "x$BDEPS_FTP" = xlftp; then
31830        VALID_TOOL=yes
31831        lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31832     fi
31833     if test "x$BDEPS_FTP" = xftp; then
31834         VALID_TOOL=yes
31835         FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31836         FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31837         FTPUSERPWD=${FTPSERVER%%@*}
31838         if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31839             FTPUSER=${userpwd%%:*}
31840             FTPPWD=${userpwd#*@}
31841             FTPSERVER=${FTPSERVER#*@}
31842         else
31843             FTPUSER=ftp
31844             FTPPWD=ftp
31845         fi
31846         # the "pass" command does not work on some
31847         # ftp clients (read ftp.exe) but if it works,
31848         # passive mode is better!
31849         (\
31850             echo "user $FTPUSER $FTPPWD"        ;\
31851             echo "pass"                         ;\
31852             echo "bin"                          ;\
31853             echo "get $FTPPATH $tmpfile"              ;\
31854         ) | ftp -in $FTPSERVER
31855     fi
31856     if test "x$VALID_TOOL" != xyes; then
31857        as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31858     fi
31859 
31860         mv $tmpfile $installdir/$filename
31861         if test ! -s $installdir/$filename; then
31862             as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31863         fi
31864         case "$extension" in
31865             zip)  echo "Unzipping $installdir/$filename..."
31866                (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31867             ;;
31868             tar.gz) echo "Untaring $installdir/$filename..."
31869                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31870             ;;
31871             tgz) echo "Untaring $installdir/$filename..."
31872                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31873             ;;
31874             *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31875             ;;
31876         esac
31877     fi
31878     if test -f $installdir/$filename.unpacked; then
31879         depdir=$installdir
31880     fi
31881 
31882             fi
31883             # Source the builddeps file again, because in the previous command, the depdir
31884             # was updated to point at the current build dependency install directory.
31885             . $builddepsfile
31886             # Now extract variables from the builddeps.conf files.
31887             theroot=${builddep_alsa_ROOT}
31888             thecflags=${builddep_alsa_CFLAGS}
31889             thelibs=${builddep_alsa_LIBS}
31890             if test "x$depdir" = x; then
31891                 as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
31892             fi
31893             ALSA=$depdir
31894             if test "x$theroot" != x; then
31895                ALSA="$theroot"
31896             fi
31897             if test "x$thecflags" != x; then
31898                ALSA_CFLAGS="$thecflags"
31899             fi
31900             if test "x$thelibs" != x; then
31901                ALSA_LIBS="$thelibs"
31902             fi
31903             ALSA_FOUND=yes
31904             else ALSA_FOUND=no
31905 
31906         fi
31907         else ALSA_FOUND=no
31908 
31909     fi
31910 
31911         fi
31912         if test "x$ALSA_FOUND" = xno; then
31913 
31914 pkg_failed=no
31915 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
31916 $as_echo_n "checking for ALSA... " >&6; }
31917 
31918 if test -n "$ALSA_CFLAGS"; then
31919     pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
31920  elif test -n "$PKG_CONFIG"; then
31921     if test -n "$PKG_CONFIG" && \
31922     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
31923   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
31924   ac_status=$?
31925   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31926   test $ac_status = 0; }; then
31927   pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
31928 else
31929   pkg_failed=yes
31930 fi
31931  else
31932     pkg_failed=untried
31933 fi
31934 if test -n "$ALSA_LIBS"; then
31935     pkg_cv_ALSA_LIBS="$ALSA_LIBS"
31936  elif test -n "$PKG_CONFIG"; then
31937     if test -n "$PKG_CONFIG" && \
31938     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
31939   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
31940   ac_status=$?
31941   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31942   test $ac_status = 0; }; then
31943   pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
31944 else
31945   pkg_failed=yes
31946 fi
31947  else
31948     pkg_failed=untried
31949 fi
31950 
31951 
31952 
31953 if test $pkg_failed = yes; then
31954 
31955 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
31956         _pkg_short_errors_supported=yes
31957 else
31958         _pkg_short_errors_supported=no
31959 fi
31960         if test $_pkg_short_errors_supported = yes; then
31961                 ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
31962         else
31963                 ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
31964         fi
31965         # Put the nasty error message in config.log where it belongs
31966         echo "$ALSA_PKG_ERRORS" >&5
31967 
31968         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31969 $as_echo "no" >&6; }
31970                 ALSA_FOUND=no
31971 elif test $pkg_failed = untried; then
31972         ALSA_FOUND=no
31973 else
31974         ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
31975         ALSA_LIBS=$pkg_cv_ALSA_LIBS
31976         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31977 $as_echo "yes" >&6; }
31978         ALSA_FOUND=yes
31979 fi
31980         fi
31981         if test "x$ALSA_FOUND" = xno; then
31982             for ac_header in alsa/asoundlib.h
31983 do :
31984   ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
31985 if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
31986   cat >>confdefs.h <<_ACEOF
31987 #define HAVE_ALSA_ASOUNDLIB_H 1
31988 _ACEOF
31989  ALSA_FOUND=yes
31990                               ALSA_CFLAGS=-Iignoreme
31991                               ALSA_LIBS=-lasound
31992                               DEFAULT_ALSA=yes
31993 else
31994   ALSA_FOUND=no
31995 fi
31996 
31997 done
31998 
31999         fi
32000         if test "x$ALSA_FOUND" = xno; then
32001 
32002     # Print a helpful message on how to acquire the necessary build dependency.
32003     # alsa is the help tag: freetyp2, cups, pulse, alsa etc
32004     MISSING_DEPENDENCY=alsa
32005     PKGHANDLER_COMMAND=
32006 
32007     case $PKGHANDLER in
32008         apt-get)
32009                 apt_help     $MISSING_DEPENDENCY ;;
32010     yum)
32011                 yum_help     $MISSING_DEPENDENCY ;;
32012         port)
32013                 port_help    $MISSING_DEPENDENCY ;;
32014         pkgutil)
32015                 pkgutil_help $MISSING_DEPENDENCY ;;
32016         pkgadd)
32017                 pkgadd_help  $MISSING_DEPENDENCY ;;
32018     * )
32019       break ;;
32020     esac
32021 
32022     if test "x$PKGHANDLER_COMMAND" != x; then
32023         HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
32024     fi
32025 
32026             as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
32027         fi
32028 fi
32029 
32030 
32031 
32032 
32033 
32034 
32035 
32036 ###############################################################################
32037 #
32038 # Check for the jpeg library
32039 #
32040 
32041 USE_EXTERNAL_LIBJPEG=true
32042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
32043 $as_echo_n "checking for main in -ljpeg... " >&6; }
32044 if ${ac_cv_lib_jpeg_main+:} false; then :
32045   $as_echo_n "(cached) " >&6
32046 else
32047   ac_check_lib_save_LIBS=$LIBS
32048 LIBS="-ljpeg  $LIBS"
32049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32050 /* end confdefs.h.  */
32051 
32052 
32053 int
32054 main ()
32055 {
32056 return main ();
32057   ;
32058   return 0;
32059 }
32060 _ACEOF
32061 if ac_fn_cxx_try_link "$LINENO"; then :
32062   ac_cv_lib_jpeg_main=yes
32063 else
32064   ac_cv_lib_jpeg_main=no
32065 fi
32066 rm -f core conftest.err conftest.$ac_objext \
32067     conftest$ac_exeext conftest.$ac_ext
32068 LIBS=$ac_check_lib_save_LIBS
32069 fi
32070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
32071 $as_echo "$ac_cv_lib_jpeg_main" >&6; }
32072 if test "x$ac_cv_lib_jpeg_main" = xyes; then :
32073   cat >>confdefs.h <<_ACEOF
32074 #define HAVE_LIBJPEG 1
32075 _ACEOF
32076 
32077   LIBS="-ljpeg $LIBS"
32078 
32079 else
32080    USE_EXTERNAL_LIBJPEG=false
32081                { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
32082 $as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
32083 
32084 fi
32085 
32086 
32087 
32088 ###############################################################################
32089 #
32090 # Check for the gif library
32091 #
32092 
32093 
32094 # Check whether --with-giflib was given.
32095 if test "${with_giflib+set}" = set; then :
32096   withval=$with_giflib;
32097 fi
32098 
32099 
32100 
32101 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
32102 $as_echo_n "checking for which giflib to use... " >&6; }
32103 
32104 # default is bundled
32105 DEFAULT_GIFLIB=bundled
32106 
32107 #
32108 # if user didn't specify, use DEFAULT_GIFLIB
32109 #
32110 if test "x${with_giflib}" = "x"; then
32111     with_giflib=${DEFAULT_GIFLIB}
32112 fi
32113 
32114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
32115 $as_echo "${with_giflib}" >&6; }
32116 
32117 if test "x${with_giflib}" = "xbundled"; then
32118     USE_EXTERNAL_LIBGIF=false
32119 elif test "x${with_giflib}" = "xsystem"; then
32120     ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
32121 if test "x$ac_cv_header_gif_lib_h" = xyes; then :
32122 
32123 else
32124    as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
32125 fi
32126 
32127 
32128     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
32129 $as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
32130 if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
32131   $as_echo_n "(cached) " >&6
32132 else
32133   ac_check_lib_save_LIBS=$LIBS
32134 LIBS="-lgif  $LIBS"
32135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32136 /* end confdefs.h.  */
32137 
32138 /* Override any GCC internal prototype to avoid an error.
32139    Use char because int might match the return type of a GCC
32140    builtin and then its argument prototype would still apply.  */
32141 #ifdef __cplusplus
32142 extern "C"
32143 #endif
32144 char DGifGetCode ();
32145 int
32146 main ()
32147 {
32148 return DGifGetCode ();
32149   ;
32150   return 0;
32151 }
32152 _ACEOF
32153 if ac_fn_cxx_try_link "$LINENO"; then :
32154   ac_cv_lib_gif_DGifGetCode=yes
32155 else
32156   ac_cv_lib_gif_DGifGetCode=no
32157 fi
32158 rm -f core conftest.err conftest.$ac_objext \
32159     conftest$ac_exeext conftest.$ac_ext
32160 LIBS=$ac_check_lib_save_LIBS
32161 fi
32162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
32163 $as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
32164 if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
32165   cat >>confdefs.h <<_ACEOF
32166 #define HAVE_LIBGIF 1
32167 _ACEOF
32168 
32169   LIBS="-lgif $LIBS"
32170 
32171 else
32172    as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
32173 fi
32174 
32175 
32176     USE_EXTERNAL_LIBGIF=true
32177 else
32178     as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
32179 fi
32180 
32181 
32182 ###############################################################################
32183 #
32184 # Check for the zlib library
32185 #
32186 
32187 
32188 # Check whether --with-zlib was given.
32189 if test "${with_zlib+set}" = set; then :
32190   withval=$with_zlib;
32191 fi
32192 
32193 
32194 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
32195 $as_echo_n "checking for compress in -lz... " >&6; }
32196 if ${ac_cv_lib_z_compress+:} false; then :
32197   $as_echo_n "(cached) " >&6
32198 else
32199   ac_check_lib_save_LIBS=$LIBS
32200 LIBS="-lz  $LIBS"
32201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32202 /* end confdefs.h.  */
32203 
32204 /* Override any GCC internal prototype to avoid an error.
32205    Use char because int might match the return type of a GCC
32206    builtin and then its argument prototype would still apply.  */
32207 #ifdef __cplusplus
32208 extern "C"
32209 #endif
32210 char compress ();
32211 int
32212 main ()
32213 {
32214 return compress ();
32215   ;
32216   return 0;
32217 }
32218 _ACEOF
32219 if ac_fn_cxx_try_link "$LINENO"; then :
32220   ac_cv_lib_z_compress=yes
32221 else
32222   ac_cv_lib_z_compress=no
32223 fi
32224 rm -f core conftest.err conftest.$ac_objext \
32225     conftest$ac_exeext conftest.$ac_ext
32226 LIBS=$ac_check_lib_save_LIBS
32227 fi
32228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
32229 $as_echo "$ac_cv_lib_z_compress" >&6; }
32230 if test "x$ac_cv_lib_z_compress" = xyes; then :
32231    ZLIB_FOUND=yes
32232 else
32233    ZLIB_FOUND=no
32234 fi
32235 
32236 
32237 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
32238 $as_echo_n "checking for which zlib to use... " >&6; }
32239 
32240 DEFAULT_ZLIB=bundled
32241 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32242 #
32243 # On macosx default is system...on others default is
32244 #
32245     DEFAULT_ZLIB=system
32246 fi
32247 
32248 if test "x${ZLIB_FOUND}" != "xyes"; then
32249 #
32250 # If we don't find any system...set default to bundled
32251 #
32252     DEFAULT_ZLIB=bundled
32253 fi
32254 
32255 #
32256 # If user didn't specify, use DEFAULT_ZLIB
32257 #
32258 if test "x${with_zlib}" = "x"; then
32259     with_zlib=${DEFAULT_ZLIB}
32260 fi
32261 
32262 if test "x${with_zlib}" = "xbundled"; then
32263     USE_EXTERNAL_LIBZ=false
32264     { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
32265 $as_echo "bundled" >&6; }
32266 elif test "x${with_zlib}" = "xsystem"; then
32267     if test "x${ZLIB_FOUND}" = "xyes"; then
32268         USE_EXTERNAL_LIBZ=true
32269         { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
32270 $as_echo "system" >&6; }
32271     else
32272         { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
32273 $as_echo "system not found" >&6; }
32274         as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
32275     fi
32276 else
32277     as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
32278 fi
32279 
32280 
32281 
32282 ###############################################################################
32283 LIBZIP_CAN_USE_MMAP=true
32284 
32285 
32286 
32287 ###############################################################################
32288 #
32289 # Check if altzone exists in time.h
32290 #
32291 
32292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32293 /* end confdefs.h.  */
32294 #include <time.h>
32295 int
32296 main ()
32297 {
32298 return (int)altzone;
32299   ;
32300   return 0;
32301 }
32302 _ACEOF
32303 if ac_fn_cxx_try_link "$LINENO"; then :
32304   has_altzone=yes
32305 else
32306   has_altzone=no
32307 fi
32308 rm -f core conftest.err conftest.$ac_objext \
32309     conftest$ac_exeext conftest.$ac_ext
32310 if test "x$has_altzone" = xyes; then
32311 
32312 $as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
32313 
32314 fi
32315 
32316 ###############################################################################
32317 #
32318 # Check the maths library
32319 #
32320 
32321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
32322 $as_echo_n "checking for cos in -lm... " >&6; }
32323 if ${ac_cv_lib_m_cos+:} false; then :
32324   $as_echo_n "(cached) " >&6
32325 else
32326   ac_check_lib_save_LIBS=$LIBS
32327 LIBS="-lm  $LIBS"
32328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32329 /* end confdefs.h.  */
32330 
32331 /* Override any GCC internal prototype to avoid an error.
32332    Use char because int might match the return type of a GCC
32333    builtin and then its argument prototype would still apply.  */
32334 #ifdef __cplusplus
32335 extern "C"
32336 #endif
32337 char cos ();
32338 int
32339 main ()
32340 {
32341 return cos ();
32342   ;
32343   return 0;
32344 }
32345 _ACEOF
32346 if ac_fn_cxx_try_link "$LINENO"; then :
32347   ac_cv_lib_m_cos=yes
32348 else
32349   ac_cv_lib_m_cos=no
32350 fi
32351 rm -f core conftest.err conftest.$ac_objext \
32352     conftest$ac_exeext conftest.$ac_ext
32353 LIBS=$ac_check_lib_save_LIBS
32354 fi
32355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
32356 $as_echo "$ac_cv_lib_m_cos" >&6; }
32357 if test "x$ac_cv_lib_m_cos" = xyes; then :
32358   cat >>confdefs.h <<_ACEOF
32359 #define HAVE_LIBM 1
32360 _ACEOF
32361 
32362   LIBS="-lm $LIBS"
32363 
32364 else
32365 
32366                   { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
32367 $as_echo "$as_me: Maths library was not found" >&6;}
32368 
32369 fi
32370 
32371 
32372 
32373 ###############################################################################
32374 #
32375 # Check for libdl.so
32376 
32377 save_LIBS="$LIBS"
32378 LIBS=""
32379 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
32380 $as_echo_n "checking for dlopen in -ldl... " >&6; }
32381 if ${ac_cv_lib_dl_dlopen+:} false; then :
32382   $as_echo_n "(cached) " >&6
32383 else
32384   ac_check_lib_save_LIBS=$LIBS
32385 LIBS="-ldl  $LIBS"
32386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32387 /* end confdefs.h.  */
32388 
32389 /* Override any GCC internal prototype to avoid an error.
32390    Use char because int might match the return type of a GCC
32391    builtin and then its argument prototype would still apply.  */
32392 #ifdef __cplusplus
32393 extern "C"
32394 #endif
32395 char dlopen ();
32396 int
32397 main ()
32398 {
32399 return dlopen ();
32400   ;
32401   return 0;
32402 }
32403 _ACEOF
32404 if ac_fn_cxx_try_link "$LINENO"; then :
32405   ac_cv_lib_dl_dlopen=yes
32406 else
32407   ac_cv_lib_dl_dlopen=no
32408 fi
32409 rm -f core conftest.err conftest.$ac_objext \
32410     conftest$ac_exeext conftest.$ac_ext
32411 LIBS=$ac_check_lib_save_LIBS
32412 fi
32413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
32414 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
32415 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
32416   cat >>confdefs.h <<_ACEOF
32417 #define HAVE_LIBDL 1
32418 _ACEOF
32419 
32420   LIBS="-ldl $LIBS"
32421 
32422 fi
32423 
32424 LIBDL="$LIBS"
32425 
32426 LIBS="$save_LIBS"
32427 
32428 
32429 
32430 ###############################################################################
32431 #
32432 # statically link libstdc++ before C++ ABI is stablized on Linux unless
32433 # dynamic build is configured on command line.
32434 #
32435 
32436 # Check whether --with-stdc++lib was given.
32437 if test "${with_stdc__lib+set}" = set; then :
32438   withval=$with_stdc__lib;
32439     if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
32440         && test "x$with_stdc__lib" != xdefault; then
32441       as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
32442     fi
32443 
32444 else
32445   with_stdc__lib=default
32446 
32447 fi
32448 
32449 
32450 if test "x$OPENJDK_TARGET_OS" = xlinux; then
32451     # Test if -lstdc++ works.
32452     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
32453 $as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
32454     ac_ext=cpp
32455 ac_cpp='$CXXCPP $CPPFLAGS'
32456 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32457 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32458 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32459 
32460     OLD_CXXFLAGS="$CXXFLAGS"
32461     CXXFLAGS="$CXXFLAGS -lstdc++"
32462     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32463 /* end confdefs.h.  */
32464 
32465 int
32466 main ()
32467 {
32468 return 0;
32469   ;
32470   return 0;
32471 }
32472 _ACEOF
32473 if ac_fn_cxx_try_link "$LINENO"; then :
32474   has_dynamic_libstdcxx=yes
32475 else
32476   has_dynamic_libstdcxx=no
32477 fi
32478 rm -f core conftest.err conftest.$ac_objext \
32479     conftest$ac_exeext conftest.$ac_ext
32480     CXXFLAGS="$OLD_CXXFLAGS"
32481     ac_ext=cpp
32482 ac_cpp='$CXXCPP $CPPFLAGS'
32483 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32484 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32485 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32486 
32487     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
32488 $as_echo "$has_dynamic_libstdcxx" >&6; }
32489 
32490     # Test if stdc++ can be linked statically.
32491     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
32492 $as_echo_n "checking if static link of stdc++ is possible... " >&6; }
32493     STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
32494     ac_ext=cpp
32495 ac_cpp='$CXXCPP $CPPFLAGS'
32496 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32497 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32498 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32499 
32500     OLD_LIBS="$LIBS"
32501     OLD_CXX="$CXX"
32502     LIBS="$STATIC_STDCXX_FLAGS"
32503     CXX="$CC"
32504     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32505 /* end confdefs.h.  */
32506 
32507 int
32508 main ()
32509 {
32510 return 0;
32511   ;
32512   return 0;
32513 }
32514 _ACEOF
32515 if ac_fn_cxx_try_link "$LINENO"; then :
32516   has_static_libstdcxx=yes
32517 else
32518   has_static_libstdcxx=no
32519 fi
32520 rm -f core conftest.err conftest.$ac_objext \
32521     conftest$ac_exeext conftest.$ac_ext
32522     LIBS="$OLD_LIBS"
32523     CXX="$OLD_CXX"
32524     ac_ext=cpp
32525 ac_cpp='$CXXCPP $CPPFLAGS'
32526 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32527 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32528 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32529 
32530     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
32531 $as_echo "$has_static_libstdcxx" >&6; }
32532 
32533     if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
32534         as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
32535     fi
32536 
32537     if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
32538         as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
32539     fi
32540 
32541     if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
32542         as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
32543     fi
32544 
32545     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
32546 $as_echo_n "checking how to link with libstdc++... " >&6; }
32547     # If dynamic was requested, it's available since it would fail above otherwise.
32548     # If dynamic wasn't requested, go with static unless it isn't available.
32549     if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32550         LIBCXX="$LIBCXX -lstdc++"
32551         LDCXX="$CXX"
32552         STATIC_CXX_SETTING="STATIC_CXX=false"
32553         { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
32554 $as_echo "dynamic" >&6; }
32555     else
32556         LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
32557         LDCXX="$CC"
32558         STATIC_CXX_SETTING="STATIC_CXX=true"
32559         { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
32560 $as_echo "static" >&6; }
32561     fi
32562 fi
32563 
32564 
32565 if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32566     # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
32567 
32568 pkg_failed=no
32569 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
32570 $as_echo_n "checking for LIBFFI... " >&6; }
32571 
32572 if test -n "$LIBFFI_CFLAGS"; then
32573     pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
32574  elif test -n "$PKG_CONFIG"; then
32575     if test -n "$PKG_CONFIG" && \
32576     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
32577   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
32578   ac_status=$?
32579   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32580   test $ac_status = 0; }; then
32581   pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
32582 else
32583   pkg_failed=yes
32584 fi
32585  else
32586     pkg_failed=untried
32587 fi
32588 if test -n "$LIBFFI_LIBS"; then
32589     pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
32590  elif test -n "$PKG_CONFIG"; then
32591     if test -n "$PKG_CONFIG" && \
32592     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
32593   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
32594   ac_status=$?
32595   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32596   test $ac_status = 0; }; then
32597   pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
32598 else
32599   pkg_failed=yes
32600 fi
32601  else
32602     pkg_failed=untried
32603 fi
32604 
32605 
32606 
32607 if test $pkg_failed = yes; then
32608 
32609 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
32610         _pkg_short_errors_supported=yes
32611 else
32612         _pkg_short_errors_supported=no
32613 fi
32614         if test $_pkg_short_errors_supported = yes; then
32615                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
32616         else
32617                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
32618         fi
32619         # Put the nasty error message in config.log where it belongs
32620         echo "$LIBFFI_PKG_ERRORS" >&5
32621 
32622         as_fn_error $? "Package requirements (libffi) were not met:
32623 
32624 $LIBFFI_PKG_ERRORS
32625 
32626 Consider adjusting the PKG_CONFIG_PATH environment variable if you
32627 installed software in a non-standard prefix.
32628 
32629 Alternatively, you may set the environment variables LIBFFI_CFLAGS
32630 and LIBFFI_LIBS to avoid the need to call pkg-config.
32631 See the pkg-config man page for more details.
32632 " "$LINENO" 5
32633 elif test $pkg_failed = untried; then
32634         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32635 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32636 as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
32637 is in your PATH or set the PKG_CONFIG environment variable to the full
32638 path to pkg-config.
32639 
32640 Alternatively, you may set the environment variables LIBFFI_CFLAGS
32641 and LIBFFI_LIBS to avoid the need to call pkg-config.
32642 See the pkg-config man page for more details.
32643 
32644 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
32645 See \`config.log' for more details" "$LINENO" 5; }
32646 else
32647         LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
32648         LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
32649         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32650 $as_echo "yes" >&6; }
32651         :
32652 fi
32653 
32654 fi
32655 
32656 if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32657     # Extract the first word of "llvm-config", so it can be a program name with args.
32658 set dummy llvm-config; ac_word=$2
32659 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32660 $as_echo_n "checking for $ac_word... " >&6; }
32661 if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
32662   $as_echo_n "(cached) " >&6
32663 else
32664   if test -n "$LLVM_CONFIG"; then
32665   ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
32666 else
32667 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32668 for as_dir in $PATH
32669 do
32670   IFS=$as_save_IFS
32671   test -z "$as_dir" && as_dir=.
32672     for ac_exec_ext in '' $ac_executable_extensions; do
32673   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
32674     ac_cv_prog_LLVM_CONFIG="llvm-config"
32675     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32676     break 2
32677   fi
32678 done
32679   done
32680 IFS=$as_save_IFS
32681 
32682 fi
32683 fi
32684 LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
32685 if test -n "$LLVM_CONFIG"; then
32686   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
32687 $as_echo "$LLVM_CONFIG" >&6; }
32688 else
32689   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32690 $as_echo "no" >&6; }
32691 fi
32692 
32693 
32694 
32695     if test "x$LLVM_CONFIG" != xllvm-config; then
32696         as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
32697     fi
32698 
32699     llvm_components="jit mcjit engine nativecodegen native"
32700     unset LLVM_CFLAGS
32701     for flag in $("$LLVM_CONFIG" --cxxflags); do
32702       if echo "${flag}" | grep -q '^-[ID]'; then
32703         if test "${flag}" != "-D_DEBUG" ; then
32704           if test "${LLVM_CFLAGS}" != "" ; then
32705             LLVM_CFLAGS="${LLVM_CFLAGS} "
32706           fi
32707           LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
32708         fi
32709       fi
32710     done
32711     llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
32712     LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
32713 
32714     unset LLVM_LDFLAGS
32715     for flag in $("${LLVM_CONFIG}" --ldflags); do
32716       if echo "${flag}" | grep -q '^-L'; then
32717         if test "${LLVM_LDFLAGS}" != ""; then
32718           LLVM_LDFLAGS="${LLVM_LDFLAGS} "
32719         fi
32720         LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
32721       fi
32722     done
32723 
32724     unset LLVM_LIBS
32725     for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
32726       if echo "${flag}" | grep -q '^-l'; then
32727         if test "${LLVM_LIBS}" != ""; then
32728           LLVM_LIBS="${LLVM_LIBS} "
32729         fi
32730         LLVM_LIBS="${LLVM_LIBS}${flag}"
32731       fi
32732     done
32733 
32734 
32735 
32736 
32737 fi
32738 
32739 # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
32740 if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
32741     LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
32742 fi
32743 
32744 # TODO better (platform agnostic) test
32745 if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
32746     LIBCXX="-lstdc++"
32747 fi
32748 
32749 
32750 
32751 
32752 
32753 # After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper
32754 
32755 # When using cygwin or msys, we need a wrapper binary that renames
32756 # /cygdrive/c/ arguments into c:/ arguments and peeks into
32757 # @files and rewrites these too! This wrapper binary is
32758 # called fixpath.
32759 FIXPATH=
32760 if test "x$OPENJDK_BUILD_OS" = xwindows; then
32761     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
32762 $as_echo_n "checking if fixpath can be created... " >&6; }
32763     FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
32764     FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
32765     if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
32766       FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
32767       FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
32768       # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
32769       FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
32770     elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
32771       FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
32772       FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
32773 
32774       # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
32775       # @ was chosen as separator to minimize risk of other tools messing around with it
32776       all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
32777       fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
32778 
32779       FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
32780     fi
32781     rm -f $OUTPUT_ROOT/fixpath*
32782     cd $OUTPUT_ROOT
32783     $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
32784     cd $CURDIR
32785 
32786     if test ! -x $OUTPUT_ROOT/fixpath.exe; then
32787         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32788 $as_echo "no" >&6; }
32789         cat $OUTPUT_ROOT/fixpath1.log
32790         as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
32791     fi
32792     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32793 $as_echo "yes" >&6; }
32794     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
32795 $as_echo_n "checking if fixpath.exe works... " >&6; }
32796     cd $OUTPUT_ROOT
32797     $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
32798     cd $CURDIR
32799     if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
32800         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32801 $as_echo "no" >&6; }
32802         cat $OUTPUT_ROOT/fixpath2.log
32803         as_fn_error $? "fixpath did not work!" "$LINENO" 5
32804     fi
32805     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32806 $as_echo "yes" >&6; }
32807     rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
32808 fi
32809 
32810 
32811 
32812 
32813 ###############################################################################
32814 #
32815 # We need to do some final tweaking, when everything else is done.
32816 #
32817 ###############################################################################
32818 
32819 
32820 HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
32821 
32822 
32823 # The name of the Service Agent jar.
32824 SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
32825 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
32826   SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
32827 fi
32828 
32829 
32830 
32831 
32832 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
32833 $as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
32834 
32835 if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
32836     ENABLE_INTREE_EC=yes
32837     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32838 $as_echo "yes" >&6; }
32839 else
32840     ENABLE_INTREE_EC=no
32841     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32842 $as_echo "no" >&6; }
32843 fi
32844 
32845 
32846 
32847 
32848 ###############################################################################
32849 #
32850 # Configure parts of the build that only affect the build performance,
32851 # not the result.
32852 #
32853 ###############################################################################
32854 
32855 
32856   # How many cores do we have on this build system?
32857 
32858 # Check whether --with-num-cores was given.
32859 if test "${with_num_cores+set}" = set; then :
32860   withval=$with_num_cores;
32861 fi
32862 
32863   if test "x$with_num_cores" = x; then
32864     # The number of cores were not specified, try to probe them.
32865 
32866     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
32867 $as_echo_n "checking for number of cores... " >&6; }
32868     NUM_CORES=1
32869     FOUND_CORES=no
32870 
32871     if test -f /proc/cpuinfo; then
32872         # Looks like a Linux (or cygwin) system
32873         NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
32874         FOUND_CORES=yes
32875     elif test -x /usr/sbin/psrinfo; then
32876         # Looks like a Solaris system
32877         NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
32878         FOUND_CORES=yes
32879     elif test -x /usr/sbin/system_profiler; then
32880         # Looks like a MacOSX system
32881         NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
32882         FOUND_CORES=yes
32883     elif test -n "$NUMBER_OF_PROCESSORS"; then
32884         # On windows, look in the env
32885         NUM_CORES=$NUMBER_OF_PROCESSORS
32886         FOUND_CORES=yes
32887     fi
32888 
32889     if test "x$FOUND_CORES" = xyes; then
32890         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
32891 $as_echo "$NUM_CORES" >&6; }
32892     else
32893         { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
32894 $as_echo "could not detect number of cores, defaulting to 1" >&6; }
32895         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
32896 $as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
32897     fi
32898 
32899 
32900   else
32901     NUM_CORES=$with_num_cores
32902   fi
32903 
32904 
32905 
32906   # How much memory do we have on this build system?
32907 
32908 # Check whether --with-memory-size was given.
32909 if test "${with_memory_size+set}" = set; then :
32910   withval=$with_memory_size;
32911 fi
32912 
32913   if test "x$with_memory_size" = x; then
32914     # The memory size was not specified, try to probe it.
32915 
32916     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
32917 $as_echo_n "checking for memory size... " >&6; }
32918     # Default to 1024 MB
32919     MEMORY_SIZE=1024
32920     FOUND_MEM=no
32921 
32922     if test -f /proc/meminfo; then
32923         # Looks like a Linux (or cygwin) system
32924         MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
32925         MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
32926         FOUND_MEM=yes
32927     elif test -x /usr/sbin/prtconf; then
32928         # Looks like a Solaris system
32929         MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'`
32930         FOUND_MEM=yes
32931     elif test -x /usr/sbin/system_profiler; then
32932         # Looks like a MacOSX system
32933         MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
32934         MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
32935         FOUND_MEM=yes
32936     elif test "x$OPENJDK_BUILD_OS" = xwindows; then
32937         # Windows, but without cygwin
32938         MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
32939         MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
32940         FOUND_MEM=yes
32941     fi
32942 
32943     if test "x$FOUND_MEM" = xyes; then
32944         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
32945 $as_echo "$MEMORY_SIZE MB" >&6; }
32946     else
32947         { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
32948 $as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
32949         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
32950 $as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
32951     fi
32952 
32953   else
32954     MEMORY_SIZE=$with_memory_size
32955   fi
32956 
32957 
32958 
32959   # Provide a decent default number of parallel jobs for make depending on
32960   # number of cores, amount of memory and machine architecture.
32961 
32962 # Check whether --with-jobs was given.
32963 if test "${with_jobs+set}" = set; then :
32964   withval=$with_jobs;
32965 fi
32966 
32967   if test "x$with_jobs" = x; then
32968     # Number of jobs was not specified, calculate.
32969     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
32970 $as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
32971     # Approximate memory in GB, rounding up a bit.
32972     memory_gb=`expr $MEMORY_SIZE / 1100`
32973     # Pick the lowest of memory in gb and number of cores.
32974     if test "$memory_gb" -lt "$NUM_CORES"; then
32975       JOBS="$memory_gb"
32976     else
32977       JOBS="$NUM_CORES"
32978       # On bigger machines, leave some room for other processes to run
32979       if test "$JOBS" -gt "4"; then
32980         JOBS=`expr $JOBS '*' 90 / 100`
32981       fi
32982     fi
32983     # Cap number of jobs to 16
32984     if test "$JOBS" -gt "16"; then
32985       JOBS=16
32986     fi
32987     if test "$JOBS" -eq "0"; then
32988       JOBS=1
32989     fi
32990     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
32991 $as_echo "$JOBS" >&6; }
32992   else
32993     JOBS=$with_jobs
32994   fi
32995 
32996 
32997 
32998 # Setup smart javac (after cores and memory have been setup)
32999 
33000 
33001 # Check whether --with-sjavac-server-java was given.
33002 if test "${with_sjavac_server_java+set}" = set; then :
33003   withval=$with_sjavac_server_java;
33004 fi
33005 
33006 
33007 if test "x$with_sjavac_server_java" != x; then
33008     SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
33009     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
33010     if test "x$FOUND_VERSION" = x; then
33011         as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
33012     fi
33013 else
33014     SJAVAC_SERVER_JAVA=""
33015     # Hotspot specific options.
33016 
33017     $ECHO "Check if jvm arg is ok: -verbosegc" >&5
33018     $ECHO "Command: $JAVA -verbosegc -version" >&5
33019     OUTPUT=`$JAVA -verbosegc -version 2>&1`
33020     FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33021     FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33022     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33023         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
33024         JVM_ARG_OK=true
33025     else
33026         $ECHO "Arg failed:" >&5
33027         $ECHO "$OUTPUT" >&5
33028         JVM_ARG_OK=false
33029     fi
33030 
33031     # JRockit specific options.
33032 
33033     $ECHO "Check if jvm arg is ok: -Xverbose:gc" >&5
33034     $ECHO "Command: $JAVA -Xverbose:gc -version" >&5
33035     OUTPUT=`$JAVA -Xverbose:gc -version 2>&1`
33036     FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33037     FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33038     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33039         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
33040         JVM_ARG_OK=true
33041     else
33042         $ECHO "Arg failed:" >&5
33043         $ECHO "$OUTPUT" >&5
33044         JVM_ARG_OK=false
33045     fi
33046 
33047     SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
33048 fi
33049 
33050 
33051 if test "$MEMORY_SIZE" -gt "2500"; then
33052 
33053     $ECHO "Check if jvm arg is ok: -d64" >&5
33054     $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
33055     OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
33056     FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33057     FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33058     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33059         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
33060         JVM_ARG_OK=true
33061     else
33062         $ECHO "Arg failed:" >&5
33063         $ECHO "$OUTPUT" >&5
33064         JVM_ARG_OK=false
33065     fi
33066 
33067     if test "$JVM_ARG_OK" = true; then
33068         JVM_64BIT=true
33069         JVM_ARG_OK=false
33070     fi
33071     fi
33072 
33073 if test "$JVM_64BIT" = true; then
33074     if test "$MEMORY_SIZE" -gt "17000"; then
33075 
33076     $ECHO "Check if jvm arg is ok: -Xms10G -Xmx10G" >&5
33077     $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version" >&5
33078     OUTPUT=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1`
33079     FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33080     FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33081     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33082         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
33083         JVM_ARG_OK=true
33084     else
33085         $ECHO "Arg failed:" >&5
33086         $ECHO "$OUTPUT" >&5
33087         JVM_ARG_OK=false
33088     fi
33089 
33090     fi
33091     if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then
33092 
33093     $ECHO "Check if jvm arg is ok: -Xms6G -Xmx6G" >&5
33094     $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version" >&5
33095     OUTPUT=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1`
33096     FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33097     FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33098     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33099         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
33100         JVM_ARG_OK=true
33101     else
33102         $ECHO "Arg failed:" >&5
33103         $ECHO "$OUTPUT" >&5
33104         JVM_ARG_OK=false
33105     fi
33106 
33107     fi
33108     if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then
33109 
33110     $ECHO "Check if jvm arg is ok: -Xms1G -Xmx3G" >&5
33111     $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version" >&5
33112     OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1`
33113     FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33114     FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33115     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33116         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
33117         JVM_ARG_OK=true
33118     else
33119         $ECHO "Arg failed:" >&5
33120         $ECHO "$OUTPUT" >&5
33121         JVM_ARG_OK=false
33122     fi
33123 
33124     fi
33125     if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then
33126 
33127     $ECHO "Check if jvm arg is ok: -Xms1G -Xmx2500M" >&5
33128     $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version" >&5
33129     OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1`
33130     FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33131     FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33132     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33133         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
33134         JVM_ARG_OK=true
33135     else
33136         $ECHO "Arg failed:" >&5
33137         $ECHO "$OUTPUT" >&5
33138         JVM_ARG_OK=false
33139     fi
33140 
33141     fi
33142 fi
33143 if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
33144 
33145     $ECHO "Check if jvm arg is ok: -Xms1000M -Xmx1500M" >&5
33146     $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version" >&5
33147     OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version 2>&1`
33148     FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33149     FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33150     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33151         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M"
33152         JVM_ARG_OK=true
33153     else
33154         $ECHO "Arg failed:" >&5
33155         $ECHO "$OUTPUT" >&5
33156         JVM_ARG_OK=false
33157     fi
33158 
33159 fi
33160 if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
33161 
33162     $ECHO "Check if jvm arg is ok: -Xms400M -Xmx1100M" >&5
33163     $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version" >&5
33164     OUTPUT=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1`
33165     FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33166     FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33167     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33168         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
33169         JVM_ARG_OK=true
33170     else
33171         $ECHO "Arg failed:" >&5
33172         $ECHO "$OUTPUT" >&5
33173         JVM_ARG_OK=false
33174     fi
33175 
33176 fi
33177 if test "$JVM_ARG_OK" = false; then
33178 
33179     $ECHO "Check if jvm arg is ok: -Xms256M -Xmx512M" >&5
33180     $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version" >&5
33181     OUTPUT=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1`
33182     FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33183     FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33184     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33185         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
33186         JVM_ARG_OK=true
33187     else
33188         $ECHO "Arg failed:" >&5
33189         $ECHO "$OUTPUT" >&5
33190         JVM_ARG_OK=false
33191     fi
33192 
33193 fi
33194 
33195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
33196 $as_echo_n "checking whether to use sjavac... " >&6; }
33197 # Check whether --enable-sjavac was given.
33198 if test "${enable_sjavac+set}" = set; then :
33199   enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
33200 else
33201   ENABLE_SJAVAC='no'
33202 fi
33203 
33204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
33205 $as_echo "$ENABLE_SJAVAC" >&6; }
33206 
33207 
33208 if test "x$ENABLE_SJAVAC" = xyes; then
33209     SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
33210 else
33211     SJAVAC_SERVER_DIR=
33212 fi
33213 
33214 
33215 
33216 
33217 # Can the C/C++ compiler use precompiled headers?
33218 
33219 
33220 ###############################################################################
33221 #
33222 # Can the C/C++ compiler use precompiled headers?
33223 #
33224 # Check whether --enable-precompiled-headers was given.
33225 if test "${enable_precompiled_headers+set}" = set; then :
33226   enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
33227 else
33228   ENABLE_PRECOMPH=yes
33229 fi
33230 
33231 
33232 USE_PRECOMPILED_HEADER=1
33233 if test "x$ENABLE_PRECOMPH" = xno; then
33234     USE_PRECOMPILED_HEADER=0
33235 fi
33236 
33237 if test "x$ENABLE_PRECOMPH" = xyes; then
33238     # Check that the compiler actually supports precomp headers.
33239     if test "x$GCC" = xyes; then
33240          { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
33241 $as_echo_n "checking that precompiled headers work... " >&6; }
33242          echo "int alfa();" > conftest.h
33243          $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
33244          if test ! -f conftest.hpp.gch; then
33245              USE_PRECOMPILED_HEADER=0
33246              { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33247 $as_echo "no" >&6; }
33248          else
33249              { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33250 $as_echo "yes" >&6; }
33251          fi
33252          rm -f conftest.h conftest.hpp.gch
33253     fi
33254 fi
33255 
33256 
33257 
33258 
33259 # Setup use of ccache, if available
33260 
33261     # Check whether --enable-ccache was given.
33262 if test "${enable_ccache+set}" = set; then :
33263   enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
33264 else
33265   ENABLE_CCACHE=yes
33266 fi
33267 
33268     if test "x$ENABLE_CCACHE" = xyes; then
33269         # Extract the first word of "ccache", so it can be a program name with args.
33270 set dummy ccache; ac_word=$2
33271 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33272 $as_echo_n "checking for $ac_word... " >&6; }
33273 if ${ac_cv_path_CCACHE+:} false; then :
33274   $as_echo_n "(cached) " >&6
33275 else
33276   case $CCACHE in
33277   [\\/]* | ?:[\\/]*)
33278   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
33279   ;;
33280   *)
33281   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33282 for as_dir in $PATH
33283 do
33284   IFS=$as_save_IFS
33285   test -z "$as_dir" && as_dir=.
33286     for ac_exec_ext in '' $ac_executable_extensions; do
33287   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
33288     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
33289     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33290     break 2
33291   fi
33292 done
33293   done
33294 IFS=$as_save_IFS
33295 
33296   ;;
33297 esac
33298 fi
33299 CCACHE=$ac_cv_path_CCACHE
33300 if test -n "$CCACHE"; then
33301   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
33302 $as_echo "$CCACHE" >&6; }
33303 else
33304   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33305 $as_echo "no" >&6; }
33306 fi
33307 
33308 
33309     else
33310         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
33311 $as_echo_n "checking for ccache... " >&6; }
33312         { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
33313 $as_echo "explicitly disabled" >&6; }
33314         CCACHE=
33315     fi
33316 
33317 
33318 
33319 # Check whether --with-ccache-dir was given.
33320 if test "${with_ccache_dir+set}" = set; then :
33321   withval=$with_ccache_dir;
33322 fi
33323 
33324 
33325     if test "x$with_ccache_dir" != x; then
33326         # When using a non home ccache directory, assume the use is to share ccache files
33327         # with other users. Thus change the umask.
33328         SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
33329     fi
33330     CCACHE_FOUND=""
33331     if test "x$CCACHE" != x; then
33332 
33333     if test "x$CCACHE" != x; then
33334         CCACHE_FOUND="true"
33335         # Only use ccache if it is 3.1.4 or later, which supports
33336         # precompiled headers.
33337         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
33338 $as_echo_n "checking if ccache supports precompiled headers... " >&6; }
33339         HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
33340         if test "x$HAS_GOOD_CCACHE" = x; then
33341             { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
33342 $as_echo "no, disabling ccache" >&6; }
33343             CCACHE=
33344         else
33345             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33346 $as_echo "yes" >&6; }
33347             { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
33348 $as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
33349             PUSHED_FLAGS="$CXXFLAGS"
33350             CXXFLAGS="-fpch-preprocess $CXXFLAGS"
33351             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33352 /* end confdefs.h.  */
33353 
33354 int
33355 main ()
33356 {
33357 
33358   ;
33359   return 0;
33360 }
33361 _ACEOF
33362 if ac_fn_cxx_try_compile "$LINENO"; then :
33363   CC_KNOWS_CCACHE_TRICK=yes
33364 else
33365   CC_KNOWS_CCACHE_TRICK=no
33366 fi
33367 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33368             CXXFLAGS="$PUSHED_FLAGS"
33369             if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
33370                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33371 $as_echo "yes" >&6; }
33372             else
33373                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
33374 $as_echo "no, disabling ccaching of precompiled headers" >&6; }
33375                 CCACHE=
33376             fi
33377         fi
33378     fi
33379 
33380     if test "x$CCACHE" != x; then
33381         CCACHE_SLOPPINESS=time_macros
33382         CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
33383         CCACHE_FLAGS=-fpch-preprocess
33384 
33385         if test "x$SET_CCACHE_DIR" != x; then
33386             mkdir -p $CCACHE_DIR > /dev/null 2>&1
33387             chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
33388         fi
33389     fi
33390 
33391     fi
33392 
33393 
33394 ###############################################################################
33395 #
33396 # And now the finish...
33397 #
33398 ###############################################################################
33399 
33400 # Check for some common pitfalls
33401 
33402   if test x"$OPENJDK_BUILD_OS" = xwindows; then
33403     file_to_test="$SRC_ROOT/LICENSE"
33404     if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
33405       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
33406     fi
33407   fi
33408 
33409 
33410 
33411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
33412 $as_echo_n "checking if build directory is on local disk... " >&6; }
33413 
33414         # df -l lists only local disks; if the given directory is not found then
33415         # a non-zero exit code is given
33416   if test "x$DF" = x; then
33417     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33418       # msys does not have df; use Windows "net use" instead.
33419       IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
33420       if test "x$IS_NETWORK_DISK" = x; then
33421         OUTPUT_DIR_IS_LOCAL="yes"
33422       else
33423         OUTPUT_DIR_IS_LOCAL="no"
33424       fi
33425     else
33426       # No df here, say it's local
33427       OUTPUT_DIR_IS_LOCAL="yes"
33428     fi
33429   else
33430     if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
33431       OUTPUT_DIR_IS_LOCAL="yes"
33432     else
33433       OUTPUT_DIR_IS_LOCAL="no"
33434     fi
33435   fi
33436 
33437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
33438 $as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
33439 
33440 
33441 
33442 # Check if the user has any old-style ALT_ variables set.
33443 FOUND_ALT_VARIABLES=`env | grep ^ALT_`
33444 
33445 # Before generating output files, test if they exist. If they do, this is a reconfigure.
33446 # Since we can't properly handle the dependencies for this, warn the user about the situation
33447 if test -e $OUTPUT_ROOT/spec.gmk; then
33448   IS_RECONFIGURE=yes
33449 else
33450   IS_RECONFIGURE=no
33451 fi
33452 
33453 if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
33454   HIDE_PERFORMANCE_HINTS=yes
33455 else
33456   HIDE_PERFORMANCE_HINTS=no
33457   # Hide it the next time around...
33458   $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
33459 fi
33460 
33461 
33462 
33463 # At the end, call the custom hook. (Dummy macro if no custom sources available)
33464 
33465 
33466 # We're messing a bit with internal autoconf variables to put the config.status
33467 # in the output directory instead of the current directory.
33468 CONFIG_STATUS="$OUTPUT_ROOT/config.status"
33469 # Create the actual output files. Now the main work of configure is done.
33470 cat >confcache <<\_ACEOF
33471 # This file is a shell script that caches the results of configure
33472 # tests run on this system so they can be shared between configure
33473 # scripts and configure runs, see configure's option --config-cache.
33474 # It is not useful on other systems.  If it contains results you don't
33475 # want to keep, you may remove or edit it.
33476 #
33477 # config.status only pays attention to the cache file if you give it
33478 # the --recheck option to rerun configure.
33479 #
33480 # `ac_cv_env_foo' variables (set or unset) will be overridden when
33481 # loading this file, other *unset* `ac_cv_foo' will be assigned the
33482 # following values.
33483 
33484 _ACEOF
33485 
33486 # The following way of writing the cache mishandles newlines in values,
33487 # but we know of no workaround that is simple, portable, and efficient.
33488 # So, we kill variables containing newlines.
33489 # Ultrix sh set writes to stderr and can't be redirected directly,
33490 # and sets the high bit in the cache file unless we assign to the vars.
33491 (
33492   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
33493     eval ac_val=\$$ac_var
33494     case $ac_val in #(
33495     *${as_nl}*)
33496       case $ac_var in #(
33497       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
33498 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
33499       esac
33500       case $ac_var in #(
33501       _ | IFS | as_nl) ;; #(
33502       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
33503       *) { eval $ac_var=; unset $ac_var;} ;;
33504       esac ;;
33505     esac
33506   done
33507 
33508   (set) 2>&1 |
33509     case $as_nl`(ac_space=' '; set) 2>&1` in #(
33510     *${as_nl}ac_space=\ *)
33511       # `set' does not quote correctly, so add quotes: double-quote
33512       # substitution turns \\\\ into \\, and sed turns \\ into \.
33513       sed -n \
33514         "s/'/'\\\\''/g;
33515           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
33516       ;; #(
33517     *)
33518       # `set' quotes correctly as required by POSIX, so do not add quotes.
33519       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
33520       ;;
33521     esac |
33522     sort
33523 ) |
33524   sed '
33525      /^ac_cv_env_/b end
33526      t clear
33527      :clear
33528      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
33529      t end
33530      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
33531      :end' >>confcache
33532 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
33533   if test -w "$cache_file"; then
33534     if test "x$cache_file" != "x/dev/null"; then
33535       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
33536 $as_echo "$as_me: updating cache $cache_file" >&6;}
33537       if test ! -f "$cache_file" || test -h "$cache_file"; then
33538         cat confcache >"$cache_file"
33539       else
33540         case $cache_file in #(
33541         */* | ?:*)
33542           mv -f confcache "$cache_file"$$ &&
33543           mv -f "$cache_file"$$ "$cache_file" ;; #(
33544         *)
33545           mv -f confcache "$cache_file" ;;
33546         esac
33547       fi
33548     fi
33549   else
33550     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
33551 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
33552   fi
33553 fi
33554 rm -f confcache
33555 
33556 test "x$prefix" = xNONE && prefix=$ac_default_prefix
33557 # Let make expand exec_prefix.
33558 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
33559 
33560 DEFS=-DHAVE_CONFIG_H
33561 
33562 ac_libobjs=
33563 ac_ltlibobjs=
33564 U=
33565 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
33566   # 1. Remove the extension, and $U if already installed.
33567   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
33568   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
33569   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
33570   #    will be set to the directory where LIBOBJS objects are built.
33571   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
33572   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
33573 done
33574 LIBOBJS=$ac_libobjs
33575 
33576 LTLIBOBJS=$ac_ltlibobjs
33577 
33578 
33579 
33580 : "${CONFIG_STATUS=./config.status}"
33581 ac_write_fail=0
33582 ac_clean_files_save=$ac_clean_files
33583 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
33584 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
33585 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
33586 as_write_fail=0
33587 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
33588 #! $SHELL
33589 # Generated by $as_me.
33590 # Run this file to recreate the current configuration.
33591 # Compiler output produced by configure, useful for debugging
33592 # configure, is in config.log if it exists.
33593 
33594 debug=false
33595 ac_cs_recheck=false
33596 ac_cs_silent=false
33597 
33598 SHELL=\${CONFIG_SHELL-$SHELL}
33599 export SHELL
33600 _ASEOF
33601 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
33602 ## -------------------- ##
33603 ## M4sh Initialization. ##
33604 ## -------------------- ##
33605 
33606 # Be more Bourne compatible
33607 DUALCASE=1; export DUALCASE # for MKS sh
33608 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
33609   emulate sh
33610   NULLCMD=:
33611   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
33612   # is contrary to our usage.  Disable this feature.
33613   alias -g '${1+"$@"}'='"$@"'
33614   setopt NO_GLOB_SUBST
33615 else
33616   case `(set -o) 2>/dev/null` in #(
33617   *posix*) :
33618     set -o posix ;; #(
33619   *) :
33620      ;;
33621 esac
33622 fi
33623 
33624 
33625 as_nl='
33626 '
33627 export as_nl
33628 # Printing a long string crashes Solaris 7 /usr/bin/printf.
33629 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
33630 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
33631 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
33632 # Prefer a ksh shell builtin over an external printf program on Solaris,
33633 # but without wasting forks for bash or zsh.
33634 if test -z "$BASH_VERSION$ZSH_VERSION" \
33635     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
33636   as_echo='print -r --'
33637   as_echo_n='print -rn --'
33638 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
33639   as_echo='printf %s\n'
33640   as_echo_n='printf %s'
33641 else
33642   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
33643     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
33644     as_echo_n='/usr/ucb/echo -n'
33645   else
33646     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
33647     as_echo_n_body='eval
33648       arg=$1;
33649       case $arg in #(
33650       *"$as_nl"*)
33651         expr "X$arg" : "X\\(.*\\)$as_nl";
33652         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
33653       esac;
33654       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
33655     '
33656     export as_echo_n_body
33657     as_echo_n='sh -c $as_echo_n_body as_echo'
33658   fi
33659   export as_echo_body
33660   as_echo='sh -c $as_echo_body as_echo'
33661 fi
33662 
33663 # The user is always right.
33664 if test "${PATH_SEPARATOR+set}" != set; then
33665   PATH_SEPARATOR=:
33666   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
33667     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
33668       PATH_SEPARATOR=';'
33669   }
33670 fi
33671 
33672 
33673 # IFS
33674 # We need space, tab and new line, in precisely that order.  Quoting is
33675 # there to prevent editors from complaining about space-tab.
33676 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
33677 # splitting by setting IFS to empty value.)
33678 IFS=" ""        $as_nl"
33679 
33680 # Find who we are.  Look in the path if we contain no directory separator.
33681 as_myself=
33682 case $0 in #((
33683   *[\\/]* ) as_myself=$0 ;;
33684   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33685 for as_dir in $PATH
33686 do
33687   IFS=$as_save_IFS
33688   test -z "$as_dir" && as_dir=.
33689     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
33690   done
33691 IFS=$as_save_IFS
33692 
33693      ;;
33694 esac
33695 # We did not find ourselves, most probably we were run as `sh COMMAND'
33696 # in which case we are not to be found in the path.
33697 if test "x$as_myself" = x; then
33698   as_myself=$0
33699 fi
33700 if test ! -f "$as_myself"; then
33701   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
33702   exit 1
33703 fi
33704 
33705 # Unset variables that we do not need and which cause bugs (e.g. in
33706 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
33707 # suppresses any "Segmentation fault" message there.  '((' could
33708 # trigger a bug in pdksh 5.2.14.
33709 for as_var in BASH_ENV ENV MAIL MAILPATH
33710 do eval test x\${$as_var+set} = xset \
33711   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
33712 done
33713 PS1='$ '
33714 PS2='> '
33715 PS4='+ '
33716 
33717 # NLS nuisances.
33718 LC_ALL=C
33719 export LC_ALL
33720 LANGUAGE=C
33721 export LANGUAGE
33722 
33723 # CDPATH.
33724 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
33725 
33726 
33727 # as_fn_error STATUS ERROR [LINENO LOG_FD]
33728 # ----------------------------------------
33729 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
33730 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
33731 # script with STATUS, using 1 if that was 0.
33732 as_fn_error ()
33733 {
33734   as_status=$1; test $as_status -eq 0 && as_status=1
33735   if test "$4"; then
33736     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
33737     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
33738   fi
33739   $as_echo "$as_me: error: $2" >&2
33740   as_fn_exit $as_status
33741 } # as_fn_error
33742 
33743 
33744 # as_fn_set_status STATUS
33745 # -----------------------
33746 # Set $? to STATUS, without forking.
33747 as_fn_set_status ()
33748 {
33749   return $1
33750 } # as_fn_set_status
33751 
33752 # as_fn_exit STATUS
33753 # -----------------
33754 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
33755 as_fn_exit ()
33756 {
33757   set +e
33758   as_fn_set_status $1
33759   exit $1
33760 } # as_fn_exit
33761 
33762 # as_fn_unset VAR
33763 # ---------------
33764 # Portably unset VAR.
33765 as_fn_unset ()
33766 {
33767   { eval $1=; unset $1;}
33768 }
33769 as_unset=as_fn_unset
33770 # as_fn_append VAR VALUE
33771 # ----------------------
33772 # Append the text in VALUE to the end of the definition contained in VAR. Take
33773 # advantage of any shell optimizations that allow amortized linear growth over
33774 # repeated appends, instead of the typical quadratic growth present in naive
33775 # implementations.
33776 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
33777   eval 'as_fn_append ()
33778   {
33779     eval $1+=\$2
33780   }'
33781 else
33782   as_fn_append ()
33783   {
33784     eval $1=\$$1\$2
33785   }
33786 fi # as_fn_append
33787 
33788 # as_fn_arith ARG...
33789 # ------------------
33790 # Perform arithmetic evaluation on the ARGs, and store the result in the
33791 # global $as_val. Take advantage of shells that can avoid forks. The arguments
33792 # must be portable across $(()) and expr.
33793 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
33794   eval 'as_fn_arith ()
33795   {
33796     as_val=$(( $* ))
33797   }'
33798 else
33799   as_fn_arith ()
33800   {
33801     as_val=`expr "$@" || test $? -eq 1`
33802   }
33803 fi # as_fn_arith
33804 
33805 
33806 if expr a : '\(a\)' >/dev/null 2>&1 &&
33807    test "X`expr 00001 : '.*\(...\)'`" = X001; then
33808   as_expr=expr
33809 else
33810   as_expr=false
33811 fi
33812 
33813 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
33814   as_basename=basename
33815 else
33816   as_basename=false
33817 fi
33818 
33819 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
33820   as_dirname=dirname
33821 else
33822   as_dirname=false
33823 fi
33824 
33825 as_me=`$as_basename -- "$0" ||
33826 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
33827          X"$0" : 'X\(//\)$' \| \
33828          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
33829 $as_echo X/"$0" |
33830     sed '/^.*\/\([^/][^/]*\)\/*$/{
33831             s//\1/
33832             q
33833           }
33834           /^X\/\(\/\/\)$/{
33835             s//\1/
33836             q
33837           }
33838           /^X\/\(\/\).*/{
33839             s//\1/
33840             q
33841           }
33842           s/.*/./; q'`
33843 
33844 # Avoid depending upon Character Ranges.
33845 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
33846 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
33847 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
33848 as_cr_digits='0123456789'
33849 as_cr_alnum=$as_cr_Letters$as_cr_digits
33850 
33851 ECHO_C= ECHO_N= ECHO_T=
33852 case `echo -n x` in #(((((
33853 -n*)
33854   case `echo 'xy\c'` in
33855   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
33856   xy)  ECHO_C='\c';;
33857   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
33858        ECHO_T=' ';;
33859   esac;;
33860 *)
33861   ECHO_N='-n';;
33862 esac
33863 
33864 rm -f conf$$ conf$$.exe conf$$.file
33865 if test -d conf$$.dir; then
33866   rm -f conf$$.dir/conf$$.file
33867 else
33868   rm -f conf$$.dir
33869   mkdir conf$$.dir 2>/dev/null
33870 fi
33871 if (echo >conf$$.file) 2>/dev/null; then
33872   if ln -s conf$$.file conf$$ 2>/dev/null; then
33873     as_ln_s='ln -s'
33874     # ... but there are two gotchas:
33875     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
33876     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
33877     # In both cases, we have to default to `cp -p'.
33878     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
33879       as_ln_s='cp -p'
33880   elif ln conf$$.file conf$$ 2>/dev/null; then
33881     as_ln_s=ln
33882   else
33883     as_ln_s='cp -p'
33884   fi
33885 else
33886   as_ln_s='cp -p'
33887 fi
33888 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
33889 rmdir conf$$.dir 2>/dev/null
33890 
33891 
33892 # as_fn_mkdir_p
33893 # -------------
33894 # Create "$as_dir" as a directory, including parents if necessary.
33895 as_fn_mkdir_p ()
33896 {
33897 
33898   case $as_dir in #(
33899   -*) as_dir=./$as_dir;;
33900   esac
33901   test -d "$as_dir" || eval $as_mkdir_p || {
33902     as_dirs=
33903     while :; do
33904       case $as_dir in #(
33905       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
33906       *) as_qdir=$as_dir;;
33907       esac
33908       as_dirs="'$as_qdir' $as_dirs"
33909       as_dir=`$as_dirname -- "$as_dir" ||
33910 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
33911          X"$as_dir" : 'X\(//\)[^/]' \| \
33912          X"$as_dir" : 'X\(//\)$' \| \
33913          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
33914 $as_echo X"$as_dir" |
33915     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
33916             s//\1/
33917             q
33918           }
33919           /^X\(\/\/\)[^/].*/{
33920             s//\1/
33921             q
33922           }
33923           /^X\(\/\/\)$/{
33924             s//\1/
33925             q
33926           }
33927           /^X\(\/\).*/{
33928             s//\1/
33929             q
33930           }
33931           s/.*/./; q'`
33932       test -d "$as_dir" && break
33933     done
33934     test -z "$as_dirs" || eval "mkdir $as_dirs"
33935   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
33936 
33937 
33938 } # as_fn_mkdir_p
33939 if mkdir -p . 2>/dev/null; then
33940   as_mkdir_p='mkdir -p "$as_dir"'
33941 else
33942   test -d ./-p && rmdir ./-p
33943   as_mkdir_p=false
33944 fi
33945 
33946 if test -x / >/dev/null 2>&1; then
33947   as_test_x='test -x'
33948 else
33949   if ls -dL / >/dev/null 2>&1; then
33950     as_ls_L_option=L
33951   else
33952     as_ls_L_option=
33953   fi
33954   as_test_x='
33955     eval sh -c '\''
33956       if test -d "$1"; then
33957         test -d "$1/.";
33958       else
33959         case $1 in #(
33960         -*)set "./$1";;
33961         esac;
33962         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
33963         ???[sx]*):;;*)false;;esac;fi
33964     '\'' sh
33965   '
33966 fi
33967 as_executable_p=$as_test_x
33968 
33969 # Sed expression to map a string onto a valid CPP name.
33970 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
33971 
33972 # Sed expression to map a string onto a valid variable name.
33973 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
33974 
33975 
33976 exec 6>&1
33977 ## ----------------------------------- ##
33978 ## Main body of $CONFIG_STATUS script. ##
33979 ## ----------------------------------- ##
33980 _ASEOF
33981 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
33982 
33983 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33984 # Save the log message, to keep $0 and so on meaningful, and to
33985 # report actual input values of CONFIG_FILES etc. instead of their
33986 # values after options handling.
33987 ac_log="
33988 This file was extended by OpenJDK $as_me jdk8, which was
33989 generated by GNU Autoconf 2.68.  Invocation command line was
33990 
33991   CONFIG_FILES    = $CONFIG_FILES
33992   CONFIG_HEADERS  = $CONFIG_HEADERS
33993   CONFIG_LINKS    = $CONFIG_LINKS
33994   CONFIG_COMMANDS = $CONFIG_COMMANDS
33995   $ $0 $@
33996 
33997 on `(hostname || uname -n) 2>/dev/null | sed 1q`
33998 "
33999 
34000 _ACEOF
34001 
34002 case $ac_config_files in *"
34003 "*) set x $ac_config_files; shift; ac_config_files=$*;;
34004 esac
34005 
34006 case $ac_config_headers in *"
34007 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
34008 esac
34009 
34010 
34011 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34012 # Files that config.status was made for.
34013 config_files="$ac_config_files"
34014 config_headers="$ac_config_headers"
34015 
34016 _ACEOF
34017 
34018 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34019 ac_cs_usage="\
34020 \`$as_me' instantiates files and other configuration actions
34021 from templates according to the current configuration.  Unless the files
34022 and actions are specified as TAGs, all are instantiated by default.
34023 
34024 Usage: $0 [OPTION]... [TAG]...
34025 
34026   -h, --help       print this help, then exit
34027   -V, --version    print version number and configuration settings, then exit
34028       --config     print configuration, then exit
34029   -q, --quiet, --silent
34030                    do not print progress messages
34031   -d, --debug      don't remove temporary files
34032       --recheck    update $as_me by reconfiguring in the same conditions
34033       --file=FILE[:TEMPLATE]
34034                    instantiate the configuration file FILE
34035       --header=FILE[:TEMPLATE]
34036                    instantiate the configuration header FILE
34037 
34038 Configuration files:
34039 $config_files
34040 
34041 Configuration headers:
34042 $config_headers
34043 
34044 Report bugs to <build-dev@openjdk.java.net>.
34045 OpenJDK home page: <http://openjdk.java.net>."
34046 
34047 _ACEOF
34048 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34049 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
34050 ac_cs_version="\\
34051 OpenJDK config.status jdk8
34052 configured by $0, generated by GNU Autoconf 2.68,
34053   with options \\"\$ac_cs_config\\"
34054 
34055 Copyright (C) 2010 Free Software Foundation, Inc.
34056 This config.status script is free software; the Free Software Foundation
34057 gives unlimited permission to copy, distribute and modify it."
34058 
34059 ac_pwd='$ac_pwd'
34060 srcdir='$srcdir'
34061 AWK='$AWK'
34062 test -n "\$AWK" || AWK=awk
34063 _ACEOF
34064 
34065 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34066 # The default lists apply if the user does not specify any file.
34067 ac_need_defaults=:
34068 while test $# != 0
34069 do
34070   case $1 in
34071   --*=?*)
34072     ac_option=`expr "X$1" : 'X\([^=]*\)='`
34073     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
34074     ac_shift=:
34075     ;;
34076   --*=)
34077     ac_option=`expr "X$1" : 'X\([^=]*\)='`
34078     ac_optarg=
34079     ac_shift=:
34080     ;;
34081   *)
34082     ac_option=$1
34083     ac_optarg=$2
34084     ac_shift=shift
34085     ;;
34086   esac
34087 
34088   case $ac_option in
34089   # Handling of the options.
34090   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
34091     ac_cs_recheck=: ;;
34092   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
34093     $as_echo "$ac_cs_version"; exit ;;
34094   --config | --confi | --conf | --con | --co | --c )
34095     $as_echo "$ac_cs_config"; exit ;;
34096   --debug | --debu | --deb | --de | --d | -d )
34097     debug=: ;;
34098   --file | --fil | --fi | --f )
34099     $ac_shift
34100     case $ac_optarg in
34101     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
34102     '') as_fn_error $? "missing file argument" ;;
34103     esac
34104     as_fn_append CONFIG_FILES " '$ac_optarg'"
34105     ac_need_defaults=false;;
34106   --header | --heade | --head | --hea )
34107     $ac_shift
34108     case $ac_optarg in
34109     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
34110     esac
34111     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
34112     ac_need_defaults=false;;
34113   --he | --h)
34114     # Conflict between --help and --header
34115     as_fn_error $? "ambiguous option: \`$1'
34116 Try \`$0 --help' for more information.";;
34117   --help | --hel | -h )
34118     $as_echo "$ac_cs_usage"; exit ;;
34119   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
34120   | -silent | --silent | --silen | --sile | --sil | --si | --s)
34121     ac_cs_silent=: ;;
34122 
34123   # This is an error.
34124   -*) as_fn_error $? "unrecognized option: \`$1'
34125 Try \`$0 --help' for more information." ;;
34126 
34127   *) as_fn_append ac_config_targets " $1"
34128      ac_need_defaults=false ;;
34129 
34130   esac
34131   shift
34132 done
34133 
34134 ac_configure_extra_args=
34135 
34136 if $ac_cs_silent; then
34137   exec 6>/dev/null
34138   ac_configure_extra_args="$ac_configure_extra_args --silent"
34139 fi
34140 
34141 _ACEOF
34142 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34143 if \$ac_cs_recheck; then
34144   set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
34145   shift
34146   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
34147   CONFIG_SHELL='$SHELL'
34148   export CONFIG_SHELL
34149   exec "\$@"
34150 fi
34151 
34152 _ACEOF
34153 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34154 exec 5>>config.log
34155 {
34156   echo
34157   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
34158 ## Running $as_me. ##
34159 _ASBOX
34160   $as_echo "$ac_log"
34161 } >&5
34162 
34163 _ACEOF
34164 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34165 _ACEOF
34166 
34167 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34168 
34169 # Handling of arguments.
34170 for ac_config_target in $ac_config_targets
34171 do
34172   case $ac_config_target in
34173     "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
34174     "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
34175     "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
34176     "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
34177     "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
34178     "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
34179     "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
34180 
34181   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
34182   esac
34183 done
34184 
34185 
34186 # If the user did not use the arguments to specify the items to instantiate,
34187 # then the envvar interface is used.  Set only those that are not.
34188 # We use the long form for the default assignment because of an extremely
34189 # bizarre bug on SunOS 4.1.3.
34190 if $ac_need_defaults; then
34191   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
34192   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
34193 fi
34194 
34195 # Have a temporary directory for convenience.  Make it in the build tree
34196 # simply because there is no reason against having it here, and in addition,
34197 # creating and moving files from /tmp can sometimes cause problems.
34198 # Hook for its removal unless debugging.
34199 # Note that there is a small window in which the directory will not be cleaned:
34200 # after its creation but before its name has been assigned to `$tmp'.
34201 $debug ||
34202 {
34203   tmp= ac_tmp=
34204   trap 'exit_status=$?
34205   : "${ac_tmp:=$tmp}"
34206   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
34207 ' 0
34208   trap 'as_fn_exit 1' 1 2 13 15
34209 }
34210 # Create a (secure) tmp directory for tmp files.
34211 
34212 {
34213   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
34214   test -d "$tmp"
34215 }  ||
34216 {
34217   tmp=./conf$$-$RANDOM
34218   (umask 077 && mkdir "$tmp")
34219 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
34220 ac_tmp=$tmp
34221 
34222 # Set up the scripts for CONFIG_FILES section.
34223 # No need to generate them if there are no CONFIG_FILES.
34224 # This happens for instance with `./config.status config.h'.
34225 if test -n "$CONFIG_FILES"; then
34226 
34227 
34228 ac_cr=`echo X | tr X '\015'`
34229 # On cygwin, bash can eat \r inside `` if the user requested igncr.
34230 # But we know of no other shell where ac_cr would be empty at this
34231 # point, so we can use a bashism as a fallback.
34232 if test "x$ac_cr" = x; then
34233   eval ac_cr=\$\'\\r\'
34234 fi
34235 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
34236 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
34237   ac_cs_awk_cr='\\r'
34238 else
34239   ac_cs_awk_cr=$ac_cr
34240 fi
34241 
34242 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
34243 _ACEOF
34244 
34245 
34246 {
34247   echo "cat >conf$$subs.awk <<_ACEOF" &&
34248   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
34249   echo "_ACEOF"
34250 } >conf$$subs.sh ||
34251   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34252 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
34253 ac_delim='%!_!# '
34254 for ac_last_try in false false false false false :; do
34255   . ./conf$$subs.sh ||
34256     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34257 
34258   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
34259   if test $ac_delim_n = $ac_delim_num; then
34260     break
34261   elif $ac_last_try; then
34262     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34263   else
34264     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
34265   fi
34266 done
34267 rm -f conf$$subs.sh
34268 
34269 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34270 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
34271 _ACEOF
34272 sed -n '
34273 h
34274 s/^/S["/; s/!.*/"]=/
34275 p
34276 g
34277 s/^[^!]*!//
34278 :repl
34279 t repl
34280 s/'"$ac_delim"'$//
34281 t delim
34282 :nl
34283 h
34284 s/\(.\{148\}\)..*/\1/
34285 t more1
34286 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
34287 p
34288 n
34289 b repl
34290 :more1
34291 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
34292 p
34293 g
34294 s/.\{148\}//
34295 t nl
34296 :delim
34297 h
34298 s/\(.\{148\}\)..*/\1/
34299 t more2
34300 s/["\\]/\\&/g; s/^/"/; s/$/"/
34301 p
34302 b
34303 :more2
34304 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
34305 p
34306 g
34307 s/.\{148\}//
34308 t delim
34309 ' <conf$$subs.awk | sed '
34310 /^[^""]/{
34311   N
34312   s/\n//
34313 }
34314 ' >>$CONFIG_STATUS || ac_write_fail=1
34315 rm -f conf$$subs.awk
34316 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34317 _ACAWK
34318 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
34319   for (key in S) S_is_set[key] = 1
34320   FS = ""
34321 
34322 }
34323 {
34324   line = $ 0
34325   nfields = split(line, field, "@")
34326   substed = 0
34327   len = length(field[1])
34328   for (i = 2; i < nfields; i++) {
34329     key = field[i]
34330     keylen = length(key)
34331     if (S_is_set[key]) {
34332       value = S[key]
34333       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
34334       len += length(value) + length(field[++i])
34335       substed = 1
34336     } else
34337       len += 1 + keylen
34338   }
34339 
34340   print line
34341 }
34342 
34343 _ACAWK
34344 _ACEOF
34345 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34346 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
34347   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
34348 else
34349   cat
34350 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
34351   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
34352 _ACEOF
34353 
34354 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
34355 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
34356 # trailing colons and then remove the whole line if VPATH becomes empty
34357 # (actually we leave an empty line to preserve line numbers).
34358 if test "x$srcdir" = x.; then
34359   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
34360 h
34361 s///
34362 s/^/:/
34363 s/[      ]*$/:/
34364 s/:\$(srcdir):/:/g
34365 s/:\${srcdir}:/:/g
34366 s/:@srcdir@:/:/g
34367 s/^:*//
34368 s/:*$//
34369 x
34370 s/\(=[   ]*\).*/\1/
34371 G
34372 s/\n//
34373 s/^[^=]*=[       ]*$//
34374 }'
34375 fi
34376 
34377 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34378 fi # test -n "$CONFIG_FILES"
34379 
34380 # Set up the scripts for CONFIG_HEADERS section.
34381 # No need to generate them if there are no CONFIG_HEADERS.
34382 # This happens for instance with `./config.status Makefile'.
34383 if test -n "$CONFIG_HEADERS"; then
34384 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
34385 BEGIN {
34386 _ACEOF
34387 
34388 # Transform confdefs.h into an awk script `defines.awk', embedded as
34389 # here-document in config.status, that substitutes the proper values into
34390 # config.h.in to produce config.h.
34391 
34392 # Create a delimiter string that does not exist in confdefs.h, to ease
34393 # handling of long lines.
34394 ac_delim='%!_!# '
34395 for ac_last_try in false false :; do
34396   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
34397   if test -z "$ac_tt"; then
34398     break
34399   elif $ac_last_try; then
34400     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
34401   else
34402     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
34403   fi
34404 done
34405 
34406 # For the awk script, D is an array of macro values keyed by name,
34407 # likewise P contains macro parameters if any.  Preserve backslash
34408 # newline sequences.
34409 
34410 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
34411 sed -n '
34412 s/.\{148\}/&'"$ac_delim"'/g
34413 t rset
34414 :rset
34415 s/^[     ]*#[    ]*define[       ][      ]*/ /
34416 t def
34417 d
34418 :def
34419 s/\\$//
34420 t bsnl
34421 s/["\\]/\\&/g
34422 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
34423 D["\1"]=" \3"/p
34424 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
34425 d
34426 :bsnl
34427 s/["\\]/\\&/g
34428 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
34429 D["\1"]=" \3\\\\\\n"\\/p
34430 t cont
34431 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
34432 t cont
34433 d
34434 :cont
34435 n
34436 s/.\{148\}/&'"$ac_delim"'/g
34437 t clear
34438 :clear
34439 s/\\$//
34440 t bsnlc
34441 s/["\\]/\\&/g; s/^/"/; s/$/"/p
34442 d
34443 :bsnlc
34444 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
34445 b cont
34446 ' <confdefs.h | sed '
34447 s/'"$ac_delim"'/"\\\
34448 "/g' >>$CONFIG_STATUS || ac_write_fail=1
34449 
34450 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34451   for (key in D) D_is_set[key] = 1
34452   FS = ""
34453 }
34454 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
34455   line = \$ 0
34456   split(line, arg, " ")
34457   if (arg[1] == "#") {
34458     defundef = arg[2]
34459     mac1 = arg[3]
34460   } else {
34461     defundef = substr(arg[1], 2)
34462     mac1 = arg[2]
34463   }
34464   split(mac1, mac2, "(") #)
34465   macro = mac2[1]
34466   prefix = substr(line, 1, index(line, defundef) - 1)
34467   if (D_is_set[macro]) {
34468     # Preserve the white space surrounding the "#".
34469     print prefix "define", macro P[macro] D[macro]
34470     next
34471   } else {
34472     # Replace #undef with comments.  This is necessary, for example,
34473     # in the case of _POSIX_SOURCE, which is predefined and required
34474     # on some systems where configure will not decide to define it.
34475     if (defundef == "undef") {
34476       print "/*", prefix defundef, macro, "*/"
34477       next
34478     }
34479   }
34480 }
34481 { print }
34482 _ACAWK
34483 _ACEOF
34484 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34485   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
34486 fi # test -n "$CONFIG_HEADERS"
34487 
34488 
34489 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
34490 shift
34491 for ac_tag
34492 do
34493   case $ac_tag in
34494   :[FHLC]) ac_mode=$ac_tag; continue;;
34495   esac
34496   case $ac_mode$ac_tag in
34497   :[FHL]*:*);;
34498   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
34499   :[FH]-) ac_tag=-:-;;
34500   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
34501   esac
34502   ac_save_IFS=$IFS
34503   IFS=:
34504   set x $ac_tag
34505   IFS=$ac_save_IFS
34506   shift
34507   ac_file=$1
34508   shift
34509 
34510   case $ac_mode in
34511   :L) ac_source=$1;;
34512   :[FH])
34513     ac_file_inputs=
34514     for ac_f
34515     do
34516       case $ac_f in
34517       -) ac_f="$ac_tmp/stdin";;
34518       *) # Look for the file first in the build tree, then in the source tree
34519          # (if the path is not absolute).  The absolute path cannot be DOS-style,
34520          # because $ac_f cannot contain `:'.
34521          test -f "$ac_f" ||
34522            case $ac_f in
34523            [\\/$]*) false;;
34524            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
34525            esac ||
34526            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
34527       esac
34528       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
34529       as_fn_append ac_file_inputs " '$ac_f'"
34530     done
34531 
34532     # Let's still pretend it is `configure' which instantiates (i.e., don't
34533     # use $as_me), people would be surprised to read:
34534     #    /* config.h.  Generated by config.status.  */
34535     configure_input='Generated from '`
34536           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
34537         `' by configure.'
34538     if test x"$ac_file" != x-; then
34539       configure_input="$ac_file.  $configure_input"
34540       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
34541 $as_echo "$as_me: creating $ac_file" >&6;}
34542     fi
34543     # Neutralize special characters interpreted by sed in replacement strings.
34544     case $configure_input in #(
34545     *\&* | *\|* | *\\* )
34546        ac_sed_conf_input=`$as_echo "$configure_input" |
34547        sed 's/[\\\\&|]/\\\\&/g'`;; #(
34548     *) ac_sed_conf_input=$configure_input;;
34549     esac
34550 
34551     case $ac_tag in
34552     *:-:* | *:-) cat >"$ac_tmp/stdin" \
34553       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
34554     esac
34555     ;;
34556   esac
34557 
34558   ac_dir=`$as_dirname -- "$ac_file" ||
34559 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
34560          X"$ac_file" : 'X\(//\)[^/]' \| \
34561          X"$ac_file" : 'X\(//\)$' \| \
34562          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
34563 $as_echo X"$ac_file" |
34564     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
34565             s//\1/
34566             q
34567           }
34568           /^X\(\/\/\)[^/].*/{
34569             s//\1/
34570             q
34571           }
34572           /^X\(\/\/\)$/{
34573             s//\1/
34574             q
34575           }
34576           /^X\(\/\).*/{
34577             s//\1/
34578             q
34579           }
34580           s/.*/./; q'`
34581   as_dir="$ac_dir"; as_fn_mkdir_p
34582   ac_builddir=.
34583 
34584 case "$ac_dir" in
34585 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
34586 *)
34587   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
34588   # A ".." for each directory in $ac_dir_suffix.
34589   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
34590   case $ac_top_builddir_sub in
34591   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
34592   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
34593   esac ;;
34594 esac
34595 ac_abs_top_builddir=$ac_pwd
34596 ac_abs_builddir=$ac_pwd$ac_dir_suffix
34597 # for backward compatibility:
34598 ac_top_builddir=$ac_top_build_prefix
34599 
34600 case $srcdir in
34601   .)  # We are building in place.
34602     ac_srcdir=.
34603     ac_top_srcdir=$ac_top_builddir_sub
34604     ac_abs_top_srcdir=$ac_pwd ;;
34605   [\\/]* | ?:[\\/]* )  # Absolute name.
34606     ac_srcdir=$srcdir$ac_dir_suffix;
34607     ac_top_srcdir=$srcdir
34608     ac_abs_top_srcdir=$srcdir ;;
34609   *) # Relative name.
34610     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
34611     ac_top_srcdir=$ac_top_build_prefix$srcdir
34612     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
34613 esac
34614 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
34615 
34616 
34617   case $ac_mode in
34618   :F)
34619   #
34620   # CONFIG_FILE
34621   #
34622 
34623 _ACEOF
34624 
34625 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34626 # If the template does not know about datarootdir, expand it.
34627 # FIXME: This hack should be removed a few years after 2.60.
34628 ac_datarootdir_hack=; ac_datarootdir_seen=
34629 ac_sed_dataroot='
34630 /datarootdir/ {
34631   p
34632   q
34633 }
34634 /@datadir@/p
34635 /@docdir@/p
34636 /@infodir@/p
34637 /@localedir@/p
34638 /@mandir@/p'
34639 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
34640 *datarootdir*) ac_datarootdir_seen=yes;;
34641 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
34642   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
34643 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
34644 _ACEOF
34645 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34646   ac_datarootdir_hack='
34647   s&@datadir@&$datadir&g
34648   s&@docdir@&$docdir&g
34649   s&@infodir@&$infodir&g
34650   s&@localedir@&$localedir&g
34651   s&@mandir@&$mandir&g
34652   s&\\\${datarootdir}&$datarootdir&g' ;;
34653 esac
34654 _ACEOF
34655 
34656 # Neutralize VPATH when `$srcdir' = `.'.
34657 # Shell code in configure.ac might set extrasub.
34658 # FIXME: do we really want to maintain this feature?
34659 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34660 ac_sed_extra="$ac_vpsub
34661 $extrasub
34662 _ACEOF
34663 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34664 :t
34665 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
34666 s|@configure_input@|$ac_sed_conf_input|;t t
34667 s&@top_builddir@&$ac_top_builddir_sub&;t t
34668 s&@top_build_prefix@&$ac_top_build_prefix&;t t
34669 s&@srcdir@&$ac_srcdir&;t t
34670 s&@abs_srcdir@&$ac_abs_srcdir&;t t
34671 s&@top_srcdir@&$ac_top_srcdir&;t t
34672 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
34673 s&@builddir@&$ac_builddir&;t t
34674 s&@abs_builddir@&$ac_abs_builddir&;t t
34675 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
34676 $ac_datarootdir_hack
34677 "
34678 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
34679   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34680 
34681 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
34682   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
34683   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
34684       "$ac_tmp/out"`; test -z "$ac_out"; } &&
34685   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
34686 which seems to be undefined.  Please make sure it is defined" >&5
34687 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
34688 which seems to be undefined.  Please make sure it is defined" >&2;}
34689 
34690   rm -f "$ac_tmp/stdin"
34691   case $ac_file in
34692   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
34693   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
34694   esac \
34695   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34696  ;;
34697   :H)
34698   #
34699   # CONFIG_HEADER
34700   #
34701   if test x"$ac_file" != x-; then
34702     {
34703       $as_echo "/* $configure_input  */" \
34704       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
34705     } >"$ac_tmp/config.h" \
34706       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34707     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
34708       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
34709 $as_echo "$as_me: $ac_file is unchanged" >&6;}
34710     else
34711       rm -f "$ac_file"
34712       mv "$ac_tmp/config.h" "$ac_file" \
34713         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34714     fi
34715   else
34716     $as_echo "/* $configure_input  */" \
34717       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
34718       || as_fn_error $? "could not create -" "$LINENO" 5
34719   fi
34720  ;;
34721 
34722 
34723   esac
34724 
34725 done # for ac_tag
34726 
34727 
34728 as_fn_exit 0
34729 _ACEOF
34730 ac_clean_files=$ac_clean_files_save
34731 
34732 test $ac_write_fail = 0 ||
34733   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
34734 
34735 
34736 # configure is writing to config.log, and then calls config.status.
34737 # config.status does its own redirection, appending to config.log.
34738 # Unfortunately, on DOS this fails, as config.log is still kept open
34739 # by configure, so config.status won't be able to write to it; its
34740 # output is simply discarded.  So we exec the FD to /dev/null,
34741 # effectively closing config.log, so it can be properly (re)opened and
34742 # appended to by config.status.  When coming back to configure, we
34743 # need to make the FD available again.
34744 if test "$no_create" != yes; then
34745   ac_cs_success=:
34746   ac_config_status_args=
34747   test "$silent" = yes &&
34748     ac_config_status_args="$ac_config_status_args --quiet"
34749   exec 5>/dev/null
34750   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
34751   exec 5>>config.log
34752   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
34753   # would make configure fail if this is the last instruction.
34754   $ac_cs_success || as_fn_exit 1
34755 fi
34756 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
34757   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
34758 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
34759 fi
34760 
34761 
34762 # Make the compare script executable
34763 $CHMOD +x $OUTPUT_ROOT/compare.sh
34764 
34765 # Finally output some useful information to the user
34766 
34767 # Finally output some useful information to the user
34768 
34769 if test "x$CCACHE_FOUND" != x; then
34770         if  test "x$HAS_GOOD_CCACHE" = x; then
34771                 CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
34772                 CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
34773         else
34774                 CCACHE_STATUS="installed and in use"
34775         fi
34776 else
34777         if test "x$GCC" = xyes; then
34778                 CCACHE_STATUS="not installed (consider installing)"
34779                 CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
34780         else
34781                 CCACHE_STATUS="not available for your system"
34782         fi
34783 fi
34784 
34785 printf "\n"
34786 printf "====================================================\n"
34787 printf "A new configuration has been successfully created in\n"
34788 printf "$OUTPUT_ROOT\n"
34789 if test "x$CONFIGURE_COMMAND_LINE" != x; then
34790         printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
34791 else
34792         printf "using default settings.\n"
34793 fi
34794 
34795 printf "\n"
34796 printf "Configuration summary:\n"
34797 printf "* Debug level:    $DEBUG_LEVEL\n"
34798 printf "* JDK variant:    $JDK_VARIANT\n"
34799 printf "* JVM variants:   $with_jvm_variants\n"
34800 printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
34801 
34802 printf "\n"
34803 printf "Tools summary:\n"
34804 if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
34805   printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
34806 fi
34807 printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
34808 printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
34809 printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
34810 
34811 printf "\n"
34812 printf "Build performance summary:\n"
34813 printf "* Cores to use:   $JOBS\n"
34814 printf "* Memory limit:   $MEMORY_SIZE MB\n"
34815 printf "* ccache status:  $CCACHE_STATUS\n"
34816 printf "\n"
34817 
34818 if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
34819         printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
34820         printf "$CCACHE_HELP_MSG\n"
34821 
34822     # Print a helpful message on how to acquire the necessary build dependency.
34823     # ccache is the help tag: freetyp2, cups, pulse, alsa etc
34824     MISSING_DEPENDENCY=ccache
34825     PKGHANDLER_COMMAND=
34826 
34827     case $PKGHANDLER in
34828         apt-get)
34829                 apt_help     $MISSING_DEPENDENCY ;;
34830     yum)
34831                 yum_help     $MISSING_DEPENDENCY ;;
34832         port)
34833                 port_help    $MISSING_DEPENDENCY ;;
34834         pkgutil)
34835                 pkgutil_help $MISSING_DEPENDENCY ;;
34836         pkgadd)
34837                 pkgadd_help  $MISSING_DEPENDENCY ;;
34838     * )
34839       break ;;
34840     esac
34841 
34842     if test "x$PKGHANDLER_COMMAND" != x; then
34843         HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34844     fi
34845 
34846         printf "$HELP_MSG\n"
34847         printf "\n"
34848 fi
34849 
34850 if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
34851         printf "NOTE: You have requested to build more than one version of the JVM, which\n"
34852         printf "will result in longer build times.\n"
34853         printf "\n"
34854 fi
34855 
34856 if test "x$FOUND_ALT_VARIABLES" != "x"; then
34857         printf "WARNING: You have old-style ALT_ environment variables set.\n"
34858         printf "These are not respected, and will be ignored. It is recommended\n"
34859         printf "that you clean your environment. The following variables are set:\n"
34860         printf "$FOUND_ALT_VARIABLES\n"
34861         printf "\n"
34862 fi
34863 
34864 if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
34865         printf "WARNING: Your build output directory is not on a local disk.\n"
34866         printf "This will severely degrade build performance!\n"
34867         printf "It is recommended that you create an output directory on a local disk,\n"
34868         printf "and run the configure script again from that directory.\n"
34869         printf "\n"
34870 fi
34871 
34872 if test "x$IS_RECONFIGURE" = "xyes"; then
34873         printf "WARNING: The result of this configuration has overridden an older\n"
34874         printf "configuration. You *should* run 'make clean' to make sure you get a\n"
34875         printf "proper build. Failure to do so might result in strange build problems.\n"
34876         printf "\n"
34877 fi
34878