1 #! /bin/sh
   2 # Guess values for system-dependent variables and create Makefiles.
   3 # Generated by GNU Autoconf 2.68 for OpenJDK jdk8.
   4 #
   5 # Report bugs to <build-dev@openjdk.java.net>.
   6 #
   7 #
   8 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
   9 # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
  10 # Foundation, Inc.
  11 #
  12 #
  13 # This configure script is free software; the Free Software Foundation
  14 # gives unlimited permission to copy, distribute and modify it.
  15 ## -------------------- ##
  16 ## M4sh Initialization. ##
  17 ## -------------------- ##
  18 
  19 # Be more Bourne compatible
  20 DUALCASE=1; export DUALCASE # for MKS sh
  21 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
  22   emulate sh
  23   NULLCMD=:
  24   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
  25   # is contrary to our usage.  Disable this feature.
  26   alias -g '${1+"$@"}'='"$@"'
  27   setopt NO_GLOB_SUBST
  28 else
  29   case `(set -o) 2>/dev/null` in #(
  30   *posix*) :
  31     set -o posix ;; #(
  32   *) :
  33      ;;
  34 esac
  35 fi
  36 
  37 
  38 as_nl='
  39 '
  40 export as_nl
  41 # Printing a long string crashes Solaris 7 /usr/bin/printf.
  42 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
  43 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
  44 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
  45 # Prefer a ksh shell builtin over an external printf program on Solaris,
  46 # but without wasting forks for bash or zsh.
  47 if test -z "$BASH_VERSION$ZSH_VERSION" \
  48     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
  49   as_echo='print -r --'
  50   as_echo_n='print -rn --'
  51 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
  52   as_echo='printf %s\n'
  53   as_echo_n='printf %s'
  54 else
  55   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
  56     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
  57     as_echo_n='/usr/ucb/echo -n'
  58   else
  59     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
  60     as_echo_n_body='eval
  61       arg=$1;
  62       case $arg in #(
  63       *"$as_nl"*)
  64         expr "X$arg" : "X\\(.*\\)$as_nl";
  65         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
  66       esac;
  67       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
  68     '
  69     export as_echo_n_body
  70     as_echo_n='sh -c $as_echo_n_body as_echo'
  71   fi
  72   export as_echo_body
  73   as_echo='sh -c $as_echo_body as_echo'
  74 fi
  75 
  76 # The user is always right.
  77 if test "${PATH_SEPARATOR+set}" != set; then
  78   PATH_SEPARATOR=:
  79   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
  80     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
  81       PATH_SEPARATOR=';'
  82   }
  83 fi
  84 
  85 
  86 # IFS
  87 # We need space, tab and new line, in precisely that order.  Quoting is
  88 # there to prevent editors from complaining about space-tab.
  89 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
  90 # splitting by setting IFS to empty value.)
  91 IFS=" ""        $as_nl"
  92 
  93 # Find who we are.  Look in the path if we contain no directory separator.
  94 as_myself=
  95 case $0 in #((
  96   *[\\/]* ) as_myself=$0 ;;
  97   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  98 for as_dir in $PATH
  99 do
 100   IFS=$as_save_IFS
 101   test -z "$as_dir" && as_dir=.
 102     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
 103   done
 104 IFS=$as_save_IFS
 105 
 106      ;;
 107 esac
 108 # We did not find ourselves, most probably we were run as `sh COMMAND'
 109 # in which case we are not to be found in the path.
 110 if test "x$as_myself" = x; then
 111   as_myself=$0
 112 fi
 113 if test ! -f "$as_myself"; then
 114   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
 115   exit 1
 116 fi
 117 
 118 # Unset variables that we do not need and which cause bugs (e.g. in
 119 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
 120 # suppresses any "Segmentation fault" message there.  '((' could
 121 # trigger a bug in pdksh 5.2.14.
 122 for as_var in BASH_ENV ENV MAIL MAILPATH
 123 do eval test x\${$as_var+set} = xset \
 124   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
 125 done
 126 PS1='$ '
 127 PS2='> '
 128 PS4='+ '
 129 
 130 # NLS nuisances.
 131 LC_ALL=C
 132 export LC_ALL
 133 LANGUAGE=C
 134 export LANGUAGE
 135 
 136 # CDPATH.
 137 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 138 
 139 if test "x$CONFIG_SHELL" = x; then
 140   as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
 141   emulate sh
 142   NULLCMD=:
 143   # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
 144   # is contrary to our usage.  Disable this feature.
 145   alias -g '\${1+\"\$@\"}'='\"\$@\"'
 146   setopt NO_GLOB_SUBST
 147 else
 148   case \`(set -o) 2>/dev/null\` in #(
 149   *posix*) :
 150     set -o posix ;; #(
 151   *) :
 152      ;;
 153 esac
 154 fi
 155 "
 156   as_required="as_fn_return () { (exit \$1); }
 157 as_fn_success () { as_fn_return 0; }
 158 as_fn_failure () { as_fn_return 1; }
 159 as_fn_ret_success () { return 0; }
 160 as_fn_ret_failure () { return 1; }
 161 
 162 exitcode=0
 163 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
 164 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
 165 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
 166 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
 167 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
 168 
 169 else
 170   exitcode=1; echo positional parameters were not saved.
 171 fi
 172 test x\$exitcode = x0 || exit 1"
 173   as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
 174   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
 175   eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
 176   test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
 177 test \$(( 1 + 1 )) = 2 || exit 1"
 178   if (eval "$as_required") 2>/dev/null; then :
 179   as_have_required=yes
 180 else
 181   as_have_required=no
 182 fi
 183   if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
 184 
 185 else
 186   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 187 as_found=false
 188 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
 189 do
 190   IFS=$as_save_IFS
 191   test -z "$as_dir" && as_dir=.
 192   as_found=:
 193   case $as_dir in #(
 194          /*)
 195            for as_base in sh bash ksh sh5; do
 196              # Try only shells that exist, to save several forks.
 197              as_shell=$as_dir/$as_base
 198              if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
 199                     { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
 200   CONFIG_SHELL=$as_shell as_have_required=yes
 201                    if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
 202   break 2
 203 fi
 204 fi
 205            done;;
 206        esac
 207   as_found=false
 208 done
 209 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
 210               { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
 211   CONFIG_SHELL=$SHELL as_have_required=yes
 212 fi; }
 213 IFS=$as_save_IFS
 214 
 215 
 216       if test "x$CONFIG_SHELL" != x; then :
 217   # We cannot yet assume a decent shell, so we have to provide a
 218         # neutralization value for shells without unset; and this also
 219         # works around shells that cannot unset nonexistent variables.
 220         # Preserve -v and -x to the replacement shell.
 221         BASH_ENV=/dev/null
 222         ENV=/dev/null
 223         (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
 224         export CONFIG_SHELL
 225         case $- in # ((((
 226           *v*x* | *x*v* ) as_opts=-vx ;;
 227           *v* ) as_opts=-v ;;
 228           *x* ) as_opts=-x ;;
 229           * ) as_opts= ;;
 230         esac
 231         exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
 232 fi
 233 
 234     if test x$as_have_required = xno; then :
 235   $as_echo "$0: This script requires a shell more modern than all"
 236   $as_echo "$0: the shells that I found on your system."
 237   if test x${ZSH_VERSION+set} = xset ; then
 238     $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
 239     $as_echo "$0: be upgraded to zsh 4.3.4 or later."
 240   else
 241     $as_echo "$0: Please tell bug-autoconf@gnu.org and
 242 $0: build-dev@openjdk.java.net about your system, including
 243 $0: any error possibly output before this message. Then
 244 $0: install a modern shell, or manually run the script
 245 $0: under such a shell if you do have one."
 246   fi
 247   exit 1
 248 fi
 249 fi
 250 fi
 251 SHELL=${CONFIG_SHELL-/bin/sh}
 252 export SHELL
 253 # Unset more variables known to interfere with behavior of common tools.
 254 CLICOLOR_FORCE= GREP_OPTIONS=
 255 unset CLICOLOR_FORCE GREP_OPTIONS
 256 
 257 ## --------------------- ##
 258 ## M4sh Shell Functions. ##
 259 ## --------------------- ##
 260 # as_fn_unset VAR
 261 # ---------------
 262 # Portably unset VAR.
 263 as_fn_unset ()
 264 {
 265   { eval $1=; unset $1;}
 266 }
 267 as_unset=as_fn_unset
 268 
 269 # as_fn_set_status STATUS
 270 # -----------------------
 271 # Set $? to STATUS, without forking.
 272 as_fn_set_status ()
 273 {
 274   return $1
 275 } # as_fn_set_status
 276 
 277 # as_fn_exit STATUS
 278 # -----------------
 279 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
 280 as_fn_exit ()
 281 {
 282   set +e
 283   as_fn_set_status $1
 284   exit $1
 285 } # as_fn_exit
 286 
 287 # as_fn_mkdir_p
 288 # -------------
 289 # Create "$as_dir" as a directory, including parents if necessary.
 290 as_fn_mkdir_p ()
 291 {
 292 
 293   case $as_dir in #(
 294   -*) as_dir=./$as_dir;;
 295   esac
 296   test -d "$as_dir" || eval $as_mkdir_p || {
 297     as_dirs=
 298     while :; do
 299       case $as_dir in #(
 300       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
 301       *) as_qdir=$as_dir;;
 302       esac
 303       as_dirs="'$as_qdir' $as_dirs"
 304       as_dir=`$as_dirname -- "$as_dir" ||
 305 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
 306          X"$as_dir" : 'X\(//\)[^/]' \| \
 307          X"$as_dir" : 'X\(//\)$' \| \
 308          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
 309 $as_echo X"$as_dir" |
 310     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
 311             s//\1/
 312             q
 313           }
 314           /^X\(\/\/\)[^/].*/{
 315             s//\1/
 316             q
 317           }
 318           /^X\(\/\/\)$/{
 319             s//\1/
 320             q
 321           }
 322           /^X\(\/\).*/{
 323             s//\1/
 324             q
 325           }
 326           s/.*/./; q'`
 327       test -d "$as_dir" && break
 328     done
 329     test -z "$as_dirs" || eval "mkdir $as_dirs"
 330   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
 331 
 332 
 333 } # as_fn_mkdir_p
 334 # as_fn_append VAR VALUE
 335 # ----------------------
 336 # Append the text in VALUE to the end of the definition contained in VAR. Take
 337 # advantage of any shell optimizations that allow amortized linear growth over
 338 # repeated appends, instead of the typical quadratic growth present in naive
 339 # implementations.
 340 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
 341   eval 'as_fn_append ()
 342   {
 343     eval $1+=\$2
 344   }'
 345 else
 346   as_fn_append ()
 347   {
 348     eval $1=\$$1\$2
 349   }
 350 fi # as_fn_append
 351 
 352 # as_fn_arith ARG...
 353 # ------------------
 354 # Perform arithmetic evaluation on the ARGs, and store the result in the
 355 # global $as_val. Take advantage of shells that can avoid forks. The arguments
 356 # must be portable across $(()) and expr.
 357 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
 358   eval 'as_fn_arith ()
 359   {
 360     as_val=$(( $* ))
 361   }'
 362 else
 363   as_fn_arith ()
 364   {
 365     as_val=`expr "$@" || test $? -eq 1`
 366   }
 367 fi # as_fn_arith
 368 
 369 
 370 # as_fn_error STATUS ERROR [LINENO LOG_FD]
 371 # ----------------------------------------
 372 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
 373 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
 374 # script with STATUS, using 1 if that was 0.
 375 as_fn_error ()
 376 {
 377   as_status=$1; test $as_status -eq 0 && as_status=1
 378   if test "$4"; then
 379     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
 380     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
 381   fi
 382   $as_echo "$as_me: error: $2" >&2
 383   as_fn_exit $as_status
 384 } # as_fn_error
 385 
 386 if expr a : '\(a\)' >/dev/null 2>&1 &&
 387    test "X`expr 00001 : '.*\(...\)'`" = X001; then
 388   as_expr=expr
 389 else
 390   as_expr=false
 391 fi
 392 
 393 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
 394   as_basename=basename
 395 else
 396   as_basename=false
 397 fi
 398 
 399 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
 400   as_dirname=dirname
 401 else
 402   as_dirname=false
 403 fi
 404 
 405 as_me=`$as_basename -- "$0" ||
 406 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
 407          X"$0" : 'X\(//\)$' \| \
 408          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
 409 $as_echo X/"$0" |
 410     sed '/^.*\/\([^/][^/]*\)\/*$/{
 411             s//\1/
 412             q
 413           }
 414           /^X\/\(\/\/\)$/{
 415             s//\1/
 416             q
 417           }
 418           /^X\/\(\/\).*/{
 419             s//\1/
 420             q
 421           }
 422           s/.*/./; q'`
 423 
 424 # Avoid depending upon Character Ranges.
 425 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
 426 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
 427 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
 428 as_cr_digits='0123456789'
 429 as_cr_alnum=$as_cr_Letters$as_cr_digits
 430 
 431 
 432   as_lineno_1=$LINENO as_lineno_1a=$LINENO
 433   as_lineno_2=$LINENO as_lineno_2a=$LINENO
 434   eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
 435   test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
 436   # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
 437   sed -n '
 438     p
 439     /[$]LINENO/=
 440   ' <$as_myself |
 441     sed '
 442       s/[$]LINENO.*/&-/
 443       t lineno
 444       b
 445       :lineno
 446       N
 447       :loop
 448       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
 449       t loop
 450       s/-\n.*//
 451     ' >$as_me.lineno &&
 452   chmod +x "$as_me.lineno" ||
 453     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
 454 
 455   # Don't try to exec as it changes $[0], causing all sort of problems
 456   # (the dirname of $[0] is not the place where we might find the
 457   # original and so on.  Autoconf is especially sensitive to this).
 458   . "./$as_me.lineno"
 459   # Exit status is that of the last command.
 460   exit
 461 }
 462 
 463 ECHO_C= ECHO_N= ECHO_T=
 464 case `echo -n x` in #(((((
 465 -n*)
 466   case `echo 'xy\c'` in
 467   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
 468   xy)  ECHO_C='\c';;
 469   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
 470        ECHO_T=' ';;
 471   esac;;
 472 *)
 473   ECHO_N='-n';;
 474 esac
 475 
 476 rm -f conf$$ conf$$.exe conf$$.file
 477 if test -d conf$$.dir; then
 478   rm -f conf$$.dir/conf$$.file
 479 else
 480   rm -f conf$$.dir
 481   mkdir conf$$.dir 2>/dev/null
 482 fi
 483 if (echo >conf$$.file) 2>/dev/null; then
 484   if ln -s conf$$.file conf$$ 2>/dev/null; then
 485     as_ln_s='ln -s'
 486     # ... but there are two gotchas:
 487     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
 488     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
 489     # In both cases, we have to default to `cp -p'.
 490     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
 491       as_ln_s='cp -p'
 492   elif ln conf$$.file conf$$ 2>/dev/null; then
 493     as_ln_s=ln
 494   else
 495     as_ln_s='cp -p'
 496   fi
 497 else
 498   as_ln_s='cp -p'
 499 fi
 500 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
 501 rmdir conf$$.dir 2>/dev/null
 502 
 503 if mkdir -p . 2>/dev/null; then
 504   as_mkdir_p='mkdir -p "$as_dir"'
 505 else
 506   test -d ./-p && rmdir ./-p
 507   as_mkdir_p=false
 508 fi
 509 
 510 if test -x / >/dev/null 2>&1; then
 511   as_test_x='test -x'
 512 else
 513   if ls -dL / >/dev/null 2>&1; then
 514     as_ls_L_option=L
 515   else
 516     as_ls_L_option=
 517   fi
 518   as_test_x='
 519     eval sh -c '\''
 520       if test -d "$1"; then
 521         test -d "$1/.";
 522       else
 523         case $1 in #(
 524         -*)set "./$1";;
 525         esac;
 526         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
 527         ???[sx]*):;;*)false;;esac;fi
 528     '\'' sh
 529   '
 530 fi
 531 as_executable_p=$as_test_x
 532 
 533 # Sed expression to map a string onto a valid CPP name.
 534 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
 535 
 536 # Sed expression to map a string onto a valid variable name.
 537 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
 538 
 539 
 540 test -n "$DJDIR" || exec 7<&0 </dev/null
 541 exec 6>&1
 542 
 543 # Name of the host.
 544 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
 545 # so uname gets run too.
 546 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
 547 
 548 #
 549 # Initializations.
 550 #
 551 ac_default_prefix=/usr/local
 552 ac_clean_files=
 553 ac_config_libobj_dir=.
 554 LIBOBJS=
 555 cross_compiling=no
 556 subdirs=
 557 MFLAGS=
 558 MAKEFLAGS=
 559 
 560 # Identity of this package.
 561 PACKAGE_NAME='OpenJDK'
 562 PACKAGE_TARNAME='openjdk'
 563 PACKAGE_VERSION='jdk8'
 564 PACKAGE_STRING='OpenJDK jdk8'
 565 PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
 566 PACKAGE_URL='http://openjdk.java.net'
 567 
 568 # Factoring default headers for most tests.
 569 ac_includes_default="\
 570 #include <stdio.h>
 571 #ifdef HAVE_SYS_TYPES_H
 572 # include <sys/types.h>
 573 #endif
 574 #ifdef HAVE_SYS_STAT_H
 575 # include <sys/stat.h>
 576 #endif
 577 #ifdef STDC_HEADERS
 578 # include <stdlib.h>
 579 # include <stddef.h>
 580 #else
 581 # ifdef HAVE_STDLIB_H
 582 #  include <stdlib.h>
 583 # endif
 584 #endif
 585 #ifdef HAVE_STRING_H
 586 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
 587 #  include <memory.h>
 588 # endif
 589 # include <string.h>
 590 #endif
 591 #ifdef HAVE_STRINGS_H
 592 # include <strings.h>
 593 #endif
 594 #ifdef HAVE_INTTYPES_H
 595 # include <inttypes.h>
 596 #endif
 597 #ifdef HAVE_STDINT_H
 598 # include <stdint.h>
 599 #endif
 600 #ifdef HAVE_UNISTD_H
 601 # include <unistd.h>
 602 #endif"
 603 
 604 ac_subst_vars='LTLIBOBJS
 605 LIBOBJS
 606 CCACHE
 607 USE_PRECOMPILED_HEADER
 608 SJAVAC_SERVER_DIR
 609 ENABLE_SJAVAC
 610 SJAVAC_SERVER_CORES
 611 SJAVAC_SERVER_JAVA
 612 JOBS
 613 MEMORY_SIZE
 614 NUM_CORES
 615 SALIB_NAME
 616 HOTSPOT_MAKE_ARGS
 617 FIXPATH
 618 LIBCXX
 619 STATIC_CXX_SETTING
 620 LIBDL
 621 LIBM
 622 LIBZIP_CAN_USE_MMAP
 623 USE_EXTERNAL_LIBZ
 624 USE_EXTERNAL_LIBGIF
 625 USE_EXTERNAL_LIBJPEG
 626 ALSA_LIBS
 627 ALSA_CFLAGS
 628 FREETYPE2_LIB_PATH
 629 USING_SYSTEM_FT_LIB
 630 FREETYPE2_LIBS
 631 FREETYPE2_CFLAGS
 632 CUPS_CFLAGS
 633 OPENWIN_HOME
 634 X_EXTRA_LIBS
 635 X_LIBS
 636 X_PRE_LIBS
 637 X_CFLAGS
 638 XMKMF
 639 CXXFLAGS_DEBUG_SYMBOLS
 640 CFLAGS_DEBUG_SYMBOLS
 641 ZIP_DEBUGINFO_FILES
 642 ENABLE_DEBUG_SYMBOLS
 643 LDFLAGS_CXX_JDK
 644 LDFLAGS_JDKEXE_SUFFIX
 645 LDFLAGS_JDKLIB_SUFFIX
 646 LDFLAGS_JDKEXE
 647 LDFLAGS_JDKLIB
 648 CXXFLAGS_JDKEXE
 649 CXXFLAGS_JDKLIB
 650 CFLAGS_JDKEXE
 651 CFLAGS_JDKLIB
 652 MACOSX_VERSION_MIN
 653 PACKAGE_PATH
 654 LEGACY_EXTRA_LDFLAGS
 655 LEGACY_EXTRA_CXXFLAGS
 656 LEGACY_EXTRA_CFLAGS
 657 CXX_FLAG_DEPS
 658 C_FLAG_DEPS
 659 CXX_O_FLAG_NONE
 660 CXX_O_FLAG_NORM
 661 CXX_O_FLAG_HI
 662 CXX_O_FLAG_HIGHEST
 663 C_O_FLAG_NONE
 664 C_O_FLAG_NORM
 665 C_O_FLAG_HI
 666 C_O_FLAG_HIGHEST
 667 POST_MCS_CMD
 668 POST_STRIP_CMD
 669 SET_EXECUTABLE_ORIGIN
 670 SET_SHARED_LIBRARY_ORIGIN
 671 CXX_FLAG_REORDER
 672 C_FLAG_REORDER
 673 SET_SHARED_LIBRARY_MAPFILE
 674 SET_SHARED_LIBRARY_NAME
 675 SHARED_LIBRARY_FLAGS
 676 EXE_SUFFIX
 677 STATIC_LIBRARY_SUFFIX
 678 SHARED_LIBRARY_SUFFIX
 679 LIBRARY_PREFIX
 680 STATIC_LIBRARY
 681 SHARED_LIBRARY
 682 OBJ_SUFFIX
 683 LIPO
 684 ac_ct_OBJDUMP
 685 OBJDUMP
 686 ac_ct_OBJCOPY
 687 OBJCOPY
 688 MCS
 689 STRIP
 690 NM
 691 AS
 692 CXXCPP
 693 CPP
 694 COMPILER_TYPE
 695 RC_FLAGS
 696 DUMPBIN
 697 WINAR
 698 HOTSPOT_RC
 699 HOTSPOT_MT
 700 RC
 701 MT
 702 WINLD
 703 HOTSPOT_LD
 704 HOTSPOT_CXX
 705 ARFLAGS
 706 AR
 707 LDEXECXX
 708 LDCXX
 709 LDEXE
 710 LD
 711 ac_ct_OBJC
 712 OBJCFLAGS
 713 OBJC
 714 ac_ct_CXX
 715 CXXFLAGS
 716 CXX
 717 ac_ct_PROPER_COMPILER_CXX
 718 PROPER_COMPILER_CXX
 719 POTENTIAL_CXX
 720 TOOLS_DIR_CXX
 721 OBJEXT
 722 EXEEXT
 723 ac_ct_CC
 724 CPPFLAGS
 725 LDFLAGS
 726 CFLAGS
 727 CC
 728 ac_ct_PROPER_COMPILER_CC
 729 PROPER_COMPILER_CC
 730 POTENTIAL_CC
 731 TOOLS_DIR_CC
 732 BUILD_LD
 733 BUILD_CXX
 734 BUILD_CC
 735 MSVCR_DLL
 736 DXSDK_INCLUDE_PATH
 737 DXSDK_LIB_PATH
 738 VS_PATH
 739 VS_LIB
 740 VS_INCLUDE
 741 CYGWIN_LINK
 742 AR_OUT_OPTION
 743 LD_OUT_OPTION
 744 EXE_OUT_OPTION
 745 CC_OUT_OPTION
 746 BUILD_HOTSPOT
 747 HOTSPOT_DIST
 748 BUILD_OUTPUT
 749 OVERRIDE_SRC_ROOT
 750 ADD_SRC_ROOT
 751 JDK_TOPDIR
 752 HOTSPOT_TOPDIR
 753 JAXWS_TOPDIR
 754 JAXP_TOPDIR
 755 CORBA_TOPDIR
 756 LANGTOOLS_TOPDIR
 757 BOOT_JDK_JVMARGS
 758 JAVAC_FLAGS
 759 BOOT_JDK_SOURCETARGET
 760 BOOT_JDK
 761 BOOT_TOOLSJAR
 762 BOOT_RTJAR
 763 JAVA_CHECK
 764 JAVAC_CHECK
 765 COOKED_BUILD_NUMBER
 766 JDK_VERSION
 767 COPYRIGHT_YEAR
 768 MACOSX_BUNDLE_ID_BASE
 769 MACOSX_BUNDLE_NAME_BASE
 770 COMPANY_NAME
 771 JDK_RC_PLATFORM_NAME
 772 PRODUCT_SUFFIX
 773 PRODUCT_NAME
 774 LAUNCHER_NAME
 775 MILESTONE
 776 JDK_BUILD_NUMBER
 777 JDK_UPDATE_VERSION
 778 JDK_MICRO_VERSION
 779 JDK_MINOR_VERSION
 780 JDK_MAJOR_VERSION
 781 USER_RELEASE_SUFFIX
 782 COMPRESS_JARS
 783 UNLIMITED_CRYPTO
 784 CACERTS_FILE
 785 TEST_IN_BUILD
 786 BUILD_HEADLESS
 787 SUPPORT_HEADFUL
 788 SUPPORT_HEADLESS
 789 BDEPS_FTP
 790 BDEPS_UNZIP
 791 OS_VERSION_MICRO
 792 OS_VERSION_MINOR
 793 OS_VERSION_MAJOR
 794 PKG_CONFIG
 795 TIME
 796 STAT
 797 HG
 798 READELF
 799 OTOOL
 800 LDD
 801 ZIP
 802 UNZIP
 803 FIND_DELETE
 804 MAKE
 805 CHECK_TOOLSDIR_MAKE
 806 CHECK_TOOLSDIR_GMAKE
 807 CHECK_MAKE
 808 CHECK_GMAKE
 809 PKGHANDLER
 810 OUTPUT_ROOT
 811 CONF_NAME
 812 SPEC
 813 BUILD_VARIANT_RELEASE
 814 DEBUG_CLASSFILES
 815 FASTDEBUG
 816 VARIANT
 817 DEBUG_LEVEL
 818 MACOSX_UNIVERSAL
 819 JVM_VARIANT_ZEROSHARK
 820 JVM_VARIANT_ZERO
 821 JVM_VARIANT_KERNEL
 822 JVM_VARIANT_MINIMAL1
 823 JVM_VARIANT_CLIENT
 824 JVM_VARIANT_SERVER
 825 JVM_VARIANTS
 826 JDK_VARIANT
 827 SET_OPENJDK
 828 BUILD_LOG_WRAPPER
 829 BUILD_LOG_PREVIOUS
 830 BUILD_LOG
 831 SYS_ROOT
 832 PATH_SEP
 833 SRC_ROOT
 834 DEFINE_CROSS_COMPILE_ARCH
 835 LP64
 836 OPENJDK_TARGET_OS_API_DIR
 837 OPENJDK_TARGET_CPU_JLI_CFLAGS
 838 OPENJDK_TARGET_CPU_OSARCH
 839 OPENJDK_TARGET_CPU_ISADIR
 840 OPENJDK_TARGET_CPU_LIBDIR
 841 OPENJDK_TARGET_CPU_LEGACY_LIB
 842 OPENJDK_TARGET_CPU_LEGACY
 843 REQUIRED_OS_VERSION
 844 REQUIRED_OS_NAME
 845 COMPILE_TYPE
 846 OPENJDK_TARGET_CPU_ENDIAN
 847 OPENJDK_TARGET_CPU_BITS
 848 OPENJDK_TARGET_CPU_ARCH
 849 OPENJDK_TARGET_CPU
 850 OPENJDK_TARGET_OS_API
 851 OPENJDK_TARGET_OS
 852 OPENJDK_BUILD_CPU_ENDIAN
 853 OPENJDK_BUILD_CPU_BITS
 854 OPENJDK_BUILD_CPU_ARCH
 855 OPENJDK_BUILD_CPU
 856 OPENJDK_BUILD_OS_API
 857 OPENJDK_BUILD_OS
 858 OPENJDK_BUILD_AUTOCONF_NAME
 859 OPENJDK_TARGET_AUTOCONF_NAME
 860 target_os
 861 target_vendor
 862 target_cpu
 863 target
 864 host_os
 865 host_vendor
 866 host_cpu
 867 host
 868 build_os
 869 build_vendor
 870 build_cpu
 871 build
 872 SETFILE
 873 DF
 874 READLINK
 875 CYGPATH
 876 NAWK
 877 SED
 878 FGREP
 879 EGREP
 880 GREP
 881 AWK
 882 XARGS
 883 WHICH
 884 WC
 885 UNIQ
 886 UNAME
 887 TR
 888 TOUCH
 889 TEE
 890 TAR
 891 TAIL
 892 SORT
 893 SH
 894 RM
 895 THEPWDCMD
 896 PRINTF
 897 MV
 898 MKTEMP
 899 MKDIR
 900 LS
 901 LN
 902 HEAD
 903 FIND
 904 FILE
 905 EXPR
 906 ECHO
 907 DIRNAME
 908 DIFF
 909 DATE
 910 CUT
 911 CPIO
 912 CP
 913 COMM
 914 CMP
 915 CHMOD
 916 CAT
 917 BASH
 918 BASENAME
 919 DATE_WHEN_CONFIGURED
 920 CONFIGURE_COMMAND_LINE
 921 CUSTOM_MAKE_DIR
 922 target_alias
 923 host_alias
 924 build_alias
 925 LIBS
 926 ECHO_T
 927 ECHO_N
 928 ECHO_C
 929 DEFS
 930 mandir
 931 localedir
 932 libdir
 933 psdir
 934 pdfdir
 935 dvidir
 936 htmldir
 937 infodir
 938 docdir
 939 oldincludedir
 940 includedir
 941 localstatedir
 942 sharedstatedir
 943 sysconfdir
 944 datadir
 945 datarootdir
 946 libexecdir
 947 sbindir
 948 bindir
 949 program_transform_name
 950 prefix
 951 exec_prefix
 952 PACKAGE_URL
 953 PACKAGE_BUGREPORT
 954 PACKAGE_STRING
 955 PACKAGE_VERSION
 956 PACKAGE_TARNAME
 957 PACKAGE_NAME
 958 PATH_SEPARATOR
 959 SHELL'
 960 ac_subst_files=''
 961 ac_user_opts='
 962 enable_option_checking
 963 with_custom_make_dir
 964 with_target_bits
 965 with_sys_root
 966 with_tools_dir
 967 with_devkit
 968 enable_openjdk_only
 969 with_jdk_variant
 970 with_jvm_variants
 971 enable_debug
 972 with_debug_level
 973 with_conf_name
 974 with_builddeps_conf
 975 with_builddeps_server
 976 with_builddeps_dir
 977 with_builddeps_group
 978 enable_headful
 979 enable_hotspot_test_in_build
 980 with_cacerts_file
 981 enable_unlimited_crypto
 982 with_milestone
 983 with_build_number
 984 with_user_release_suffix
 985 with_boot_jdk
 986 with_boot_jdk_jvmargs
 987 with_add_source_root
 988 with_override_source_root
 989 with_adds_and_overrides
 990 with_override_langtools
 991 with_override_corba
 992 with_override_jaxp
 993 with_override_jaxws
 994 with_override_hotspot
 995 with_override_jdk
 996 with_import_hotspot
 997 with_msvcr_dll
 998 with_dxsdk
 999 with_dxsdk_lib
1000 with_dxsdk_include
1001 with_extra_cflags
1002 with_extra_cxxflags
1003 with_extra_ldflags
1004 enable_debug_symbols
1005 enable_zip_debug_info
1006 enable_macosx_runtime_support
1007 with_x
1008 with_cups
1009 with_cups_include
1010 with_freetype
1011 with_alsa
1012 with_alsa_include
1013 with_alsa_lib
1014 with_zlib
1015 with_stdc__lib
1016 with_num_cores
1017 with_memory_size
1018 with_jobs
1019 with_sjavac_server_java
1020 with_sjavac_server_cores
1021 enable_sjavac
1022 enable_precompiled_headers
1023 enable_ccache
1024 with_ccache_dir
1025 '
1026       ac_precious_vars='build_alias
1027 host_alias
1028 target_alias
1029 PKG_CONFIG
1030 CC
1031 CFLAGS
1032 LDFLAGS
1033 LIBS
1034 CPPFLAGS
1035 CXX
1036 CXXFLAGS
1037 CCC
1038 OBJC
1039 OBJCFLAGS
1040 CPP
1041 CXXCPP
1042 XMKMF
1043 FREETYPE2_CFLAGS
1044 FREETYPE2_LIBS
1045 ALSA_CFLAGS
1046 ALSA_LIBS'
1047 
1048 
1049 # Initialize some variables set by options.
1050 ac_init_help=
1051 ac_init_version=false
1052 ac_unrecognized_opts=
1053 ac_unrecognized_sep=
1054 # The variables have the same names as the options, with
1055 # dashes changed to underlines.
1056 cache_file=/dev/null
1057 exec_prefix=NONE
1058 no_create=
1059 no_recursion=
1060 prefix=NONE
1061 program_prefix=NONE
1062 program_suffix=NONE
1063 program_transform_name=s,x,x,
1064 silent=
1065 site=
1066 srcdir=
1067 verbose=
1068 x_includes=NONE
1069 x_libraries=NONE
1070 
1071 # Installation directory options.
1072 # These are left unexpanded so users can "make install exec_prefix=/foo"
1073 # and all the variables that are supposed to be based on exec_prefix
1074 # by default will actually change.
1075 # Use braces instead of parens because sh, perl, etc. also accept them.
1076 # (The list follows the same order as the GNU Coding Standards.)
1077 bindir='${exec_prefix}/bin'
1078 sbindir='${exec_prefix}/sbin'
1079 libexecdir='${exec_prefix}/libexec'
1080 datarootdir='${prefix}/share'
1081 datadir='${datarootdir}'
1082 sysconfdir='${prefix}/etc'
1083 sharedstatedir='${prefix}/com'
1084 localstatedir='${prefix}/var'
1085 includedir='${prefix}/include'
1086 oldincludedir='/usr/include'
1087 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1088 infodir='${datarootdir}/info'
1089 htmldir='${docdir}'
1090 dvidir='${docdir}'
1091 pdfdir='${docdir}'
1092 psdir='${docdir}'
1093 libdir='${exec_prefix}/lib'
1094 localedir='${datarootdir}/locale'
1095 mandir='${datarootdir}/man'
1096 
1097 ac_prev=
1098 ac_dashdash=
1099 for ac_option
1100 do
1101   # If the previous option needs an argument, assign it.
1102   if test -n "$ac_prev"; then
1103     eval $ac_prev=\$ac_option
1104     ac_prev=
1105     continue
1106   fi
1107 
1108   case $ac_option in
1109   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1110   *=)   ac_optarg= ;;
1111   *)    ac_optarg=yes ;;
1112   esac
1113 
1114   # Accept the important Cygnus configure options, so we can diagnose typos.
1115 
1116   case $ac_dashdash$ac_option in
1117   --)
1118     ac_dashdash=yes ;;
1119 
1120   -bindir | --bindir | --bindi | --bind | --bin | --bi)
1121     ac_prev=bindir ;;
1122   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1123     bindir=$ac_optarg ;;
1124 
1125   -build | --build | --buil | --bui | --bu)
1126     ac_prev=build_alias ;;
1127   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1128     build_alias=$ac_optarg ;;
1129 
1130   -cache-file | --cache-file | --cache-fil | --cache-fi \
1131   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1132     ac_prev=cache_file ;;
1133   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1134   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1135     cache_file=$ac_optarg ;;
1136 
1137   --config-cache | -C)
1138     cache_file=config.cache ;;
1139 
1140   -datadir | --datadir | --datadi | --datad)
1141     ac_prev=datadir ;;
1142   -datadir=* | --datadir=* | --datadi=* | --datad=*)
1143     datadir=$ac_optarg ;;
1144 
1145   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1146   | --dataroo | --dataro | --datar)
1147     ac_prev=datarootdir ;;
1148   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1149   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1150     datarootdir=$ac_optarg ;;
1151 
1152   -disable-* | --disable-*)
1153     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1154     # Reject names that are not valid shell variable names.
1155     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1156       as_fn_error $? "invalid feature name: $ac_useropt"
1157     ac_useropt_orig=$ac_useropt
1158     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1159     case $ac_user_opts in
1160       *"
1161 "enable_$ac_useropt"
1162 "*) ;;
1163       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1164          ac_unrecognized_sep=', ';;
1165     esac
1166     eval enable_$ac_useropt=no ;;
1167 
1168   -docdir | --docdir | --docdi | --doc | --do)
1169     ac_prev=docdir ;;
1170   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1171     docdir=$ac_optarg ;;
1172 
1173   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1174     ac_prev=dvidir ;;
1175   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1176     dvidir=$ac_optarg ;;
1177 
1178   -enable-* | --enable-*)
1179     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1180     # Reject names that are not valid shell variable names.
1181     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1182       as_fn_error $? "invalid feature name: $ac_useropt"
1183     ac_useropt_orig=$ac_useropt
1184     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1185     case $ac_user_opts in
1186       *"
1187 "enable_$ac_useropt"
1188 "*) ;;
1189       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1190          ac_unrecognized_sep=', ';;
1191     esac
1192     eval enable_$ac_useropt=\$ac_optarg ;;
1193 
1194   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1195   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1196   | --exec | --exe | --ex)
1197     ac_prev=exec_prefix ;;
1198   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1199   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1200   | --exec=* | --exe=* | --ex=*)
1201     exec_prefix=$ac_optarg ;;
1202 
1203   -gas | --gas | --ga | --g)
1204     # Obsolete; use --with-gas.
1205     with_gas=yes ;;
1206 
1207   -help | --help | --hel | --he | -h)
1208     ac_init_help=long ;;
1209   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1210     ac_init_help=recursive ;;
1211   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1212     ac_init_help=short ;;
1213 
1214   -host | --host | --hos | --ho)
1215     ac_prev=host_alias ;;
1216   -host=* | --host=* | --hos=* | --ho=*)
1217     host_alias=$ac_optarg ;;
1218 
1219   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1220     ac_prev=htmldir ;;
1221   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1222   | --ht=*)
1223     htmldir=$ac_optarg ;;
1224 
1225   -includedir | --includedir | --includedi | --included | --include \
1226   | --includ | --inclu | --incl | --inc)
1227     ac_prev=includedir ;;
1228   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1229   | --includ=* | --inclu=* | --incl=* | --inc=*)
1230     includedir=$ac_optarg ;;
1231 
1232   -infodir | --infodir | --infodi | --infod | --info | --inf)
1233     ac_prev=infodir ;;
1234   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1235     infodir=$ac_optarg ;;
1236 
1237   -libdir | --libdir | --libdi | --libd)
1238     ac_prev=libdir ;;
1239   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1240     libdir=$ac_optarg ;;
1241 
1242   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1243   | --libexe | --libex | --libe)
1244     ac_prev=libexecdir ;;
1245   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1246   | --libexe=* | --libex=* | --libe=*)
1247     libexecdir=$ac_optarg ;;
1248 
1249   -localedir | --localedir | --localedi | --localed | --locale)
1250     ac_prev=localedir ;;
1251   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1252     localedir=$ac_optarg ;;
1253 
1254   -localstatedir | --localstatedir | --localstatedi | --localstated \
1255   | --localstate | --localstat | --localsta | --localst | --locals)
1256     ac_prev=localstatedir ;;
1257   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1258   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1259     localstatedir=$ac_optarg ;;
1260 
1261   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1262     ac_prev=mandir ;;
1263   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1264     mandir=$ac_optarg ;;
1265 
1266   -nfp | --nfp | --nf)
1267     # Obsolete; use --without-fp.
1268     with_fp=no ;;
1269 
1270   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1271   | --no-cr | --no-c | -n)
1272     no_create=yes ;;
1273 
1274   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1275   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1276     no_recursion=yes ;;
1277 
1278   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1279   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1280   | --oldin | --oldi | --old | --ol | --o)
1281     ac_prev=oldincludedir ;;
1282   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1283   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1284   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1285     oldincludedir=$ac_optarg ;;
1286 
1287   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1288     ac_prev=prefix ;;
1289   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1290     prefix=$ac_optarg ;;
1291 
1292   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1293   | --program-pre | --program-pr | --program-p)
1294     ac_prev=program_prefix ;;
1295   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1296   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1297     program_prefix=$ac_optarg ;;
1298 
1299   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1300   | --program-suf | --program-su | --program-s)
1301     ac_prev=program_suffix ;;
1302   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1303   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1304     program_suffix=$ac_optarg ;;
1305 
1306   -program-transform-name | --program-transform-name \
1307   | --program-transform-nam | --program-transform-na \
1308   | --program-transform-n | --program-transform- \
1309   | --program-transform | --program-transfor \
1310   | --program-transfo | --program-transf \
1311   | --program-trans | --program-tran \
1312   | --progr-tra | --program-tr | --program-t)
1313     ac_prev=program_transform_name ;;
1314   -program-transform-name=* | --program-transform-name=* \
1315   | --program-transform-nam=* | --program-transform-na=* \
1316   | --program-transform-n=* | --program-transform-=* \
1317   | --program-transform=* | --program-transfor=* \
1318   | --program-transfo=* | --program-transf=* \
1319   | --program-trans=* | --program-tran=* \
1320   | --progr-tra=* | --program-tr=* | --program-t=*)
1321     program_transform_name=$ac_optarg ;;
1322 
1323   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1324     ac_prev=pdfdir ;;
1325   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1326     pdfdir=$ac_optarg ;;
1327 
1328   -psdir | --psdir | --psdi | --psd | --ps)
1329     ac_prev=psdir ;;
1330   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1331     psdir=$ac_optarg ;;
1332 
1333   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1334   | -silent | --silent | --silen | --sile | --sil)
1335     silent=yes ;;
1336 
1337   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1338     ac_prev=sbindir ;;
1339   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1340   | --sbi=* | --sb=*)
1341     sbindir=$ac_optarg ;;
1342 
1343   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1344   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1345   | --sharedst | --shareds | --shared | --share | --shar \
1346   | --sha | --sh)
1347     ac_prev=sharedstatedir ;;
1348   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1349   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1350   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1351   | --sha=* | --sh=*)
1352     sharedstatedir=$ac_optarg ;;
1353 
1354   -site | --site | --sit)
1355     ac_prev=site ;;
1356   -site=* | --site=* | --sit=*)
1357     site=$ac_optarg ;;
1358 
1359   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1360     ac_prev=srcdir ;;
1361   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1362     srcdir=$ac_optarg ;;
1363 
1364   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1365   | --syscon | --sysco | --sysc | --sys | --sy)
1366     ac_prev=sysconfdir ;;
1367   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1368   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1369     sysconfdir=$ac_optarg ;;
1370 
1371   -target | --target | --targe | --targ | --tar | --ta | --t)
1372     ac_prev=target_alias ;;
1373   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1374     target_alias=$ac_optarg ;;
1375 
1376   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1377     verbose=yes ;;
1378 
1379   -version | --version | --versio | --versi | --vers | -V)
1380     ac_init_version=: ;;
1381 
1382   -with-* | --with-*)
1383     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1384     # Reject names that are not valid shell variable names.
1385     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1386       as_fn_error $? "invalid package name: $ac_useropt"
1387     ac_useropt_orig=$ac_useropt
1388     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1389     case $ac_user_opts in
1390       *"
1391 "with_$ac_useropt"
1392 "*) ;;
1393       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1394          ac_unrecognized_sep=', ';;
1395     esac
1396     eval with_$ac_useropt=\$ac_optarg ;;
1397 
1398   -without-* | --without-*)
1399     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1400     # Reject names that are not valid shell variable names.
1401     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1402       as_fn_error $? "invalid package name: $ac_useropt"
1403     ac_useropt_orig=$ac_useropt
1404     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1405     case $ac_user_opts in
1406       *"
1407 "with_$ac_useropt"
1408 "*) ;;
1409       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1410          ac_unrecognized_sep=', ';;
1411     esac
1412     eval with_$ac_useropt=no ;;
1413 
1414   --x)
1415     # Obsolete; use --with-x.
1416     with_x=yes ;;
1417 
1418   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1419   | --x-incl | --x-inc | --x-in | --x-i)
1420     ac_prev=x_includes ;;
1421   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1422   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1423     x_includes=$ac_optarg ;;
1424 
1425   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1426   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1427     ac_prev=x_libraries ;;
1428   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1429   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1430     x_libraries=$ac_optarg ;;
1431 
1432   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1433 Try \`$0 --help' for more information"
1434     ;;
1435 
1436   *=*)
1437     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1438     # Reject names that are not valid shell variable names.
1439     case $ac_envvar in #(
1440       '' | [0-9]* | *[!_$as_cr_alnum]* )
1441       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1442     esac
1443     eval $ac_envvar=\$ac_optarg
1444     export $ac_envvar ;;
1445 
1446   *)
1447     # FIXME: should be removed in autoconf 3.0.
1448     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1449     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1450       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1451     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1452     ;;
1453 
1454   esac
1455 done
1456 
1457 if test -n "$ac_prev"; then
1458   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1459   as_fn_error $? "missing argument to $ac_option"
1460 fi
1461 
1462 if test -n "$ac_unrecognized_opts"; then
1463   case $enable_option_checking in
1464     no) ;;
1465     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1466     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1467   esac
1468 fi
1469 
1470 # Check all directory arguments for consistency.
1471 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1472                 datadir sysconfdir sharedstatedir localstatedir includedir \
1473                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1474                 libdir localedir mandir
1475 do
1476   eval ac_val=\$$ac_var
1477   # Remove trailing slashes.
1478   case $ac_val in
1479     */ )
1480       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1481       eval $ac_var=\$ac_val;;
1482   esac
1483   # Be sure to have absolute directory names.
1484   case $ac_val in
1485     [\\/$]* | ?:[\\/]* )  continue;;
1486     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1487   esac
1488   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1489 done
1490 
1491 # There might be people who depend on the old broken behavior: `$host'
1492 # used to hold the argument of --host etc.
1493 # FIXME: To remove some day.
1494 build=$build_alias
1495 host=$host_alias
1496 target=$target_alias
1497 
1498 # FIXME: To remove some day.
1499 if test "x$host_alias" != x; then
1500   if test "x$build_alias" = x; then
1501     cross_compiling=maybe
1502     $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1503     If a cross compiler is detected then cross compile mode will be used" >&2
1504   elif test "x$build_alias" != "x$host_alias"; then
1505     cross_compiling=yes
1506   fi
1507 fi
1508 
1509 ac_tool_prefix=
1510 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1511 
1512 test "$silent" = yes && exec 6>/dev/null
1513 
1514 
1515 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1516 ac_ls_di=`ls -di .` &&
1517 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1518   as_fn_error $? "working directory cannot be determined"
1519 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1520   as_fn_error $? "pwd does not report name of working directory"
1521 
1522 
1523 # Find the source files, if location was not specified.
1524 if test -z "$srcdir"; then
1525   ac_srcdir_defaulted=yes
1526   # Try the directory containing this script, then the parent directory.
1527   ac_confdir=`$as_dirname -- "$as_myself" ||
1528 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1529          X"$as_myself" : 'X\(//\)[^/]' \| \
1530          X"$as_myself" : 'X\(//\)$' \| \
1531          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1532 $as_echo X"$as_myself" |
1533     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1534             s//\1/
1535             q
1536           }
1537           /^X\(\/\/\)[^/].*/{
1538             s//\1/
1539             q
1540           }
1541           /^X\(\/\/\)$/{
1542             s//\1/
1543             q
1544           }
1545           /^X\(\/\).*/{
1546             s//\1/
1547             q
1548           }
1549           s/.*/./; q'`
1550   srcdir=$ac_confdir
1551   if test ! -r "$srcdir/$ac_unique_file"; then
1552     srcdir=..
1553   fi
1554 else
1555   ac_srcdir_defaulted=no
1556 fi
1557 if test ! -r "$srcdir/$ac_unique_file"; then
1558   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1559   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1560 fi
1561 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1562 ac_abs_confdir=`(
1563         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1564         pwd)`
1565 # When building in place, set srcdir=.
1566 if test "$ac_abs_confdir" = "$ac_pwd"; then
1567   srcdir=.
1568 fi
1569 # Remove unnecessary trailing slashes from srcdir.
1570 # Double slashes in file names in object file debugging info
1571 # mess up M-x gdb in Emacs.
1572 case $srcdir in
1573 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1574 esac
1575 for ac_var in $ac_precious_vars; do
1576   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1577   eval ac_env_${ac_var}_value=\$${ac_var}
1578   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1579   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1580 done
1581 
1582 #
1583 # Report the --help message.
1584 #
1585 if test "$ac_init_help" = "long"; then
1586   # Omit some internal or obsolete options to make the list less imposing.
1587   # This message is too long to be a string in the A/UX 3.1 sh.
1588   cat <<_ACEOF
1589 \`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1590 
1591 Usage: $0 [OPTION]... [VAR=VALUE]...
1592 
1593 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1594 VAR=VALUE.  See below for descriptions of some of the useful variables.
1595 
1596 Defaults for the options are specified in brackets.
1597 
1598 Configuration:
1599   -h, --help              display this help and exit
1600       --help=short        display options specific to this package
1601       --help=recursive    display the short help of all the included packages
1602   -V, --version           display version information and exit
1603   -q, --quiet, --silent   do not print \`checking ...' messages
1604       --cache-file=FILE   cache test results in FILE [disabled]
1605   -C, --config-cache      alias for \`--cache-file=config.cache'
1606   -n, --no-create         do not create output files
1607       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1608 
1609 Installation directories:
1610   --prefix=PREFIX         install architecture-independent files in PREFIX
1611                           [$ac_default_prefix]
1612   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1613                           [PREFIX]
1614 
1615 By default, \`make install' will install all the files in
1616 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1617 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1618 for instance \`--prefix=\$HOME'.
1619 
1620 For better control, use the options below.
1621 
1622 Fine tuning of the installation directories:
1623   --bindir=DIR            user executables [EPREFIX/bin]
1624   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1625   --libexecdir=DIR        program executables [EPREFIX/libexec]
1626   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1627   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1628   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1629   --libdir=DIR            object code libraries [EPREFIX/lib]
1630   --includedir=DIR        C header files [PREFIX/include]
1631   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1632   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1633   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1634   --infodir=DIR           info documentation [DATAROOTDIR/info]
1635   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1636   --mandir=DIR            man documentation [DATAROOTDIR/man]
1637   --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1638   --htmldir=DIR           html documentation [DOCDIR]
1639   --dvidir=DIR            dvi documentation [DOCDIR]
1640   --pdfdir=DIR            pdf documentation [DOCDIR]
1641   --psdir=DIR             ps documentation [DOCDIR]
1642 _ACEOF
1643 
1644   cat <<\_ACEOF
1645 
1646 X features:
1647   --x-includes=DIR    X include files are in DIR
1648   --x-libraries=DIR   X library files are in DIR
1649 
1650 System types:
1651   --build=BUILD     configure for building on BUILD [guessed]
1652   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1653   --target=TARGET   configure for building compilers for TARGET [HOST]
1654 _ACEOF
1655 fi
1656 
1657 if test -n "$ac_init_help"; then
1658   case $ac_init_help in
1659      short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1660    esac
1661   cat <<\_ACEOF
1662 
1663 Optional Features:
1664   --disable-option-checking  ignore unrecognized --enable/--with options
1665   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1666   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1667   --enable-openjdk-only   suppress building custom source even if present
1668                           [disabled]
1669   --enable-debug          set the debug level to fastdebug (shorthand for
1670                           --with-debug-level=fastdebug) [disabled]
1671   --disable-headful       disable building headful support (graphical UI
1672                           support) [enabled]
1673   --enable-hotspot-test-in-build
1674                           run the Queens test after Hotspot build [disabled]
1675   --enable-unlimited-crypto
1676                           Enable unlimited crypto policy [disabled]
1677   --disable-debug-symbols disable generation of debug symbols [enabled]
1678   --disable-zip-debug-info
1679                           disable zipping of debug-info files [enabled]
1680   --disable-macosx-runtime-support
1681                           disable the use of MacOSX Java runtime support
1682                           framework [enabled]
1683   --enable-sjavac         use sjavac to do fast incremental compiles
1684                           [disabled]
1685   --disable-precompiled-headers
1686                           disable using precompiled headers when compiling C++
1687                           [enabled]
1688   --disable-ccache        disable using ccache to speed up recompilations
1689                           [enabled]
1690 
1691 Optional Packages:
1692   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1693   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1694   --with-custom-make-dir  use this directory for custom build/make files
1695   --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1696                           support it), e.g. --with-target-bits=32 [guessed]
1697   --with-sys-root         pass this sys-root to the compilers and tools (for
1698                           cross-compiling)
1699   --with-tools-dir        search this directory for compilers and tools (for
1700                           cross-compiling)
1701   --with-devkit           use this directory as base for tools-dir and
1702                           sys-root (for cross-compiling)
1703   --with-jdk-variant      JDK variant to build (normal) [normal]
1704   --with-jvm-variants     JVM variants (separated by commas) to build (server,
1705                           client, minimal1, kernel, zero, zeroshark) [server]
1706   --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1707                           [release]
1708   --with-conf-name        use this as the name of the configuration [generated
1709                           from important configuration options]
1710   --with-builddeps-conf   use this configuration file for the builddeps
1711   --with-builddeps-server download and use build dependencies from this server
1712                           url
1713   --with-builddeps-dir    store downloaded build dependencies here
1714                           [/localhome/builddeps]
1715   --with-builddeps-group  chgrp the downloaded build dependencies to this
1716                           group
1717   --with-cacerts-file     specify alternative cacerts file
1718   --with-milestone        Set milestone value for build [internal]
1719   --with-build-number     Set build number value for build [b00]
1720   --with-user-release-suffix
1721                           Add a custom string to the version string if build
1722                           number isn't set.[username_builddateb00]
1723   --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1724   --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1725                           invocations of the Boot JDK, overriding the default
1726                           values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1727                           -enableassertions"
1728   --with-add-source-root  for each and every source directory, look in this
1729                           additional source root for the same directory; if it
1730                           exists and have files in it, include it in the build
1731   --with-override-source-root
1732                           for each and every source directory, look in this
1733                           override source root for the same directory; if it
1734                           exists, use that directory instead and ignore the
1735                           directory in the original source root
1736   --with-adds-and-overrides
1737                           use the subdirs 'adds' and 'overrides' in the
1738                           specified directory as add-source-root and
1739                           override-source-root
1740   --with-override-langtools
1741                           use this langtools dir for the build
1742   --with-override-corba   use this corba dir for the build
1743   --with-override-jaxp    use this jaxp dir for the build
1744   --with-override-jaxws   use this jaxws dir for the build
1745   --with-override-hotspot use this hotspot dir for the build
1746   --with-override-jdk     use this jdk dir for the build
1747   --with-import-hotspot   import hotspot binaries from this jdk image or
1748                           hotspot build dist dir instead of building from
1749                           source
1750   --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1751                           only) [probed]
1752   --with-dxsdk            the DirectX SDK (Windows only) [probed]
1753   --with-dxsdk-lib        the DirectX SDK lib directory (Windows only)
1754                           [probed]
1755   --with-dxsdk-include    the DirectX SDK include directory (Windows only)
1756                           [probed]
1757   --with-extra-cflags     extra flags to be used when compiling jdk c-files
1758   --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1759   --with-extra-ldflags    extra flags to be used when linking jdk
1760   --with-x                use the X Window System
1761   --with-cups             specify prefix directory for the cups package
1762                           (expecting the headers under PATH/include)
1763   --with-cups-include     specify directory for the cups include files
1764   --with-freetype         specify prefix directory for the freetype2 package
1765                           (expecting the libraries under PATH/lib and the
1766                           headers under PATH/include)
1767   --with-alsa             specify prefix directory for the alsa package
1768                           (expecting the libraries under PATH/lib and the
1769                           headers under PATH/include)
1770   --with-alsa-include     specify directory for the alsa include files
1771   --with-alsa-lib         specify directory for the alsa library
1772   --with-zlib             use zlib from build system or OpenJDK source
1773                           (system, bundled) [bundled]
1774   --with-stdc++lib=<static>,<dynamic>,<default>
1775                           force linking of the C++ runtime on Linux to either
1776                           static or dynamic, default is static with dynamic as
1777                           fallback
1778   --with-num-cores        number of cores in the build system, e.g.
1779                           --with-num-cores=8 [probed]
1780   --with-memory-size      memory (in MB) available in the build system, e.g.
1781                           --with-memory-size=1024 [probed]
1782   --with-jobs             number of parallel jobs to let make run [calculated
1783                           based on cores and memory]
1784   --with-sjavac-server-java
1785                           use this java binary for running the sjavac
1786                           background server [Boot JDK java]
1787   --with-sjavac-server-cores
1788                           use at most this number of concurrent threads on the
1789                           sjavac server [probed]
1790   --with-ccache-dir       where to store ccache files [~/.ccache]
1791 
1792 Some influential environment variables:
1793   PKG_CONFIG  path to pkg-config utility
1794   CC          C compiler command
1795   CFLAGS      C compiler flags
1796   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1797               nonstandard directory <lib dir>
1798   LIBS        libraries to pass to the linker, e.g. -l<library>
1799   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1800               you have headers in a nonstandard directory <include dir>
1801   CXX         C++ compiler command
1802   CXXFLAGS    C++ compiler flags
1803   OBJC        Objective C compiler command
1804   OBJCFLAGS   Objective C compiler flags
1805   CPP         C preprocessor
1806   CXXCPP      C++ preprocessor
1807   XMKMF       Path to xmkmf, Makefile generator for X Window System
1808   FREETYPE2_CFLAGS
1809               C compiler flags for FREETYPE2, overriding pkg-config
1810   FREETYPE2_LIBS
1811               linker flags for FREETYPE2, overriding pkg-config
1812   ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1813   ALSA_LIBS   linker flags for ALSA, overriding pkg-config
1814 
1815 Use these variables to override the choices made by `configure' or to help
1816 it to find libraries and programs with nonstandard names/locations.
1817 
1818 Report bugs to <build-dev@openjdk.java.net>.
1819 OpenJDK home page: <http://openjdk.java.net>.
1820 _ACEOF
1821 ac_status=$?
1822 fi
1823 
1824 if test "$ac_init_help" = "recursive"; then
1825   # If there are subdirs, report their specific --help.
1826   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1827     test -d "$ac_dir" ||
1828       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1829       continue
1830     ac_builddir=.
1831 
1832 case "$ac_dir" in
1833 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1834 *)
1835   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1836   # A ".." for each directory in $ac_dir_suffix.
1837   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1838   case $ac_top_builddir_sub in
1839   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1840   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1841   esac ;;
1842 esac
1843 ac_abs_top_builddir=$ac_pwd
1844 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1845 # for backward compatibility:
1846 ac_top_builddir=$ac_top_build_prefix
1847 
1848 case $srcdir in
1849   .)  # We are building in place.
1850     ac_srcdir=.
1851     ac_top_srcdir=$ac_top_builddir_sub
1852     ac_abs_top_srcdir=$ac_pwd ;;
1853   [\\/]* | ?:[\\/]* )  # Absolute name.
1854     ac_srcdir=$srcdir$ac_dir_suffix;
1855     ac_top_srcdir=$srcdir
1856     ac_abs_top_srcdir=$srcdir ;;
1857   *) # Relative name.
1858     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1859     ac_top_srcdir=$ac_top_build_prefix$srcdir
1860     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1861 esac
1862 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1863 
1864     cd "$ac_dir" || { ac_status=$?; continue; }
1865     # Check for guested configure.
1866     if test -f "$ac_srcdir/configure.gnu"; then
1867       echo &&
1868       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1869     elif test -f "$ac_srcdir/configure"; then
1870       echo &&
1871       $SHELL "$ac_srcdir/configure" --help=recursive
1872     else
1873       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1874     fi || ac_status=$?
1875     cd "$ac_pwd" || { ac_status=$?; break; }
1876   done
1877 fi
1878 
1879 test -n "$ac_init_help" && exit $ac_status
1880 if $ac_init_version; then
1881   cat <<\_ACEOF
1882 OpenJDK configure jdk8
1883 generated by GNU Autoconf 2.68
1884 
1885 Copyright (C) 2010 Free Software Foundation, Inc.
1886 This configure script is free software; the Free Software Foundation
1887 gives unlimited permission to copy, distribute and modify it.
1888 _ACEOF
1889   exit
1890 fi
1891 
1892 ## ------------------------ ##
1893 ## Autoconf initialization. ##
1894 ## ------------------------ ##
1895 
1896 # ac_fn_c_try_compile LINENO
1897 # --------------------------
1898 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1899 ac_fn_c_try_compile ()
1900 {
1901   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1902   rm -f conftest.$ac_objext
1903   if { { ac_try="$ac_compile"
1904 case "(($ac_try" in
1905   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1906   *) ac_try_echo=$ac_try;;
1907 esac
1908 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1909 $as_echo "$ac_try_echo"; } >&5
1910   (eval "$ac_compile") 2>conftest.err
1911   ac_status=$?
1912   if test -s conftest.err; then
1913     grep -v '^ *+' conftest.err >conftest.er1
1914     cat conftest.er1 >&5
1915     mv -f conftest.er1 conftest.err
1916   fi
1917   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1918   test $ac_status = 0; } && {
1919          test -z "$ac_c_werror_flag" ||
1920          test ! -s conftest.err
1921        } && test -s conftest.$ac_objext; then :
1922   ac_retval=0
1923 else
1924   $as_echo "$as_me: failed program was:" >&5
1925 sed 's/^/| /' conftest.$ac_ext >&5
1926 
1927         ac_retval=1
1928 fi
1929   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1930   as_fn_set_status $ac_retval
1931 
1932 } # ac_fn_c_try_compile
1933 
1934 # ac_fn_cxx_try_compile LINENO
1935 # ----------------------------
1936 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1937 ac_fn_cxx_try_compile ()
1938 {
1939   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1940   rm -f conftest.$ac_objext
1941   if { { ac_try="$ac_compile"
1942 case "(($ac_try" in
1943   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1944   *) ac_try_echo=$ac_try;;
1945 esac
1946 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1947 $as_echo "$ac_try_echo"; } >&5
1948   (eval "$ac_compile") 2>conftest.err
1949   ac_status=$?
1950   if test -s conftest.err; then
1951     grep -v '^ *+' conftest.err >conftest.er1
1952     cat conftest.er1 >&5
1953     mv -f conftest.er1 conftest.err
1954   fi
1955   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1956   test $ac_status = 0; } && {
1957          test -z "$ac_cxx_werror_flag" ||
1958          test ! -s conftest.err
1959        } && test -s conftest.$ac_objext; then :
1960   ac_retval=0
1961 else
1962   $as_echo "$as_me: failed program was:" >&5
1963 sed 's/^/| /' conftest.$ac_ext >&5
1964 
1965         ac_retval=1
1966 fi
1967   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1968   as_fn_set_status $ac_retval
1969 
1970 } # ac_fn_cxx_try_compile
1971 
1972 # ac_fn_objc_try_compile LINENO
1973 # -----------------------------
1974 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1975 ac_fn_objc_try_compile ()
1976 {
1977   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1978   rm -f conftest.$ac_objext
1979   if { { ac_try="$ac_compile"
1980 case "(($ac_try" in
1981   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1982   *) ac_try_echo=$ac_try;;
1983 esac
1984 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1985 $as_echo "$ac_try_echo"; } >&5
1986   (eval "$ac_compile") 2>conftest.err
1987   ac_status=$?
1988   if test -s conftest.err; then
1989     grep -v '^ *+' conftest.err >conftest.er1
1990     cat conftest.er1 >&5
1991     mv -f conftest.er1 conftest.err
1992   fi
1993   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1994   test $ac_status = 0; } && {
1995          test -z "$ac_objc_werror_flag" ||
1996          test ! -s conftest.err
1997        } && test -s conftest.$ac_objext; then :
1998   ac_retval=0
1999 else
2000   $as_echo "$as_me: failed program was:" >&5
2001 sed 's/^/| /' conftest.$ac_ext >&5
2002 
2003         ac_retval=1
2004 fi
2005   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2006   as_fn_set_status $ac_retval
2007 
2008 } # ac_fn_objc_try_compile
2009 
2010 # ac_fn_c_try_cpp LINENO
2011 # ----------------------
2012 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2013 ac_fn_c_try_cpp ()
2014 {
2015   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2016   if { { ac_try="$ac_cpp conftest.$ac_ext"
2017 case "(($ac_try" in
2018   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2019   *) ac_try_echo=$ac_try;;
2020 esac
2021 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2022 $as_echo "$ac_try_echo"; } >&5
2023   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2024   ac_status=$?
2025   if test -s conftest.err; then
2026     grep -v '^ *+' conftest.err >conftest.er1
2027     cat conftest.er1 >&5
2028     mv -f conftest.er1 conftest.err
2029   fi
2030   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2031   test $ac_status = 0; } > conftest.i && {
2032          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2033          test ! -s conftest.err
2034        }; then :
2035   ac_retval=0
2036 else
2037   $as_echo "$as_me: failed program was:" >&5
2038 sed 's/^/| /' conftest.$ac_ext >&5
2039 
2040     ac_retval=1
2041 fi
2042   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2043   as_fn_set_status $ac_retval
2044 
2045 } # ac_fn_c_try_cpp
2046 
2047 # ac_fn_cxx_try_cpp LINENO
2048 # ------------------------
2049 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2050 ac_fn_cxx_try_cpp ()
2051 {
2052   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2053   if { { ac_try="$ac_cpp conftest.$ac_ext"
2054 case "(($ac_try" in
2055   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2056   *) ac_try_echo=$ac_try;;
2057 esac
2058 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2059 $as_echo "$ac_try_echo"; } >&5
2060   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2061   ac_status=$?
2062   if test -s conftest.err; then
2063     grep -v '^ *+' conftest.err >conftest.er1
2064     cat conftest.er1 >&5
2065     mv -f conftest.er1 conftest.err
2066   fi
2067   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2068   test $ac_status = 0; } > conftest.i && {
2069          test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2070          test ! -s conftest.err
2071        }; then :
2072   ac_retval=0
2073 else
2074   $as_echo "$as_me: failed program was:" >&5
2075 sed 's/^/| /' conftest.$ac_ext >&5
2076 
2077     ac_retval=1
2078 fi
2079   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2080   as_fn_set_status $ac_retval
2081 
2082 } # ac_fn_cxx_try_cpp
2083 
2084 # ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2085 # ---------------------------------------------------------
2086 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2087 # the include files in INCLUDES and setting the cache variable VAR
2088 # accordingly.
2089 ac_fn_cxx_check_header_mongrel ()
2090 {
2091   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2092   if eval \${$3+:} false; then :
2093   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2094 $as_echo_n "checking for $2... " >&6; }
2095 if eval \${$3+:} false; then :
2096   $as_echo_n "(cached) " >&6
2097 fi
2098 eval ac_res=\$$3
2099                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2100 $as_echo "$ac_res" >&6; }
2101 else
2102   # Is the header compilable?
2103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2104 $as_echo_n "checking $2 usability... " >&6; }
2105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2106 /* end confdefs.h.  */
2107 $4
2108 #include <$2>
2109 _ACEOF
2110 if ac_fn_cxx_try_compile "$LINENO"; then :
2111   ac_header_compiler=yes
2112 else
2113   ac_header_compiler=no
2114 fi
2115 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2117 $as_echo "$ac_header_compiler" >&6; }
2118 
2119 # Is the header present?
2120 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2121 $as_echo_n "checking $2 presence... " >&6; }
2122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2123 /* end confdefs.h.  */
2124 #include <$2>
2125 _ACEOF
2126 if ac_fn_cxx_try_cpp "$LINENO"; then :
2127   ac_header_preproc=yes
2128 else
2129   ac_header_preproc=no
2130 fi
2131 rm -f conftest.err conftest.i conftest.$ac_ext
2132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2133 $as_echo "$ac_header_preproc" >&6; }
2134 
2135 # So?  What about this header?
2136 case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2137   yes:no: )
2138     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2139 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2140     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2141 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2142     ;;
2143   no:yes:* )
2144     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2145 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2146     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2147 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2148     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2149 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2150     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2151 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2152     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2153 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2154 ( $as_echo "## ----------------------------------------- ##
2155 ## Report this to build-dev@openjdk.java.net ##
2156 ## ----------------------------------------- ##"
2157      ) | sed "s/^/$as_me: WARNING:     /" >&2
2158     ;;
2159 esac
2160   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2161 $as_echo_n "checking for $2... " >&6; }
2162 if eval \${$3+:} false; then :
2163   $as_echo_n "(cached) " >&6
2164 else
2165   eval "$3=\$ac_header_compiler"
2166 fi
2167 eval ac_res=\$$3
2168                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2169 $as_echo "$ac_res" >&6; }
2170 fi
2171   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2172 
2173 } # ac_fn_cxx_check_header_mongrel
2174 
2175 # ac_fn_cxx_try_run LINENO
2176 # ------------------------
2177 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2178 # that executables *can* be run.
2179 ac_fn_cxx_try_run ()
2180 {
2181   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2182   if { { ac_try="$ac_link"
2183 case "(($ac_try" in
2184   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2185   *) ac_try_echo=$ac_try;;
2186 esac
2187 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2188 $as_echo "$ac_try_echo"; } >&5
2189   (eval "$ac_link") 2>&5
2190   ac_status=$?
2191   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2192   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2193   { { case "(($ac_try" in
2194   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2195   *) ac_try_echo=$ac_try;;
2196 esac
2197 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2198 $as_echo "$ac_try_echo"; } >&5
2199   (eval "$ac_try") 2>&5
2200   ac_status=$?
2201   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2202   test $ac_status = 0; }; }; then :
2203   ac_retval=0
2204 else
2205   $as_echo "$as_me: program exited with status $ac_status" >&5
2206        $as_echo "$as_me: failed program was:" >&5
2207 sed 's/^/| /' conftest.$ac_ext >&5
2208 
2209        ac_retval=$ac_status
2210 fi
2211   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2212   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2213   as_fn_set_status $ac_retval
2214 
2215 } # ac_fn_cxx_try_run
2216 
2217 # ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2218 # ---------------------------------------------------------
2219 # Tests whether HEADER exists and can be compiled using the include files in
2220 # INCLUDES, setting the cache variable VAR accordingly.
2221 ac_fn_cxx_check_header_compile ()
2222 {
2223   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2224   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2225 $as_echo_n "checking for $2... " >&6; }
2226 if eval \${$3+:} false; then :
2227   $as_echo_n "(cached) " >&6
2228 else
2229   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2230 /* end confdefs.h.  */
2231 $4
2232 #include <$2>
2233 _ACEOF
2234 if ac_fn_cxx_try_compile "$LINENO"; then :
2235   eval "$3=yes"
2236 else
2237   eval "$3=no"
2238 fi
2239 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2240 fi
2241 eval ac_res=\$$3
2242                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2243 $as_echo "$ac_res" >&6; }
2244   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2245 
2246 } # ac_fn_cxx_check_header_compile
2247 
2248 # ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2249 # ----------------------------------------------
2250 # Tries to find the compile-time value of EXPR in a program that includes
2251 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2252 # computed
2253 ac_fn_cxx_compute_int ()
2254 {
2255   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2256   if test "$cross_compiling" = yes; then
2257     # Depending upon the size, compute the lo and hi bounds.
2258 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2259 /* end confdefs.h.  */
2260 $4
2261 int
2262 main ()
2263 {
2264 static int test_array [1 - 2 * !(($2) >= 0)];
2265 test_array [0] = 0
2266 
2267   ;
2268   return 0;
2269 }
2270 _ACEOF
2271 if ac_fn_cxx_try_compile "$LINENO"; then :
2272   ac_lo=0 ac_mid=0
2273   while :; do
2274     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2275 /* end confdefs.h.  */
2276 $4
2277 int
2278 main ()
2279 {
2280 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2281 test_array [0] = 0
2282 
2283   ;
2284   return 0;
2285 }
2286 _ACEOF
2287 if ac_fn_cxx_try_compile "$LINENO"; then :
2288   ac_hi=$ac_mid; break
2289 else
2290   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2291                         if test $ac_lo -le $ac_mid; then
2292                           ac_lo= ac_hi=
2293                           break
2294                         fi
2295                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2296 fi
2297 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2298   done
2299 else
2300   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2301 /* end confdefs.h.  */
2302 $4
2303 int
2304 main ()
2305 {
2306 static int test_array [1 - 2 * !(($2) < 0)];
2307 test_array [0] = 0
2308 
2309   ;
2310   return 0;
2311 }
2312 _ACEOF
2313 if ac_fn_cxx_try_compile "$LINENO"; then :
2314   ac_hi=-1 ac_mid=-1
2315   while :; do
2316     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2317 /* end confdefs.h.  */
2318 $4
2319 int
2320 main ()
2321 {
2322 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2323 test_array [0] = 0
2324 
2325   ;
2326   return 0;
2327 }
2328 _ACEOF
2329 if ac_fn_cxx_try_compile "$LINENO"; then :
2330   ac_lo=$ac_mid; break
2331 else
2332   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2333                         if test $ac_mid -le $ac_hi; then
2334                           ac_lo= ac_hi=
2335                           break
2336                         fi
2337                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2338 fi
2339 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2340   done
2341 else
2342   ac_lo= ac_hi=
2343 fi
2344 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2345 fi
2346 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2347 # Binary search between lo and hi bounds.
2348 while test "x$ac_lo" != "x$ac_hi"; do
2349   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2350   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2351 /* end confdefs.h.  */
2352 $4
2353 int
2354 main ()
2355 {
2356 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2357 test_array [0] = 0
2358 
2359   ;
2360   return 0;
2361 }
2362 _ACEOF
2363 if ac_fn_cxx_try_compile "$LINENO"; then :
2364   ac_hi=$ac_mid
2365 else
2366   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2367 fi
2368 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2369 done
2370 case $ac_lo in #((
2371 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2372 '') ac_retval=1 ;;
2373 esac
2374   else
2375     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2376 /* end confdefs.h.  */
2377 $4
2378 static long int longval () { return $2; }
2379 static unsigned long int ulongval () { return $2; }
2380 #include <stdio.h>
2381 #include <stdlib.h>
2382 int
2383 main ()
2384 {
2385 
2386   FILE *f = fopen ("conftest.val", "w");
2387   if (! f)
2388     return 1;
2389   if (($2) < 0)
2390     {
2391       long int i = longval ();
2392       if (i != ($2))
2393         return 1;
2394       fprintf (f, "%ld", i);
2395     }
2396   else
2397     {
2398       unsigned long int i = ulongval ();
2399       if (i != ($2))
2400         return 1;
2401       fprintf (f, "%lu", i);
2402     }
2403   /* Do not output a trailing newline, as this causes \r\n confusion
2404      on some platforms.  */
2405   return ferror (f) || fclose (f) != 0;
2406 
2407   ;
2408   return 0;
2409 }
2410 _ACEOF
2411 if ac_fn_cxx_try_run "$LINENO"; then :
2412   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2413 else
2414   ac_retval=1
2415 fi
2416 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2417   conftest.$ac_objext conftest.beam conftest.$ac_ext
2418 rm -f conftest.val
2419 
2420   fi
2421   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2422   as_fn_set_status $ac_retval
2423 
2424 } # ac_fn_cxx_compute_int
2425 
2426 # ac_fn_cxx_try_link LINENO
2427 # -------------------------
2428 # Try to link conftest.$ac_ext, and return whether this succeeded.
2429 ac_fn_cxx_try_link ()
2430 {
2431   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2432   rm -f conftest.$ac_objext conftest$ac_exeext
2433   if { { ac_try="$ac_link"
2434 case "(($ac_try" in
2435   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2436   *) ac_try_echo=$ac_try;;
2437 esac
2438 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2439 $as_echo "$ac_try_echo"; } >&5
2440   (eval "$ac_link") 2>conftest.err
2441   ac_status=$?
2442   if test -s conftest.err; then
2443     grep -v '^ *+' conftest.err >conftest.er1
2444     cat conftest.er1 >&5
2445     mv -f conftest.er1 conftest.err
2446   fi
2447   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2448   test $ac_status = 0; } && {
2449          test -z "$ac_cxx_werror_flag" ||
2450          test ! -s conftest.err
2451        } && test -s conftest$ac_exeext && {
2452          test "$cross_compiling" = yes ||
2453          $as_test_x conftest$ac_exeext
2454        }; then :
2455   ac_retval=0
2456 else
2457   $as_echo "$as_me: failed program was:" >&5
2458 sed 's/^/| /' conftest.$ac_ext >&5
2459 
2460         ac_retval=1
2461 fi
2462   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2463   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2464   # interfere with the next link command; also delete a directory that is
2465   # left behind by Apple's compiler.  We do this before executing the actions.
2466   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2467   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2468   as_fn_set_status $ac_retval
2469 
2470 } # ac_fn_cxx_try_link
2471 
2472 # ac_fn_cxx_check_func LINENO FUNC VAR
2473 # ------------------------------------
2474 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2475 ac_fn_cxx_check_func ()
2476 {
2477   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2478   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2479 $as_echo_n "checking for $2... " >&6; }
2480 if eval \${$3+:} false; then :
2481   $as_echo_n "(cached) " >&6
2482 else
2483   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2484 /* end confdefs.h.  */
2485 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2486    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2487 #define $2 innocuous_$2
2488 
2489 /* System header to define __stub macros and hopefully few prototypes,
2490     which can conflict with char $2 (); below.
2491     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2492     <limits.h> exists even on freestanding compilers.  */
2493 
2494 #ifdef __STDC__
2495 # include <limits.h>
2496 #else
2497 # include <assert.h>
2498 #endif
2499 
2500 #undef $2
2501 
2502 /* Override any GCC internal prototype to avoid an error.
2503    Use char because int might match the return type of a GCC
2504    builtin and then its argument prototype would still apply.  */
2505 #ifdef __cplusplus
2506 extern "C"
2507 #endif
2508 char $2 ();
2509 /* The GNU C library defines this for functions which it implements
2510     to always fail with ENOSYS.  Some functions are actually named
2511     something starting with __ and the normal name is an alias.  */
2512 #if defined __stub_$2 || defined __stub___$2
2513 choke me
2514 #endif
2515 
2516 int
2517 main ()
2518 {
2519 return $2 ();
2520   ;
2521   return 0;
2522 }
2523 _ACEOF
2524 if ac_fn_cxx_try_link "$LINENO"; then :
2525   eval "$3=yes"
2526 else
2527   eval "$3=no"
2528 fi
2529 rm -f core conftest.err conftest.$ac_objext \
2530     conftest$ac_exeext conftest.$ac_ext
2531 fi
2532 eval ac_res=\$$3
2533                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2534 $as_echo "$ac_res" >&6; }
2535   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2536 
2537 } # ac_fn_cxx_check_func
2538 
2539 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2540 # -------------------------------------------------------
2541 # Tests whether HEADER exists and can be compiled using the include files in
2542 # INCLUDES, setting the cache variable VAR accordingly.
2543 ac_fn_c_check_header_compile ()
2544 {
2545   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2546   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2547 $as_echo_n "checking for $2... " >&6; }
2548 if eval \${$3+:} false; then :
2549   $as_echo_n "(cached) " >&6
2550 else
2551   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2552 /* end confdefs.h.  */
2553 $4
2554 #include <$2>
2555 _ACEOF
2556 if ac_fn_c_try_compile "$LINENO"; then :
2557   eval "$3=yes"
2558 else
2559   eval "$3=no"
2560 fi
2561 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2562 fi
2563 eval ac_res=\$$3
2564                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2565 $as_echo "$ac_res" >&6; }
2566   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2567 
2568 } # ac_fn_c_check_header_compile
2569 cat >config.log <<_ACEOF
2570 This file contains any messages produced by compilers while
2571 running configure, to aid debugging if configure makes a mistake.
2572 
2573 It was created by OpenJDK $as_me jdk8, which was
2574 generated by GNU Autoconf 2.68.  Invocation command line was
2575 
2576   $ $0 $@
2577 
2578 _ACEOF
2579 exec 5>>config.log
2580 {
2581 cat <<_ASUNAME
2582 ## --------- ##
2583 ## Platform. ##
2584 ## --------- ##
2585 
2586 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2587 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2588 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2589 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2590 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2591 
2592 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2593 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2594 
2595 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2596 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2597 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2598 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2599 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2600 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2601 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2602 
2603 _ASUNAME
2604 
2605 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2606 for as_dir in $PATH
2607 do
2608   IFS=$as_save_IFS
2609   test -z "$as_dir" && as_dir=.
2610     $as_echo "PATH: $as_dir"
2611   done
2612 IFS=$as_save_IFS
2613 
2614 } >&5
2615 
2616 cat >&5 <<_ACEOF
2617 
2618 
2619 ## ----------- ##
2620 ## Core tests. ##
2621 ## ----------- ##
2622 
2623 _ACEOF
2624 
2625 
2626 # Keep a trace of the command line.
2627 # Strip out --no-create and --no-recursion so they do not pile up.
2628 # Strip out --silent because we don't want to record it for future runs.
2629 # Also quote any args containing shell meta-characters.
2630 # Make two passes to allow for proper duplicate-argument suppression.
2631 ac_configure_args=
2632 ac_configure_args0=
2633 ac_configure_args1=
2634 ac_must_keep_next=false
2635 for ac_pass in 1 2
2636 do
2637   for ac_arg
2638   do
2639     case $ac_arg in
2640     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2641     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2642     | -silent | --silent | --silen | --sile | --sil)
2643       continue ;;
2644     *\'*)
2645       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2646     esac
2647     case $ac_pass in
2648     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2649     2)
2650       as_fn_append ac_configure_args1 " '$ac_arg'"
2651       if test $ac_must_keep_next = true; then
2652         ac_must_keep_next=false # Got value, back to normal.
2653       else
2654         case $ac_arg in
2655           *=* | --config-cache | -C | -disable-* | --disable-* \
2656           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2657           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2658           | -with-* | --with-* | -without-* | --without-* | --x)
2659             case "$ac_configure_args0 " in
2660               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2661             esac
2662             ;;
2663           -* ) ac_must_keep_next=true ;;
2664         esac
2665       fi
2666       as_fn_append ac_configure_args " '$ac_arg'"
2667       ;;
2668     esac
2669   done
2670 done
2671 { ac_configure_args0=; unset ac_configure_args0;}
2672 { ac_configure_args1=; unset ac_configure_args1;}
2673 
2674 # When interrupted or exit'd, cleanup temporary files, and complete
2675 # config.log.  We remove comments because anyway the quotes in there
2676 # would cause problems or look ugly.
2677 # WARNING: Use '\'' to represent an apostrophe within the trap.
2678 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2679 trap 'exit_status=$?
2680   # Save into config.log some information that might help in debugging.
2681   {
2682     echo
2683 
2684     $as_echo "## ---------------- ##
2685 ## Cache variables. ##
2686 ## ---------------- ##"
2687     echo
2688     # The following way of writing the cache mishandles newlines in values,
2689 (
2690   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2691     eval ac_val=\$$ac_var
2692     case $ac_val in #(
2693     *${as_nl}*)
2694       case $ac_var in #(
2695       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2696 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2697       esac
2698       case $ac_var in #(
2699       _ | IFS | as_nl) ;; #(
2700       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2701       *) { eval $ac_var=; unset $ac_var;} ;;
2702       esac ;;
2703     esac
2704   done
2705   (set) 2>&1 |
2706     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2707     *${as_nl}ac_space=\ *)
2708       sed -n \
2709         "s/'\''/'\''\\\\'\'''\''/g;
2710           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2711       ;; #(
2712     *)
2713       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2714       ;;
2715     esac |
2716     sort
2717 )
2718     echo
2719 
2720     $as_echo "## ----------------- ##
2721 ## Output variables. ##
2722 ## ----------------- ##"
2723     echo
2724     for ac_var in $ac_subst_vars
2725     do
2726       eval ac_val=\$$ac_var
2727       case $ac_val in
2728       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2729       esac
2730       $as_echo "$ac_var='\''$ac_val'\''"
2731     done | sort
2732     echo
2733 
2734     if test -n "$ac_subst_files"; then
2735       $as_echo "## ------------------- ##
2736 ## File substitutions. ##
2737 ## ------------------- ##"
2738       echo
2739       for ac_var in $ac_subst_files
2740       do
2741         eval ac_val=\$$ac_var
2742         case $ac_val in
2743         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2744         esac
2745         $as_echo "$ac_var='\''$ac_val'\''"
2746       done | sort
2747       echo
2748     fi
2749 
2750     if test -s confdefs.h; then
2751       $as_echo "## ----------- ##
2752 ## confdefs.h. ##
2753 ## ----------- ##"
2754       echo
2755       cat confdefs.h
2756       echo
2757     fi
2758     test "$ac_signal" != 0 &&
2759       $as_echo "$as_me: caught signal $ac_signal"
2760     $as_echo "$as_me: exit $exit_status"
2761   } >&5
2762   rm -f core *.core core.conftest.* &&
2763     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2764     exit $exit_status
2765 ' 0
2766 for ac_signal in 1 2 13 15; do
2767   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2768 done
2769 ac_signal=0
2770 
2771 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2772 rm -f -r conftest* confdefs.h
2773 
2774 $as_echo "/* confdefs.h */" > confdefs.h
2775 
2776 # Predefined preprocessor variables.
2777 
2778 cat >>confdefs.h <<_ACEOF
2779 #define PACKAGE_NAME "$PACKAGE_NAME"
2780 _ACEOF
2781 
2782 cat >>confdefs.h <<_ACEOF
2783 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2784 _ACEOF
2785 
2786 cat >>confdefs.h <<_ACEOF
2787 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2788 _ACEOF
2789 
2790 cat >>confdefs.h <<_ACEOF
2791 #define PACKAGE_STRING "$PACKAGE_STRING"
2792 _ACEOF
2793 
2794 cat >>confdefs.h <<_ACEOF
2795 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2796 _ACEOF
2797 
2798 cat >>confdefs.h <<_ACEOF
2799 #define PACKAGE_URL "$PACKAGE_URL"
2800 _ACEOF
2801 
2802 
2803 # Let the site file select an alternate cache file if it wants to.
2804 # Prefer an explicitly selected file to automatically selected ones.
2805 ac_site_file1=NONE
2806 ac_site_file2=NONE
2807 if test -n "$CONFIG_SITE"; then
2808   # We do not want a PATH search for config.site.
2809   case $CONFIG_SITE in #((
2810     -*)  ac_site_file1=./$CONFIG_SITE;;
2811     */*) ac_site_file1=$CONFIG_SITE;;
2812     *)   ac_site_file1=./$CONFIG_SITE;;
2813   esac
2814 elif test "x$prefix" != xNONE; then
2815   ac_site_file1=$prefix/share/config.site
2816   ac_site_file2=$prefix/etc/config.site
2817 else
2818   ac_site_file1=$ac_default_prefix/share/config.site
2819   ac_site_file2=$ac_default_prefix/etc/config.site
2820 fi
2821 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2822 do
2823   test "x$ac_site_file" = xNONE && continue
2824   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2825     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2826 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2827     sed 's/^/| /' "$ac_site_file" >&5
2828     . "$ac_site_file" \
2829       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2830 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2831 as_fn_error $? "failed to load site script $ac_site_file
2832 See \`config.log' for more details" "$LINENO" 5; }
2833   fi
2834 done
2835 
2836 if test -r "$cache_file"; then
2837   # Some versions of bash will fail to source /dev/null (special files
2838   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2839   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2840     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2841 $as_echo "$as_me: loading cache $cache_file" >&6;}
2842     case $cache_file in
2843       [\\/]* | ?:[\\/]* ) . "$cache_file";;
2844       *)                      . "./$cache_file";;
2845     esac
2846   fi
2847 else
2848   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2849 $as_echo "$as_me: creating cache $cache_file" >&6;}
2850   >$cache_file
2851 fi
2852 
2853 # Check that the precious variables saved in the cache have kept the same
2854 # value.
2855 ac_cache_corrupted=false
2856 for ac_var in $ac_precious_vars; do
2857   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2858   eval ac_new_set=\$ac_env_${ac_var}_set
2859   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2860   eval ac_new_val=\$ac_env_${ac_var}_value
2861   case $ac_old_set,$ac_new_set in
2862     set,)
2863       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2864 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2865       ac_cache_corrupted=: ;;
2866     ,set)
2867       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2868 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2869       ac_cache_corrupted=: ;;
2870     ,);;
2871     *)
2872       if test "x$ac_old_val" != "x$ac_new_val"; then
2873         # differences in whitespace do not lead to failure.
2874         ac_old_val_w=`echo x $ac_old_val`
2875         ac_new_val_w=`echo x $ac_new_val`
2876         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2877           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2878 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2879           ac_cache_corrupted=:
2880         else
2881           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2882 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2883           eval $ac_var=\$ac_old_val
2884         fi
2885         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2886 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2887         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2888 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2889       fi;;
2890   esac
2891   # Pass precious variables to config.status.
2892   if test "$ac_new_set" = set; then
2893     case $ac_new_val in
2894     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2895     *) ac_arg=$ac_var=$ac_new_val ;;
2896     esac
2897     case " $ac_configure_args " in
2898       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2899       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2900     esac
2901   fi
2902 done
2903 if $ac_cache_corrupted; then
2904   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2905 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2906   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2907 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2908   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2909 fi
2910 ## -------------------- ##
2911 ## Main body of script. ##
2912 ## -------------------- ##
2913 
2914 ac_ext=c
2915 ac_cpp='$CPP $CPPFLAGS'
2916 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2917 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2918 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2919 
2920 
2921 
2922 ac_aux_dir=
2923 for ac_dir in build-aux "$srcdir"/build-aux; do
2924   if test -f "$ac_dir/install-sh"; then
2925     ac_aux_dir=$ac_dir
2926     ac_install_sh="$ac_aux_dir/install-sh -c"
2927     break
2928   elif test -f "$ac_dir/install.sh"; then
2929     ac_aux_dir=$ac_dir
2930     ac_install_sh="$ac_aux_dir/install.sh -c"
2931     break
2932   elif test -f "$ac_dir/shtool"; then
2933     ac_aux_dir=$ac_dir
2934     ac_install_sh="$ac_aux_dir/shtool install -c"
2935     break
2936   fi
2937 done
2938 if test -z "$ac_aux_dir"; then
2939   as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
2940 fi
2941 
2942 # These three variables are undocumented and unsupported,
2943 # and are intended to be withdrawn in a future Autoconf release.
2944 # They can cause serious problems if a builder's source tree is in a directory
2945 # whose full name contains unusual characters.
2946 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2947 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2948 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2949 
2950 
2951 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
2952 
2953 #
2954 # Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
2955 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2956 #
2957 # This code is free software; you can redistribute it and/or modify it
2958 # under the terms of the GNU General Public License version 2 only, as
2959 # published by the Free Software Foundation.  Oracle designates this
2960 # particular file as subject to the "Classpath" exception as provided
2961 # by Oracle in the LICENSE file that accompanied this code.
2962 #
2963 # This code is distributed in the hope that it will be useful, but WITHOUT
2964 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2965 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
2966 # version 2 for more details (a copy is included in the LICENSE file that
2967 # accompanied this code).
2968 #
2969 # You should have received a copy of the GNU General Public License version
2970 # 2 along with this work; if not, write to the Free Software Foundation,
2971 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2972 #
2973 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2974 # or visit www.oracle.com if you need additional information or have any
2975 # questions.
2976 #
2977 
2978 #
2979 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
2980 #
2981 # This program is free software; you can redistribute it and/or modify
2982 # it under the terms of the GNU General Public License as published by
2983 # the Free Software Foundation; either version 2 of the License, or
2984 # (at your option) any later version.
2985 #
2986 # This program is distributed in the hope that it will be useful, but
2987 # WITHOUT ANY WARRANTY; without even the implied warranty of
2988 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
2989 # General Public License for more details.
2990 #
2991 # You should have received a copy of the GNU General Public License
2992 # along with this program; if not, write to the Free Software
2993 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2994 #
2995 # As a special exception to the GNU General Public License, if you
2996 # distribute this file as part of a program that contains a
2997 # configuration script generated by Autoconf, you may include it under
2998 # the same distribution terms that you use for the rest of that program.
2999 
3000 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
3001 # ----------------------------------
3002 # PKG_PROG_PKG_CONFIG
3003 
3004 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3005 #
3006 # Check to see whether a particular set of modules exists.  Similar
3007 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
3008 #
3009 #
3010 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
3011 # this or PKG_CHECK_MODULES is called, or make sure to call
3012 # PKG_CHECK_EXISTS manually
3013 # --------------------------------------------------------------
3014 
3015 
3016 
3017 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3018 # ---------------------------------------------
3019 # _PKG_CONFIG
3020 
3021 # _PKG_SHORT_ERRORS_SUPPORTED
3022 # -----------------------------
3023 # _PKG_SHORT_ERRORS_SUPPORTED
3024 
3025 
3026 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3027 # [ACTION-IF-NOT-FOUND])
3028 #
3029 #
3030 # Note that if there is a possibility the first call to
3031 # PKG_CHECK_MODULES might not happen, you should be sure to include an
3032 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3033 #
3034 #
3035 # --------------------------------------------------------------
3036 # PKG_CHECK_MODULES
3037 
3038 
3039 # Include these first...
3040 #
3041 # Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3042 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3043 #
3044 # This code is free software; you can redistribute it and/or modify it
3045 # under the terms of the GNU General Public License version 2 only, as
3046 # published by the Free Software Foundation.  Oracle designates this
3047 # particular file as subject to the "Classpath" exception as provided
3048 # by Oracle in the LICENSE file that accompanied this code.
3049 #
3050 # This code is distributed in the hope that it will be useful, but WITHOUT
3051 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3052 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3053 # version 2 for more details (a copy is included in the LICENSE file that
3054 # accompanied this code).
3055 #
3056 # You should have received a copy of the GNU General Public License version
3057 # 2 along with this work; if not, write to the Free Software Foundation,
3058 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3059 #
3060 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3061 # or visit www.oracle.com if you need additional information or have any
3062 # questions.
3063 #
3064 
3065 
3066 
3067 # This will make sure the given variable points to a full and proper
3068 # path. This means:
3069 # 1) There will be no spaces in the path. On posix platforms,
3070 #    spaces in the path will result in an error. On Windows,
3071 #    the path will be rewritten using short-style to be space-free.
3072 # 2) The path will be absolute, and it will be in unix-style (on
3073 #     cygwin).
3074 # $1: The name of the variable to fix
3075 
3076 
3077 # This will make sure the given variable points to a executable
3078 # with a full and proper path. This means:
3079 # 1) There will be no spaces in the path. On posix platforms,
3080 #    spaces in the path will result in an error. On Windows,
3081 #    the path will be rewritten using short-style to be space-free.
3082 # 2) The path will be absolute, and it will be in unix-style (on
3083 #     cygwin).
3084 # Any arguments given to the executable is preserved.
3085 # If the input variable does not have a directory specification, then
3086 # it need to be in the PATH.
3087 # $1: The name of the variable to fix
3088 
3089 
3090 
3091 
3092 
3093 
3094 # Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3095 # $1: variable to check
3096 # $2: executable name to print in warning (optional)
3097 
3098 
3099 # Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
3100 # Arguments as AC_PATH_PROG:
3101 # $1: variable to set
3102 # $2: executable name to look for
3103 
3104 
3105 # Setup the most fundamental tools that relies on not much else to set up,
3106 # but is used by much of the early bootstrap code.
3107 
3108 
3109 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3110 
3111 
3112 
3113 
3114 
3115 
3116 
3117 #%%% Simple tools %%%
3118 
3119 # Check if we have found a usable version of make
3120 # $1: the path to a potential make binary (or empty)
3121 # $2: the description on how we found this
3122 
3123 
3124 # Goes looking for a usable version of GNU make.
3125 
3126 
3127 
3128 
3129 
3130 
3131 # Check if build directory is on local disk. If not possible to determine,
3132 # we prefer to claim it's local.
3133 # Argument 1: directory to test
3134 # Argument 2: what to do if it is on local disk
3135 # Argument 3: what to do otherwise (remote disk or failure)
3136 
3137 
3138 # Check that source files have basic read permissions set. This might
3139 # not be the case in cygwin in certain conditions.
3140 
3141 
3142 
3143 
3144 #
3145 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3146 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3147 #
3148 # This code is free software; you can redistribute it and/or modify it
3149 # under the terms of the GNU General Public License version 2 only, as
3150 # published by the Free Software Foundation.  Oracle designates this
3151 # particular file as subject to the "Classpath" exception as provided
3152 # by Oracle in the LICENSE file that accompanied this code.
3153 #
3154 # This code is distributed in the hope that it will be useful, but WITHOUT
3155 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3156 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3157 # version 2 for more details (a copy is included in the LICENSE file that
3158 # accompanied this code).
3159 #
3160 # You should have received a copy of the GNU General Public License version
3161 # 2 along with this work; if not, write to the Free Software Foundation,
3162 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3163 #
3164 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3165 # or visit www.oracle.com if you need additional information or have any
3166 # questions.
3167 #
3168 
3169 
3170 
3171 
3172 
3173 # Helper function which possibly converts a path using DOS-style short mode.
3174 # If so, the updated path is stored in $new_path.
3175 # $1: The path to check
3176 
3177 
3178 # Helper function which possibly converts a path using DOS-style short mode.
3179 # If so, the updated path is stored in $new_path.
3180 # $1: The path to check
3181 
3182 
3183 # FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3184 # and could probably be heavily simplified. However, all changes in this
3185 # area tend to need lot of testing in different scenarios, and in lack of
3186 # proper unit testing, cleaning this up has not been deemed worth the effort
3187 # at the moment.
3188 
3189 
3190 
3191 
3192 
3193 
3194 
3195 
3196 
3197 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3198 
3199 
3200 
3201 
3202 #
3203 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3204 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3205 #
3206 # This code is free software; you can redistribute it and/or modify it
3207 # under the terms of the GNU General Public License version 2 only, as
3208 # published by the Free Software Foundation.  Oracle designates this
3209 # particular file as subject to the "Classpath" exception as provided
3210 # by Oracle in the LICENSE file that accompanied this code.
3211 #
3212 # This code is distributed in the hope that it will be useful, but WITHOUT
3213 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3214 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3215 # version 2 for more details (a copy is included in the LICENSE file that
3216 # accompanied this code).
3217 #
3218 # You should have received a copy of the GNU General Public License version
3219 # 2 along with this work; if not, write to the Free Software Foundation,
3220 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3221 #
3222 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3223 # or visit www.oracle.com if you need additional information or have any
3224 # questions.
3225 #
3226 
3227 
3228 
3229 
3230 
3231 
3232 
3233 
3234 
3235 
3236 
3237 # ... then the rest
3238 #
3239 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3240 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3241 #
3242 # This code is free software; you can redistribute it and/or modify it
3243 # under the terms of the GNU General Public License version 2 only, as
3244 # published by the Free Software Foundation.  Oracle designates this
3245 # particular file as subject to the "Classpath" exception as provided
3246 # by Oracle in the LICENSE file that accompanied this code.
3247 #
3248 # This code is distributed in the hope that it will be useful, but WITHOUT
3249 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3250 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3251 # version 2 for more details (a copy is included in the LICENSE file that
3252 # accompanied this code).
3253 #
3254 # You should have received a copy of the GNU General Public License version
3255 # 2 along with this work; if not, write to the Free Software Foundation,
3256 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3257 #
3258 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3259 # or visit www.oracle.com if you need additional information or have any
3260 # questions.
3261 #
3262 
3263 # Execute the check given as argument, and verify the result
3264 # If the Boot JDK was previously found, do nothing
3265 # $1 A command line (typically autoconf macro) to execute
3266 
3267 
3268 # Test: Is bootjdk explicitely set by command line arguments?
3269 
3270 
3271 # Test: Is bootjdk available from builddeps?
3272 
3273 
3274 # Test: Is $JAVA_HOME set?
3275 
3276 
3277 # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3278 
3279 
3280 # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3281 
3282 
3283 # Look for a jdk in the given path. If there are multiple, try to select the newest.
3284 # If found, set BOOT_JDK and BOOT_JDK_FOUND.
3285 # $1 = Path to directory containing jdk installations.
3286 # $2 = String to append to the found JDK directory to get the proper JDK home
3287 
3288 
3289 # Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3290 # environmental variable as base for where to look.
3291 # $1 Name of an environmal variable, assumed to point to the Program Files directory.
3292 
3293 
3294 # Test: Is there a JDK installed in default, well-known locations?
3295 
3296 
3297 # Check that a command-line tool in the Boot JDK is correct
3298 # $1 = name of variable to assign
3299 # $2 = name of binary
3300 
3301 
3302 ###############################################################################
3303 #
3304 # We need a Boot JDK to bootstrap the build.
3305 #
3306 
3307 
3308 
3309 
3310 
3311 #
3312 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3313 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3314 #
3315 # This code is free software; you can redistribute it and/or modify it
3316 # under the terms of the GNU General Public License version 2 only, as
3317 # published by the Free Software Foundation.  Oracle designates this
3318 # particular file as subject to the "Classpath" exception as provided
3319 # by Oracle in the LICENSE file that accompanied this code.
3320 #
3321 # This code is distributed in the hope that it will be useful, but WITHOUT
3322 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3323 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3324 # version 2 for more details (a copy is included in the LICENSE file that
3325 # accompanied this code).
3326 #
3327 # You should have received a copy of the GNU General Public License version
3328 # 2 along with this work; if not, write to the Free Software Foundation,
3329 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3330 #
3331 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3332 # or visit www.oracle.com if you need additional information or have any
3333 # questions.
3334 #
3335 
3336 
3337 
3338 
3339 
3340 
3341 
3342 
3343 
3344 
3345 
3346 
3347 
3348 
3349 
3350 
3351 
3352 
3353 
3354 
3355 #
3356 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3357 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3358 #
3359 # This code is free software; you can redistribute it and/or modify it
3360 # under the terms of the GNU General Public License version 2 only, as
3361 # published by the Free Software Foundation.  Oracle designates this
3362 # particular file as subject to the "Classpath" exception as provided
3363 # by Oracle in the LICENSE file that accompanied this code.
3364 #
3365 # This code is distributed in the hope that it will be useful, but WITHOUT
3366 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3367 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3368 # version 2 for more details (a copy is included in the LICENSE file that
3369 # accompanied this code).
3370 #
3371 # You should have received a copy of the GNU General Public License version
3372 # 2 along with this work; if not, write to the Free Software Foundation,
3373 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3374 #
3375 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3376 # or visit www.oracle.com if you need additional information or have any
3377 # questions.
3378 #
3379 
3380 
3381 
3382 
3383 
3384 cygwin_help() {
3385     case $1 in
3386     unzip)
3387         PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;;
3388     zip)
3389         PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;;
3390     make)
3391         PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;;
3392     * )
3393        break ;;
3394     esac
3395 }
3396 
3397 apt_help() {
3398     case $1 in
3399     devkit)
3400         PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3401     openjdk)
3402         PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3403     alsa)
3404         PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3405     cups)
3406         PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3407     freetype2)
3408         PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3409     pulse)
3410         PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3411     x11)
3412         PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev" ;;
3413     ccache)
3414         PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3415     * )
3416        break ;;
3417     esac
3418 }
3419 
3420 yum_help() {
3421     case $1 in
3422     devkit)
3423         PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3424     openjdk)
3425         PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3426     alsa)
3427         PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3428     cups)
3429         PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3430     freetype2)
3431         PKGHANDLER_COMMAND="sudo yum install freetype2-devel" ;;
3432     pulse)
3433         PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3434     x11)
3435         PKGHANDLER_COMMAND="sudo yum install libXtst-devel" ;;
3436     ccache)
3437         PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3438     * )
3439        break ;;
3440     esac
3441 }
3442 
3443 port_help() {
3444     PKGHANDLER_COMMAND=""
3445 }
3446 
3447 pkgutil_help() {
3448     PKGHANDLER_COMMAND=""
3449 }
3450 
3451 pkgadd_help() {
3452     PKGHANDLER_COMMAND=""
3453 }
3454 
3455 
3456 
3457 #
3458 # Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3459 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3460 #
3461 # This code is free software; you can redistribute it and/or modify it
3462 # under the terms of the GNU General Public License version 2 only, as
3463 # published by the Free Software Foundation.  Oracle designates this
3464 # particular file as subject to the "Classpath" exception as provided
3465 # by Oracle in the LICENSE file that accompanied this code.
3466 #
3467 # This code is distributed in the hope that it will be useful, but WITHOUT
3468 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3469 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3470 # version 2 for more details (a copy is included in the LICENSE file that
3471 # accompanied this code).
3472 #
3473 # You should have received a copy of the GNU General Public License version
3474 # 2 along with this work; if not, write to the Free Software Foundation,
3475 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3476 #
3477 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3478 # or visit www.oracle.com if you need additional information or have any
3479 # questions.
3480 #
3481 
3482 
3483 
3484 
3485 
3486 
3487 
3488 
3489 ###############################################################################
3490 #
3491 # Should we build only OpenJDK even if closed sources are present?
3492 #
3493 
3494 
3495 
3496 
3497 ###############################################################################
3498 #
3499 # Setup version numbers
3500 #
3501 
3502 
3503 
3504 
3505 
3506 
3507 # Support for customization of the build process. Some build files
3508 # will include counterparts from this location, if they exist. This allows
3509 # for a degree of customization of the build targets and the rules/recipes
3510 # to create them
3511 
3512 # Check whether --with-custom-make-dir was given.
3513 if test "${with_custom_make_dir+set}" = set; then :
3514   withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3515 fi
3516 
3517 
3518 
3519 #
3520 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3521 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3522 #
3523 # This code is free software; you can redistribute it and/or modify it
3524 # under the terms of the GNU General Public License version 2 only, as
3525 # published by the Free Software Foundation.  Oracle designates this
3526 # particular file as subject to the "Classpath" exception as provided
3527 # by Oracle in the LICENSE file that accompanied this code.
3528 #
3529 # This code is distributed in the hope that it will be useful, but WITHOUT
3530 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3531 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3532 # version 2 for more details (a copy is included in the LICENSE file that
3533 # accompanied this code).
3534 #
3535 # You should have received a copy of the GNU General Public License version
3536 # 2 along with this work; if not, write to the Free Software Foundation,
3537 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3538 #
3539 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3540 # or visit www.oracle.com if you need additional information or have any
3541 # questions.
3542 #
3543 
3544 
3545 
3546 
3547 
3548 
3549 
3550 
3551 
3552 
3553 
3554 
3555 
3556 
3557 
3558 #
3559 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3560 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3561 #
3562 # This code is free software; you can redistribute it and/or modify it
3563 # under the terms of the GNU General Public License version 2 only, as
3564 # published by the Free Software Foundation.  Oracle designates this
3565 # particular file as subject to the "Classpath" exception as provided
3566 # by Oracle in the LICENSE file that accompanied this code.
3567 #
3568 # This code is distributed in the hope that it will be useful, but WITHOUT
3569 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3570 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3571 # version 2 for more details (a copy is included in the LICENSE file that
3572 # accompanied this code).
3573 #
3574 # You should have received a copy of the GNU General Public License version
3575 # 2 along with this work; if not, write to the Free Software Foundation,
3576 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3577 #
3578 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3579 # or visit www.oracle.com if you need additional information or have any
3580 # questions.
3581 #
3582 
3583 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3584 # Converts autoconf style CPU name to OpenJDK style, into
3585 # VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3586 
3587 
3588 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3589 # Converts autoconf style OS name to OpenJDK style, into
3590 # VAR_OS and VAR_OS_API.
3591 
3592 
3593 # Expects $host_os $host_cpu $build_os and $build_cpu
3594 # and $with_target_bits to have been setup!
3595 #
3596 # Translate the standard triplet(quadruplet) definition
3597 # of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3598 # OPENJDK_BUILD_OS, etc.
3599 
3600 
3601 # Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3602 # accordingly. Must be done after setting up build and target system, but before
3603 # doing anything else with these values.
3604 
3605 
3606     # Setup the legacy variables, for controlling the old makefiles.
3607     #
3608 
3609 
3610 
3611 
3612 #%%% Build and target systems %%%
3613 
3614 
3615 
3616 
3617 # Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3618 # Add -mX to various FLAGS variables.
3619 
3620 
3621 
3622 
3623 
3624 
3625 #
3626 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3627 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3628 #
3629 # This code is free software; you can redistribute it and/or modify it
3630 # under the terms of the GNU General Public License version 2 only, as
3631 # published by the Free Software Foundation.  Oracle designates this
3632 # particular file as subject to the "Classpath" exception as provided
3633 # by Oracle in the LICENSE file that accompanied this code.
3634 #
3635 # This code is distributed in the hope that it will be useful, but WITHOUT
3636 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3637 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3638 # version 2 for more details (a copy is included in the LICENSE file that
3639 # accompanied this code).
3640 #
3641 # You should have received a copy of the GNU General Public License version
3642 # 2 along with this work; if not, write to the Free Software Foundation,
3643 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3644 #
3645 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3646 # or visit www.oracle.com if you need additional information or have any
3647 # questions.
3648 #
3649 
3650 
3651 
3652 
3653 
3654 
3655 
3656 
3657 #
3658 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3659 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3660 #
3661 # This code is free software; you can redistribute it and/or modify it
3662 # under the terms of the GNU General Public License version 2 only, as
3663 # published by the Free Software Foundation.  Oracle designates this
3664 # particular file as subject to the "Classpath" exception as provided
3665 # by Oracle in the LICENSE file that accompanied this code.
3666 #
3667 # This code is distributed in the hope that it will be useful, but WITHOUT
3668 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3669 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3670 # version 2 for more details (a copy is included in the LICENSE file that
3671 # accompanied this code).
3672 #
3673 # You should have received a copy of the GNU General Public License version
3674 # 2 along with this work; if not, write to the Free Software Foundation,
3675 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3676 #
3677 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3678 # or visit www.oracle.com if you need additional information or have any
3679 # questions.
3680 #
3681 
3682 # $1 = compiler to test (CC or CXX)
3683 # $2 = human readable name of compiler (C or C++)
3684 
3685 
3686 
3687 
3688 
3689 # $1 = compiler to test (CC or CXX)
3690 # $2 = human readable name of compiler (C or C++)
3691 # $3 = list of compiler names to search for
3692 
3693 
3694 
3695 
3696 
3697 
3698 
3699 
3700 
3701 
3702 
3703 
3704 #
3705 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3706 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3707 #
3708 # This code is free software; you can redistribute it and/or modify it
3709 # under the terms of the GNU General Public License version 2 only, as
3710 # published by the Free Software Foundation.  Oracle designates this
3711 # particular file as subject to the "Classpath" exception as provided
3712 # by Oracle in the LICENSE file that accompanied this code.
3713 #
3714 # This code is distributed in the hope that it will be useful, but WITHOUT
3715 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3716 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3717 # version 2 for more details (a copy is included in the LICENSE file that
3718 # accompanied this code).
3719 #
3720 # You should have received a copy of the GNU General Public License version
3721 # 2 along with this work; if not, write to the Free Software Foundation,
3722 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3723 #
3724 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3725 # or visit www.oracle.com if you need additional information or have any
3726 # questions.
3727 #
3728 
3729 
3730 
3731 
3732 
3733 
3734 
3735 # Check if the VS env variables were setup prior to running configure.
3736 # If not, then find vcvarsall.bat and run it automatically, and integrate
3737 # the set env variables into the spec file.
3738 
3739 
3740 
3741 # Setup the DXSDK paths
3742 
3743 
3744 
3745 
3746 
3747 
3748 # This line needs to be here, verbatim, after all includes and the dummy hook
3749 # definitions. It is replaced with custom functionality when building
3750 # custom sources.
3751 #CUSTOM_AUTOCONF_INCLUDE
3752 
3753 # Do not change or remove the following line, it is needed for consistency checks:
3754 DATE_WHEN_GENERATED=1363150186
3755 
3756 ###############################################################################
3757 #
3758 # Initialization / Boot-strapping
3759 #
3760 # The bootstrapping process needs to solve the "chicken or the egg" problem,
3761 # thus it jumps back and forth, each time gaining something needed later on.
3762 #
3763 ###############################################################################
3764 
3765 # Basic initialization that must happen first of all
3766 
3767 # Save the original command line. This is passed to us by the wrapper configure script.
3768 
3769 DATE_WHEN_CONFIGURED=`LANG=C date`
3770 
3771 { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3772 $as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3773 { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3774 $as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3775 
3776 
3777 
3778 # Start with tools that do not need have cross compilation support
3779 # and can be expected to be found in the default PATH. These tools are
3780 # used by configure. Nor are these tools expected to be found in the
3781 # devkit from the builddeps server either, since they are
3782 # needed to download the devkit.
3783 
3784 # First are all the simple required tools.
3785 
3786     for ac_prog in basename
3787 do
3788   # Extract the first word of "$ac_prog", so it can be a program name with args.
3789 set dummy $ac_prog; ac_word=$2
3790 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3791 $as_echo_n "checking for $ac_word... " >&6; }
3792 if ${ac_cv_path_BASENAME+:} false; then :
3793   $as_echo_n "(cached) " >&6
3794 else
3795   case $BASENAME in
3796   [\\/]* | ?:[\\/]*)
3797   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3798   ;;
3799   *)
3800   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3801 for as_dir in $PATH
3802 do
3803   IFS=$as_save_IFS
3804   test -z "$as_dir" && as_dir=.
3805     for ac_exec_ext in '' $ac_executable_extensions; do
3806   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3807     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3808     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3809     break 2
3810   fi
3811 done
3812   done
3813 IFS=$as_save_IFS
3814 
3815   ;;
3816 esac
3817 fi
3818 BASENAME=$ac_cv_path_BASENAME
3819 if test -n "$BASENAME"; then
3820   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
3821 $as_echo "$BASENAME" >&6; }
3822 else
3823   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3824 $as_echo "no" >&6; }
3825 fi
3826 
3827 
3828   test -n "$BASENAME" && break
3829 done
3830 
3831 
3832     if test "x$BASENAME" = x; then
3833         if test "xbasename" = x; then
3834           PROG_NAME=basename
3835         else
3836           PROG_NAME=basename
3837         fi
3838         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3839 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3840         as_fn_error $? "Cannot continue" "$LINENO" 5
3841     fi
3842 
3843 
3844 
3845     for ac_prog in bash
3846 do
3847   # Extract the first word of "$ac_prog", so it can be a program name with args.
3848 set dummy $ac_prog; ac_word=$2
3849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3850 $as_echo_n "checking for $ac_word... " >&6; }
3851 if ${ac_cv_path_BASH+:} false; then :
3852   $as_echo_n "(cached) " >&6
3853 else
3854   case $BASH in
3855   [\\/]* | ?:[\\/]*)
3856   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3857   ;;
3858   *)
3859   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3860 for as_dir in $PATH
3861 do
3862   IFS=$as_save_IFS
3863   test -z "$as_dir" && as_dir=.
3864     for ac_exec_ext in '' $ac_executable_extensions; do
3865   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3866     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3867     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3868     break 2
3869   fi
3870 done
3871   done
3872 IFS=$as_save_IFS
3873 
3874   ;;
3875 esac
3876 fi
3877 BASH=$ac_cv_path_BASH
3878 if test -n "$BASH"; then
3879   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
3880 $as_echo "$BASH" >&6; }
3881 else
3882   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3883 $as_echo "no" >&6; }
3884 fi
3885 
3886 
3887   test -n "$BASH" && break
3888 done
3889 
3890 
3891     if test "x$BASH" = x; then
3892         if test "xbash" = x; then
3893           PROG_NAME=bash
3894         else
3895           PROG_NAME=bash
3896         fi
3897         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3898 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3899         as_fn_error $? "Cannot continue" "$LINENO" 5
3900     fi
3901 
3902 
3903 
3904     for ac_prog in cat
3905 do
3906   # Extract the first word of "$ac_prog", so it can be a program name with args.
3907 set dummy $ac_prog; ac_word=$2
3908 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3909 $as_echo_n "checking for $ac_word... " >&6; }
3910 if ${ac_cv_path_CAT+:} false; then :
3911   $as_echo_n "(cached) " >&6
3912 else
3913   case $CAT in
3914   [\\/]* | ?:[\\/]*)
3915   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
3916   ;;
3917   *)
3918   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3919 for as_dir in $PATH
3920 do
3921   IFS=$as_save_IFS
3922   test -z "$as_dir" && as_dir=.
3923     for ac_exec_ext in '' $ac_executable_extensions; do
3924   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3925     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
3926     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3927     break 2
3928   fi
3929 done
3930   done
3931 IFS=$as_save_IFS
3932 
3933   ;;
3934 esac
3935 fi
3936 CAT=$ac_cv_path_CAT
3937 if test -n "$CAT"; then
3938   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
3939 $as_echo "$CAT" >&6; }
3940 else
3941   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3942 $as_echo "no" >&6; }
3943 fi
3944 
3945 
3946   test -n "$CAT" && break
3947 done
3948 
3949 
3950     if test "x$CAT" = x; then
3951         if test "xcat" = x; then
3952           PROG_NAME=cat
3953         else
3954           PROG_NAME=cat
3955         fi
3956         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3957 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3958         as_fn_error $? "Cannot continue" "$LINENO" 5
3959     fi
3960 
3961 
3962 
3963     for ac_prog in chmod
3964 do
3965   # Extract the first word of "$ac_prog", so it can be a program name with args.
3966 set dummy $ac_prog; ac_word=$2
3967 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3968 $as_echo_n "checking for $ac_word... " >&6; }
3969 if ${ac_cv_path_CHMOD+:} false; then :
3970   $as_echo_n "(cached) " >&6
3971 else
3972   case $CHMOD in
3973   [\\/]* | ?:[\\/]*)
3974   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
3975   ;;
3976   *)
3977   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3978 for as_dir in $PATH
3979 do
3980   IFS=$as_save_IFS
3981   test -z "$as_dir" && as_dir=.
3982     for ac_exec_ext in '' $ac_executable_extensions; do
3983   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3984     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
3985     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3986     break 2
3987   fi
3988 done
3989   done
3990 IFS=$as_save_IFS
3991 
3992   ;;
3993 esac
3994 fi
3995 CHMOD=$ac_cv_path_CHMOD
3996 if test -n "$CHMOD"; then
3997   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
3998 $as_echo "$CHMOD" >&6; }
3999 else
4000   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4001 $as_echo "no" >&6; }
4002 fi
4003 
4004 
4005   test -n "$CHMOD" && break
4006 done
4007 
4008 
4009     if test "x$CHMOD" = x; then
4010         if test "xchmod" = x; then
4011           PROG_NAME=chmod
4012         else
4013           PROG_NAME=chmod
4014         fi
4015         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4016 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4017         as_fn_error $? "Cannot continue" "$LINENO" 5
4018     fi
4019 
4020 
4021 
4022     for ac_prog in cmp
4023 do
4024   # Extract the first word of "$ac_prog", so it can be a program name with args.
4025 set dummy $ac_prog; ac_word=$2
4026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4027 $as_echo_n "checking for $ac_word... " >&6; }
4028 if ${ac_cv_path_CMP+:} false; then :
4029   $as_echo_n "(cached) " >&6
4030 else
4031   case $CMP in
4032   [\\/]* | ?:[\\/]*)
4033   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
4034   ;;
4035   *)
4036   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4037 for as_dir in $PATH
4038 do
4039   IFS=$as_save_IFS
4040   test -z "$as_dir" && as_dir=.
4041     for ac_exec_ext in '' $ac_executable_extensions; do
4042   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4043     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
4044     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4045     break 2
4046   fi
4047 done
4048   done
4049 IFS=$as_save_IFS
4050 
4051   ;;
4052 esac
4053 fi
4054 CMP=$ac_cv_path_CMP
4055 if test -n "$CMP"; then
4056   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
4057 $as_echo "$CMP" >&6; }
4058 else
4059   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4060 $as_echo "no" >&6; }
4061 fi
4062 
4063 
4064   test -n "$CMP" && break
4065 done
4066 
4067 
4068     if test "x$CMP" = x; then
4069         if test "xcmp" = x; then
4070           PROG_NAME=cmp
4071         else
4072           PROG_NAME=cmp
4073         fi
4074         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4075 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4076         as_fn_error $? "Cannot continue" "$LINENO" 5
4077     fi
4078 
4079 
4080 
4081     for ac_prog in comm
4082 do
4083   # Extract the first word of "$ac_prog", so it can be a program name with args.
4084 set dummy $ac_prog; ac_word=$2
4085 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4086 $as_echo_n "checking for $ac_word... " >&6; }
4087 if ${ac_cv_path_COMM+:} false; then :
4088   $as_echo_n "(cached) " >&6
4089 else
4090   case $COMM in
4091   [\\/]* | ?:[\\/]*)
4092   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
4093   ;;
4094   *)
4095   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4096 for as_dir in $PATH
4097 do
4098   IFS=$as_save_IFS
4099   test -z "$as_dir" && as_dir=.
4100     for ac_exec_ext in '' $ac_executable_extensions; do
4101   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4102     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
4103     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4104     break 2
4105   fi
4106 done
4107   done
4108 IFS=$as_save_IFS
4109 
4110   ;;
4111 esac
4112 fi
4113 COMM=$ac_cv_path_COMM
4114 if test -n "$COMM"; then
4115   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
4116 $as_echo "$COMM" >&6; }
4117 else
4118   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4119 $as_echo "no" >&6; }
4120 fi
4121 
4122 
4123   test -n "$COMM" && break
4124 done
4125 
4126 
4127     if test "x$COMM" = x; then
4128         if test "xcomm" = x; then
4129           PROG_NAME=comm
4130         else
4131           PROG_NAME=comm
4132         fi
4133         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4134 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4135         as_fn_error $? "Cannot continue" "$LINENO" 5
4136     fi
4137 
4138 
4139 
4140     for ac_prog in cp
4141 do
4142   # Extract the first word of "$ac_prog", so it can be a program name with args.
4143 set dummy $ac_prog; ac_word=$2
4144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4145 $as_echo_n "checking for $ac_word... " >&6; }
4146 if ${ac_cv_path_CP+:} false; then :
4147   $as_echo_n "(cached) " >&6
4148 else
4149   case $CP in
4150   [\\/]* | ?:[\\/]*)
4151   ac_cv_path_CP="$CP" # Let the user override the test with a path.
4152   ;;
4153   *)
4154   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4155 for as_dir in $PATH
4156 do
4157   IFS=$as_save_IFS
4158   test -z "$as_dir" && as_dir=.
4159     for ac_exec_ext in '' $ac_executable_extensions; do
4160   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4161     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4162     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4163     break 2
4164   fi
4165 done
4166   done
4167 IFS=$as_save_IFS
4168 
4169   ;;
4170 esac
4171 fi
4172 CP=$ac_cv_path_CP
4173 if test -n "$CP"; then
4174   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4175 $as_echo "$CP" >&6; }
4176 else
4177   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4178 $as_echo "no" >&6; }
4179 fi
4180 
4181 
4182   test -n "$CP" && break
4183 done
4184 
4185 
4186     if test "x$CP" = x; then
4187         if test "xcp" = x; then
4188           PROG_NAME=cp
4189         else
4190           PROG_NAME=cp
4191         fi
4192         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4193 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4194         as_fn_error $? "Cannot continue" "$LINENO" 5
4195     fi
4196 
4197 
4198 
4199     for ac_prog in cpio
4200 do
4201   # Extract the first word of "$ac_prog", so it can be a program name with args.
4202 set dummy $ac_prog; ac_word=$2
4203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4204 $as_echo_n "checking for $ac_word... " >&6; }
4205 if ${ac_cv_path_CPIO+:} false; then :
4206   $as_echo_n "(cached) " >&6
4207 else
4208   case $CPIO in
4209   [\\/]* | ?:[\\/]*)
4210   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
4211   ;;
4212   *)
4213   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4214 for as_dir in $PATH
4215 do
4216   IFS=$as_save_IFS
4217   test -z "$as_dir" && as_dir=.
4218     for ac_exec_ext in '' $ac_executable_extensions; do
4219   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4220     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
4221     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4222     break 2
4223   fi
4224 done
4225   done
4226 IFS=$as_save_IFS
4227 
4228   ;;
4229 esac
4230 fi
4231 CPIO=$ac_cv_path_CPIO
4232 if test -n "$CPIO"; then
4233   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
4234 $as_echo "$CPIO" >&6; }
4235 else
4236   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4237 $as_echo "no" >&6; }
4238 fi
4239 
4240 
4241   test -n "$CPIO" && break
4242 done
4243 
4244 
4245     if test "x$CPIO" = x; then
4246         if test "xcpio" = x; then
4247           PROG_NAME=cpio
4248         else
4249           PROG_NAME=cpio
4250         fi
4251         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4252 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4253         as_fn_error $? "Cannot continue" "$LINENO" 5
4254     fi
4255 
4256 
4257 
4258     for ac_prog in cut
4259 do
4260   # Extract the first word of "$ac_prog", so it can be a program name with args.
4261 set dummy $ac_prog; ac_word=$2
4262 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4263 $as_echo_n "checking for $ac_word... " >&6; }
4264 if ${ac_cv_path_CUT+:} false; then :
4265   $as_echo_n "(cached) " >&6
4266 else
4267   case $CUT in
4268   [\\/]* | ?:[\\/]*)
4269   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4270   ;;
4271   *)
4272   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4273 for as_dir in $PATH
4274 do
4275   IFS=$as_save_IFS
4276   test -z "$as_dir" && as_dir=.
4277     for ac_exec_ext in '' $ac_executable_extensions; do
4278   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4279     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4280     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4281     break 2
4282   fi
4283 done
4284   done
4285 IFS=$as_save_IFS
4286 
4287   ;;
4288 esac
4289 fi
4290 CUT=$ac_cv_path_CUT
4291 if test -n "$CUT"; then
4292   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4293 $as_echo "$CUT" >&6; }
4294 else
4295   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4296 $as_echo "no" >&6; }
4297 fi
4298 
4299 
4300   test -n "$CUT" && break
4301 done
4302 
4303 
4304     if test "x$CUT" = x; then
4305         if test "xcut" = x; then
4306           PROG_NAME=cut
4307         else
4308           PROG_NAME=cut
4309         fi
4310         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4311 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4312         as_fn_error $? "Cannot continue" "$LINENO" 5
4313     fi
4314 
4315 
4316 
4317     for ac_prog in date
4318 do
4319   # Extract the first word of "$ac_prog", so it can be a program name with args.
4320 set dummy $ac_prog; ac_word=$2
4321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4322 $as_echo_n "checking for $ac_word... " >&6; }
4323 if ${ac_cv_path_DATE+:} false; then :
4324   $as_echo_n "(cached) " >&6
4325 else
4326   case $DATE in
4327   [\\/]* | ?:[\\/]*)
4328   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4329   ;;
4330   *)
4331   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4332 for as_dir in $PATH
4333 do
4334   IFS=$as_save_IFS
4335   test -z "$as_dir" && as_dir=.
4336     for ac_exec_ext in '' $ac_executable_extensions; do
4337   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4338     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4339     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4340     break 2
4341   fi
4342 done
4343   done
4344 IFS=$as_save_IFS
4345 
4346   ;;
4347 esac
4348 fi
4349 DATE=$ac_cv_path_DATE
4350 if test -n "$DATE"; then
4351   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4352 $as_echo "$DATE" >&6; }
4353 else
4354   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4355 $as_echo "no" >&6; }
4356 fi
4357 
4358 
4359   test -n "$DATE" && break
4360 done
4361 
4362 
4363     if test "x$DATE" = x; then
4364         if test "xdate" = x; then
4365           PROG_NAME=date
4366         else
4367           PROG_NAME=date
4368         fi
4369         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4370 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4371         as_fn_error $? "Cannot continue" "$LINENO" 5
4372     fi
4373 
4374 
4375 
4376     for ac_prog in gdiff diff
4377 do
4378   # Extract the first word of "$ac_prog", so it can be a program name with args.
4379 set dummy $ac_prog; ac_word=$2
4380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4381 $as_echo_n "checking for $ac_word... " >&6; }
4382 if ${ac_cv_path_DIFF+:} false; then :
4383   $as_echo_n "(cached) " >&6
4384 else
4385   case $DIFF in
4386   [\\/]* | ?:[\\/]*)
4387   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4388   ;;
4389   *)
4390   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4391 for as_dir in $PATH
4392 do
4393   IFS=$as_save_IFS
4394   test -z "$as_dir" && as_dir=.
4395     for ac_exec_ext in '' $ac_executable_extensions; do
4396   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4397     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4398     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4399     break 2
4400   fi
4401 done
4402   done
4403 IFS=$as_save_IFS
4404 
4405   ;;
4406 esac
4407 fi
4408 DIFF=$ac_cv_path_DIFF
4409 if test -n "$DIFF"; then
4410   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4411 $as_echo "$DIFF" >&6; }
4412 else
4413   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4414 $as_echo "no" >&6; }
4415 fi
4416 
4417 
4418   test -n "$DIFF" && break
4419 done
4420 
4421 
4422     if test "x$DIFF" = x; then
4423         if test "xgdiff diff" = x; then
4424           PROG_NAME=diff
4425         else
4426           PROG_NAME=gdiff diff
4427         fi
4428         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4429 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4430         as_fn_error $? "Cannot continue" "$LINENO" 5
4431     fi
4432 
4433 
4434 
4435     for ac_prog in dirname
4436 do
4437   # Extract the first word of "$ac_prog", so it can be a program name with args.
4438 set dummy $ac_prog; ac_word=$2
4439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4440 $as_echo_n "checking for $ac_word... " >&6; }
4441 if ${ac_cv_path_DIRNAME+:} false; then :
4442   $as_echo_n "(cached) " >&6
4443 else
4444   case $DIRNAME in
4445   [\\/]* | ?:[\\/]*)
4446   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
4447   ;;
4448   *)
4449   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4450 for as_dir in $PATH
4451 do
4452   IFS=$as_save_IFS
4453   test -z "$as_dir" && as_dir=.
4454     for ac_exec_ext in '' $ac_executable_extensions; do
4455   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4456     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
4457     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4458     break 2
4459   fi
4460 done
4461   done
4462 IFS=$as_save_IFS
4463 
4464   ;;
4465 esac
4466 fi
4467 DIRNAME=$ac_cv_path_DIRNAME
4468 if test -n "$DIRNAME"; then
4469   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
4470 $as_echo "$DIRNAME" >&6; }
4471 else
4472   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4473 $as_echo "no" >&6; }
4474 fi
4475 
4476 
4477   test -n "$DIRNAME" && break
4478 done
4479 
4480 
4481     if test "x$DIRNAME" = x; then
4482         if test "xdirname" = x; then
4483           PROG_NAME=dirname
4484         else
4485           PROG_NAME=dirname
4486         fi
4487         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4488 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4489         as_fn_error $? "Cannot continue" "$LINENO" 5
4490     fi
4491 
4492 
4493 
4494     for ac_prog in echo
4495 do
4496   # Extract the first word of "$ac_prog", so it can be a program name with args.
4497 set dummy $ac_prog; ac_word=$2
4498 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4499 $as_echo_n "checking for $ac_word... " >&6; }
4500 if ${ac_cv_path_ECHO+:} false; then :
4501   $as_echo_n "(cached) " >&6
4502 else
4503   case $ECHO in
4504   [\\/]* | ?:[\\/]*)
4505   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4506   ;;
4507   *)
4508   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4509 for as_dir in $PATH
4510 do
4511   IFS=$as_save_IFS
4512   test -z "$as_dir" && as_dir=.
4513     for ac_exec_ext in '' $ac_executable_extensions; do
4514   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4515     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4516     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4517     break 2
4518   fi
4519 done
4520   done
4521 IFS=$as_save_IFS
4522 
4523   ;;
4524 esac
4525 fi
4526 ECHO=$ac_cv_path_ECHO
4527 if test -n "$ECHO"; then
4528   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4529 $as_echo "$ECHO" >&6; }
4530 else
4531   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4532 $as_echo "no" >&6; }
4533 fi
4534 
4535 
4536   test -n "$ECHO" && break
4537 done
4538 
4539 
4540     if test "x$ECHO" = x; then
4541         if test "xecho" = x; then
4542           PROG_NAME=echo
4543         else
4544           PROG_NAME=echo
4545         fi
4546         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4547 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4548         as_fn_error $? "Cannot continue" "$LINENO" 5
4549     fi
4550 
4551 
4552 
4553     for ac_prog in expr
4554 do
4555   # Extract the first word of "$ac_prog", so it can be a program name with args.
4556 set dummy $ac_prog; ac_word=$2
4557 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4558 $as_echo_n "checking for $ac_word... " >&6; }
4559 if ${ac_cv_path_EXPR+:} false; then :
4560   $as_echo_n "(cached) " >&6
4561 else
4562   case $EXPR in
4563   [\\/]* | ?:[\\/]*)
4564   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
4565   ;;
4566   *)
4567   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4568 for as_dir in $PATH
4569 do
4570   IFS=$as_save_IFS
4571   test -z "$as_dir" && as_dir=.
4572     for ac_exec_ext in '' $ac_executable_extensions; do
4573   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4574     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
4575     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4576     break 2
4577   fi
4578 done
4579   done
4580 IFS=$as_save_IFS
4581 
4582   ;;
4583 esac
4584 fi
4585 EXPR=$ac_cv_path_EXPR
4586 if test -n "$EXPR"; then
4587   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
4588 $as_echo "$EXPR" >&6; }
4589 else
4590   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4591 $as_echo "no" >&6; }
4592 fi
4593 
4594 
4595   test -n "$EXPR" && break
4596 done
4597 
4598 
4599     if test "x$EXPR" = x; then
4600         if test "xexpr" = x; then
4601           PROG_NAME=expr
4602         else
4603           PROG_NAME=expr
4604         fi
4605         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4606 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4607         as_fn_error $? "Cannot continue" "$LINENO" 5
4608     fi
4609 
4610 
4611 
4612     for ac_prog in file
4613 do
4614   # Extract the first word of "$ac_prog", so it can be a program name with args.
4615 set dummy $ac_prog; ac_word=$2
4616 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4617 $as_echo_n "checking for $ac_word... " >&6; }
4618 if ${ac_cv_path_FILE+:} false; then :
4619   $as_echo_n "(cached) " >&6
4620 else
4621   case $FILE in
4622   [\\/]* | ?:[\\/]*)
4623   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
4624   ;;
4625   *)
4626   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4627 for as_dir in $PATH
4628 do
4629   IFS=$as_save_IFS
4630   test -z "$as_dir" && as_dir=.
4631     for ac_exec_ext in '' $ac_executable_extensions; do
4632   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4633     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
4634     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4635     break 2
4636   fi
4637 done
4638   done
4639 IFS=$as_save_IFS
4640 
4641   ;;
4642 esac
4643 fi
4644 FILE=$ac_cv_path_FILE
4645 if test -n "$FILE"; then
4646   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
4647 $as_echo "$FILE" >&6; }
4648 else
4649   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4650 $as_echo "no" >&6; }
4651 fi
4652 
4653 
4654   test -n "$FILE" && break
4655 done
4656 
4657 
4658     if test "x$FILE" = x; then
4659         if test "xfile" = x; then
4660           PROG_NAME=file
4661         else
4662           PROG_NAME=file
4663         fi
4664         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4665 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4666         as_fn_error $? "Cannot continue" "$LINENO" 5
4667     fi
4668 
4669 
4670 
4671     for ac_prog in find
4672 do
4673   # Extract the first word of "$ac_prog", so it can be a program name with args.
4674 set dummy $ac_prog; ac_word=$2
4675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4676 $as_echo_n "checking for $ac_word... " >&6; }
4677 if ${ac_cv_path_FIND+:} false; then :
4678   $as_echo_n "(cached) " >&6
4679 else
4680   case $FIND in
4681   [\\/]* | ?:[\\/]*)
4682   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
4683   ;;
4684   *)
4685   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4686 for as_dir in $PATH
4687 do
4688   IFS=$as_save_IFS
4689   test -z "$as_dir" && as_dir=.
4690     for ac_exec_ext in '' $ac_executable_extensions; do
4691   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4692     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
4693     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4694     break 2
4695   fi
4696 done
4697   done
4698 IFS=$as_save_IFS
4699 
4700   ;;
4701 esac
4702 fi
4703 FIND=$ac_cv_path_FIND
4704 if test -n "$FIND"; then
4705   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
4706 $as_echo "$FIND" >&6; }
4707 else
4708   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4709 $as_echo "no" >&6; }
4710 fi
4711 
4712 
4713   test -n "$FIND" && break
4714 done
4715 
4716 
4717     if test "x$FIND" = x; then
4718         if test "xfind" = x; then
4719           PROG_NAME=find
4720         else
4721           PROG_NAME=find
4722         fi
4723         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4724 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4725         as_fn_error $? "Cannot continue" "$LINENO" 5
4726     fi
4727 
4728 
4729 
4730     for ac_prog in head
4731 do
4732   # Extract the first word of "$ac_prog", so it can be a program name with args.
4733 set dummy $ac_prog; ac_word=$2
4734 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4735 $as_echo_n "checking for $ac_word... " >&6; }
4736 if ${ac_cv_path_HEAD+:} false; then :
4737   $as_echo_n "(cached) " >&6
4738 else
4739   case $HEAD in
4740   [\\/]* | ?:[\\/]*)
4741   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
4742   ;;
4743   *)
4744   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4745 for as_dir in $PATH
4746 do
4747   IFS=$as_save_IFS
4748   test -z "$as_dir" && as_dir=.
4749     for ac_exec_ext in '' $ac_executable_extensions; do
4750   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4751     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
4752     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4753     break 2
4754   fi
4755 done
4756   done
4757 IFS=$as_save_IFS
4758 
4759   ;;
4760 esac
4761 fi
4762 HEAD=$ac_cv_path_HEAD
4763 if test -n "$HEAD"; then
4764   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
4765 $as_echo "$HEAD" >&6; }
4766 else
4767   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4768 $as_echo "no" >&6; }
4769 fi
4770 
4771 
4772   test -n "$HEAD" && break
4773 done
4774 
4775 
4776     if test "x$HEAD" = x; then
4777         if test "xhead" = x; then
4778           PROG_NAME=head
4779         else
4780           PROG_NAME=head
4781         fi
4782         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4783 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4784         as_fn_error $? "Cannot continue" "$LINENO" 5
4785     fi
4786 
4787 
4788 
4789     for ac_prog in ln
4790 do
4791   # Extract the first word of "$ac_prog", so it can be a program name with args.
4792 set dummy $ac_prog; ac_word=$2
4793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4794 $as_echo_n "checking for $ac_word... " >&6; }
4795 if ${ac_cv_path_LN+:} false; then :
4796   $as_echo_n "(cached) " >&6
4797 else
4798   case $LN in
4799   [\\/]* | ?:[\\/]*)
4800   ac_cv_path_LN="$LN" # Let the user override the test with a path.
4801   ;;
4802   *)
4803   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4804 for as_dir in $PATH
4805 do
4806   IFS=$as_save_IFS
4807   test -z "$as_dir" && as_dir=.
4808     for ac_exec_ext in '' $ac_executable_extensions; do
4809   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4810     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4811     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4812     break 2
4813   fi
4814 done
4815   done
4816 IFS=$as_save_IFS
4817 
4818   ;;
4819 esac
4820 fi
4821 LN=$ac_cv_path_LN
4822 if test -n "$LN"; then
4823   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4824 $as_echo "$LN" >&6; }
4825 else
4826   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4827 $as_echo "no" >&6; }
4828 fi
4829 
4830 
4831   test -n "$LN" && break
4832 done
4833 
4834 
4835     if test "x$LN" = x; then
4836         if test "xln" = x; then
4837           PROG_NAME=ln
4838         else
4839           PROG_NAME=ln
4840         fi
4841         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4842 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4843         as_fn_error $? "Cannot continue" "$LINENO" 5
4844     fi
4845 
4846 
4847 
4848     for ac_prog in ls
4849 do
4850   # Extract the first word of "$ac_prog", so it can be a program name with args.
4851 set dummy $ac_prog; ac_word=$2
4852 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4853 $as_echo_n "checking for $ac_word... " >&6; }
4854 if ${ac_cv_path_LS+:} false; then :
4855   $as_echo_n "(cached) " >&6
4856 else
4857   case $LS in
4858   [\\/]* | ?:[\\/]*)
4859   ac_cv_path_LS="$LS" # Let the user override the test with a path.
4860   ;;
4861   *)
4862   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4863 for as_dir in $PATH
4864 do
4865   IFS=$as_save_IFS
4866   test -z "$as_dir" && as_dir=.
4867     for ac_exec_ext in '' $ac_executable_extensions; do
4868   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4869     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4870     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4871     break 2
4872   fi
4873 done
4874   done
4875 IFS=$as_save_IFS
4876 
4877   ;;
4878 esac
4879 fi
4880 LS=$ac_cv_path_LS
4881 if test -n "$LS"; then
4882   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
4883 $as_echo "$LS" >&6; }
4884 else
4885   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4886 $as_echo "no" >&6; }
4887 fi
4888 
4889 
4890   test -n "$LS" && break
4891 done
4892 
4893 
4894     if test "x$LS" = x; then
4895         if test "xls" = x; then
4896           PROG_NAME=ls
4897         else
4898           PROG_NAME=ls
4899         fi
4900         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4901 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4902         as_fn_error $? "Cannot continue" "$LINENO" 5
4903     fi
4904 
4905 
4906 
4907     for ac_prog in mkdir
4908 do
4909   # Extract the first word of "$ac_prog", so it can be a program name with args.
4910 set dummy $ac_prog; ac_word=$2
4911 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4912 $as_echo_n "checking for $ac_word... " >&6; }
4913 if ${ac_cv_path_MKDIR+:} false; then :
4914   $as_echo_n "(cached) " >&6
4915 else
4916   case $MKDIR in
4917   [\\/]* | ?:[\\/]*)
4918   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
4919   ;;
4920   *)
4921   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4922 for as_dir in $PATH
4923 do
4924   IFS=$as_save_IFS
4925   test -z "$as_dir" && as_dir=.
4926     for ac_exec_ext in '' $ac_executable_extensions; do
4927   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4928     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
4929     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4930     break 2
4931   fi
4932 done
4933   done
4934 IFS=$as_save_IFS
4935 
4936   ;;
4937 esac
4938 fi
4939 MKDIR=$ac_cv_path_MKDIR
4940 if test -n "$MKDIR"; then
4941   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
4942 $as_echo "$MKDIR" >&6; }
4943 else
4944   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4945 $as_echo "no" >&6; }
4946 fi
4947 
4948 
4949   test -n "$MKDIR" && break
4950 done
4951 
4952 
4953     if test "x$MKDIR" = x; then
4954         if test "xmkdir" = x; then
4955           PROG_NAME=mkdir
4956         else
4957           PROG_NAME=mkdir
4958         fi
4959         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4960 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4961         as_fn_error $? "Cannot continue" "$LINENO" 5
4962     fi
4963 
4964 
4965 
4966     for ac_prog in mktemp
4967 do
4968   # Extract the first word of "$ac_prog", so it can be a program name with args.
4969 set dummy $ac_prog; ac_word=$2
4970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4971 $as_echo_n "checking for $ac_word... " >&6; }
4972 if ${ac_cv_path_MKTEMP+:} false; then :
4973   $as_echo_n "(cached) " >&6
4974 else
4975   case $MKTEMP in
4976   [\\/]* | ?:[\\/]*)
4977   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
4978   ;;
4979   *)
4980   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4981 for as_dir in $PATH
4982 do
4983   IFS=$as_save_IFS
4984   test -z "$as_dir" && as_dir=.
4985     for ac_exec_ext in '' $ac_executable_extensions; do
4986   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4987     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
4988     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4989     break 2
4990   fi
4991 done
4992   done
4993 IFS=$as_save_IFS
4994 
4995   ;;
4996 esac
4997 fi
4998 MKTEMP=$ac_cv_path_MKTEMP
4999 if test -n "$MKTEMP"; then
5000   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
5001 $as_echo "$MKTEMP" >&6; }
5002 else
5003   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5004 $as_echo "no" >&6; }
5005 fi
5006 
5007 
5008   test -n "$MKTEMP" && break
5009 done
5010 
5011 
5012     if test "x$MKTEMP" = x; then
5013         if test "xmktemp" = x; then
5014           PROG_NAME=mktemp
5015         else
5016           PROG_NAME=mktemp
5017         fi
5018         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5019 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5020         as_fn_error $? "Cannot continue" "$LINENO" 5
5021     fi
5022 
5023 
5024 
5025     for ac_prog in mv
5026 do
5027   # Extract the first word of "$ac_prog", so it can be a program name with args.
5028 set dummy $ac_prog; ac_word=$2
5029 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5030 $as_echo_n "checking for $ac_word... " >&6; }
5031 if ${ac_cv_path_MV+:} false; then :
5032   $as_echo_n "(cached) " >&6
5033 else
5034   case $MV in
5035   [\\/]* | ?:[\\/]*)
5036   ac_cv_path_MV="$MV" # Let the user override the test with a path.
5037   ;;
5038   *)
5039   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5040 for as_dir in $PATH
5041 do
5042   IFS=$as_save_IFS
5043   test -z "$as_dir" && as_dir=.
5044     for ac_exec_ext in '' $ac_executable_extensions; do
5045   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5046     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
5047     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5048     break 2
5049   fi
5050 done
5051   done
5052 IFS=$as_save_IFS
5053 
5054   ;;
5055 esac
5056 fi
5057 MV=$ac_cv_path_MV
5058 if test -n "$MV"; then
5059   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
5060 $as_echo "$MV" >&6; }
5061 else
5062   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5063 $as_echo "no" >&6; }
5064 fi
5065 
5066 
5067   test -n "$MV" && break
5068 done
5069 
5070 
5071     if test "x$MV" = x; then
5072         if test "xmv" = x; then
5073           PROG_NAME=mv
5074         else
5075           PROG_NAME=mv
5076         fi
5077         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5078 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5079         as_fn_error $? "Cannot continue" "$LINENO" 5
5080     fi
5081 
5082 
5083 
5084     for ac_prog in printf
5085 do
5086   # Extract the first word of "$ac_prog", so it can be a program name with args.
5087 set dummy $ac_prog; ac_word=$2
5088 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5089 $as_echo_n "checking for $ac_word... " >&6; }
5090 if ${ac_cv_path_PRINTF+:} false; then :
5091   $as_echo_n "(cached) " >&6
5092 else
5093   case $PRINTF in
5094   [\\/]* | ?:[\\/]*)
5095   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
5096   ;;
5097   *)
5098   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5099 for as_dir in $PATH
5100 do
5101   IFS=$as_save_IFS
5102   test -z "$as_dir" && as_dir=.
5103     for ac_exec_ext in '' $ac_executable_extensions; do
5104   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5105     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
5106     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5107     break 2
5108   fi
5109 done
5110   done
5111 IFS=$as_save_IFS
5112 
5113   ;;
5114 esac
5115 fi
5116 PRINTF=$ac_cv_path_PRINTF
5117 if test -n "$PRINTF"; then
5118   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
5119 $as_echo "$PRINTF" >&6; }
5120 else
5121   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5122 $as_echo "no" >&6; }
5123 fi
5124 
5125 
5126   test -n "$PRINTF" && break
5127 done
5128 
5129 
5130     if test "x$PRINTF" = x; then
5131         if test "xprintf" = x; then
5132           PROG_NAME=printf
5133         else
5134           PROG_NAME=printf
5135         fi
5136         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5137 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5138         as_fn_error $? "Cannot continue" "$LINENO" 5
5139     fi
5140 
5141 
5142 
5143     for ac_prog in pwd
5144 do
5145   # Extract the first word of "$ac_prog", so it can be a program name with args.
5146 set dummy $ac_prog; ac_word=$2
5147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5148 $as_echo_n "checking for $ac_word... " >&6; }
5149 if ${ac_cv_path_THEPWDCMD+:} false; then :
5150   $as_echo_n "(cached) " >&6
5151 else
5152   case $THEPWDCMD in
5153   [\\/]* | ?:[\\/]*)
5154   ac_cv_path_THEPWDCMD="$THEPWDCMD" # Let the user override the test with a path.
5155   ;;
5156   *)
5157   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5158 for as_dir in $PATH
5159 do
5160   IFS=$as_save_IFS
5161   test -z "$as_dir" && as_dir=.
5162     for ac_exec_ext in '' $ac_executable_extensions; do
5163   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5164     ac_cv_path_THEPWDCMD="$as_dir/$ac_word$ac_exec_ext"
5165     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5166     break 2
5167   fi
5168 done
5169   done
5170 IFS=$as_save_IFS
5171 
5172   ;;
5173 esac
5174 fi
5175 THEPWDCMD=$ac_cv_path_THEPWDCMD
5176 if test -n "$THEPWDCMD"; then
5177   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $THEPWDCMD" >&5
5178 $as_echo "$THEPWDCMD" >&6; }
5179 else
5180   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5181 $as_echo "no" >&6; }
5182 fi
5183 
5184 
5185   test -n "$THEPWDCMD" && break
5186 done
5187 
5188 
5189     if test "x$THEPWDCMD" = x; then
5190         if test "xpwd" = x; then
5191           PROG_NAME=thepwdcmd
5192         else
5193           PROG_NAME=pwd
5194         fi
5195         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5196 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5197         as_fn_error $? "Cannot continue" "$LINENO" 5
5198     fi
5199 
5200 
5201 
5202     for ac_prog in rm
5203 do
5204   # Extract the first word of "$ac_prog", so it can be a program name with args.
5205 set dummy $ac_prog; ac_word=$2
5206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5207 $as_echo_n "checking for $ac_word... " >&6; }
5208 if ${ac_cv_path_RM+:} false; then :
5209   $as_echo_n "(cached) " >&6
5210 else
5211   case $RM in
5212   [\\/]* | ?:[\\/]*)
5213   ac_cv_path_RM="$RM" # Let the user override the test with a path.
5214   ;;
5215   *)
5216   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5217 for as_dir in $PATH
5218 do
5219   IFS=$as_save_IFS
5220   test -z "$as_dir" && as_dir=.
5221     for ac_exec_ext in '' $ac_executable_extensions; do
5222   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5223     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
5224     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5225     break 2
5226   fi
5227 done
5228   done
5229 IFS=$as_save_IFS
5230 
5231   ;;
5232 esac
5233 fi
5234 RM=$ac_cv_path_RM
5235 if test -n "$RM"; then
5236   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
5237 $as_echo "$RM" >&6; }
5238 else
5239   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5240 $as_echo "no" >&6; }
5241 fi
5242 
5243 
5244   test -n "$RM" && break
5245 done
5246 
5247 
5248     if test "x$RM" = x; then
5249         if test "xrm" = x; then
5250           PROG_NAME=rm
5251         else
5252           PROG_NAME=rm
5253         fi
5254         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5255 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5256         as_fn_error $? "Cannot continue" "$LINENO" 5
5257     fi
5258 
5259 
5260 
5261     for ac_prog in sh
5262 do
5263   # Extract the first word of "$ac_prog", so it can be a program name with args.
5264 set dummy $ac_prog; ac_word=$2
5265 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5266 $as_echo_n "checking for $ac_word... " >&6; }
5267 if ${ac_cv_path_SH+:} false; then :
5268   $as_echo_n "(cached) " >&6
5269 else
5270   case $SH in
5271   [\\/]* | ?:[\\/]*)
5272   ac_cv_path_SH="$SH" # Let the user override the test with a path.
5273   ;;
5274   *)
5275   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5276 for as_dir in $PATH
5277 do
5278   IFS=$as_save_IFS
5279   test -z "$as_dir" && as_dir=.
5280     for ac_exec_ext in '' $ac_executable_extensions; do
5281   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5282     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5283     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5284     break 2
5285   fi
5286 done
5287   done
5288 IFS=$as_save_IFS
5289 
5290   ;;
5291 esac
5292 fi
5293 SH=$ac_cv_path_SH
5294 if test -n "$SH"; then
5295   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5296 $as_echo "$SH" >&6; }
5297 else
5298   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5299 $as_echo "no" >&6; }
5300 fi
5301 
5302 
5303   test -n "$SH" && break
5304 done
5305 
5306 
5307     if test "x$SH" = x; then
5308         if test "xsh" = x; then
5309           PROG_NAME=sh
5310         else
5311           PROG_NAME=sh
5312         fi
5313         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5314 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5315         as_fn_error $? "Cannot continue" "$LINENO" 5
5316     fi
5317 
5318 
5319 
5320     for ac_prog in sort
5321 do
5322   # Extract the first word of "$ac_prog", so it can be a program name with args.
5323 set dummy $ac_prog; ac_word=$2
5324 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5325 $as_echo_n "checking for $ac_word... " >&6; }
5326 if ${ac_cv_path_SORT+:} false; then :
5327   $as_echo_n "(cached) " >&6
5328 else
5329   case $SORT in
5330   [\\/]* | ?:[\\/]*)
5331   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
5332   ;;
5333   *)
5334   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5335 for as_dir in $PATH
5336 do
5337   IFS=$as_save_IFS
5338   test -z "$as_dir" && as_dir=.
5339     for ac_exec_ext in '' $ac_executable_extensions; do
5340   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5341     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
5342     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5343     break 2
5344   fi
5345 done
5346   done
5347 IFS=$as_save_IFS
5348 
5349   ;;
5350 esac
5351 fi
5352 SORT=$ac_cv_path_SORT
5353 if test -n "$SORT"; then
5354   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5355 $as_echo "$SORT" >&6; }
5356 else
5357   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5358 $as_echo "no" >&6; }
5359 fi
5360 
5361 
5362   test -n "$SORT" && break
5363 done
5364 
5365 
5366     if test "x$SORT" = x; then
5367         if test "xsort" = x; then
5368           PROG_NAME=sort
5369         else
5370           PROG_NAME=sort
5371         fi
5372         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5373 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5374         as_fn_error $? "Cannot continue" "$LINENO" 5
5375     fi
5376 
5377 
5378 
5379     for ac_prog in tail
5380 do
5381   # Extract the first word of "$ac_prog", so it can be a program name with args.
5382 set dummy $ac_prog; ac_word=$2
5383 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5384 $as_echo_n "checking for $ac_word... " >&6; }
5385 if ${ac_cv_path_TAIL+:} false; then :
5386   $as_echo_n "(cached) " >&6
5387 else
5388   case $TAIL in
5389   [\\/]* | ?:[\\/]*)
5390   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5391   ;;
5392   *)
5393   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5394 for as_dir in $PATH
5395 do
5396   IFS=$as_save_IFS
5397   test -z "$as_dir" && as_dir=.
5398     for ac_exec_ext in '' $ac_executable_extensions; do
5399   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5400     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5401     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5402     break 2
5403   fi
5404 done
5405   done
5406 IFS=$as_save_IFS
5407 
5408   ;;
5409 esac
5410 fi
5411 TAIL=$ac_cv_path_TAIL
5412 if test -n "$TAIL"; then
5413   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5414 $as_echo "$TAIL" >&6; }
5415 else
5416   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5417 $as_echo "no" >&6; }
5418 fi
5419 
5420 
5421   test -n "$TAIL" && break
5422 done
5423 
5424 
5425     if test "x$TAIL" = x; then
5426         if test "xtail" = x; then
5427           PROG_NAME=tail
5428         else
5429           PROG_NAME=tail
5430         fi
5431         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5432 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5433         as_fn_error $? "Cannot continue" "$LINENO" 5
5434     fi
5435 
5436 
5437 
5438     for ac_prog in tar
5439 do
5440   # Extract the first word of "$ac_prog", so it can be a program name with args.
5441 set dummy $ac_prog; ac_word=$2
5442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5443 $as_echo_n "checking for $ac_word... " >&6; }
5444 if ${ac_cv_path_TAR+:} false; then :
5445   $as_echo_n "(cached) " >&6
5446 else
5447   case $TAR in
5448   [\\/]* | ?:[\\/]*)
5449   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5450   ;;
5451   *)
5452   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5453 for as_dir in $PATH
5454 do
5455   IFS=$as_save_IFS
5456   test -z "$as_dir" && as_dir=.
5457     for ac_exec_ext in '' $ac_executable_extensions; do
5458   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5459     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5460     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5461     break 2
5462   fi
5463 done
5464   done
5465 IFS=$as_save_IFS
5466 
5467   ;;
5468 esac
5469 fi
5470 TAR=$ac_cv_path_TAR
5471 if test -n "$TAR"; then
5472   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5473 $as_echo "$TAR" >&6; }
5474 else
5475   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5476 $as_echo "no" >&6; }
5477 fi
5478 
5479 
5480   test -n "$TAR" && break
5481 done
5482 
5483 
5484     if test "x$TAR" = x; then
5485         if test "xtar" = x; then
5486           PROG_NAME=tar
5487         else
5488           PROG_NAME=tar
5489         fi
5490         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5491 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5492         as_fn_error $? "Cannot continue" "$LINENO" 5
5493     fi
5494 
5495 
5496 
5497     for ac_prog in tee
5498 do
5499   # Extract the first word of "$ac_prog", so it can be a program name with args.
5500 set dummy $ac_prog; ac_word=$2
5501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5502 $as_echo_n "checking for $ac_word... " >&6; }
5503 if ${ac_cv_path_TEE+:} false; then :
5504   $as_echo_n "(cached) " >&6
5505 else
5506   case $TEE in
5507   [\\/]* | ?:[\\/]*)
5508   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5509   ;;
5510   *)
5511   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5512 for as_dir in $PATH
5513 do
5514   IFS=$as_save_IFS
5515   test -z "$as_dir" && as_dir=.
5516     for ac_exec_ext in '' $ac_executable_extensions; do
5517   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5518     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5519     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5520     break 2
5521   fi
5522 done
5523   done
5524 IFS=$as_save_IFS
5525 
5526   ;;
5527 esac
5528 fi
5529 TEE=$ac_cv_path_TEE
5530 if test -n "$TEE"; then
5531   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5532 $as_echo "$TEE" >&6; }
5533 else
5534   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5535 $as_echo "no" >&6; }
5536 fi
5537 
5538 
5539   test -n "$TEE" && break
5540 done
5541 
5542 
5543     if test "x$TEE" = x; then
5544         if test "xtee" = x; then
5545           PROG_NAME=tee
5546         else
5547           PROG_NAME=tee
5548         fi
5549         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5550 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5551         as_fn_error $? "Cannot continue" "$LINENO" 5
5552     fi
5553 
5554 
5555 
5556     for ac_prog in touch
5557 do
5558   # Extract the first word of "$ac_prog", so it can be a program name with args.
5559 set dummy $ac_prog; ac_word=$2
5560 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5561 $as_echo_n "checking for $ac_word... " >&6; }
5562 if ${ac_cv_path_TOUCH+:} false; then :
5563   $as_echo_n "(cached) " >&6
5564 else
5565   case $TOUCH in
5566   [\\/]* | ?:[\\/]*)
5567   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5568   ;;
5569   *)
5570   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5571 for as_dir in $PATH
5572 do
5573   IFS=$as_save_IFS
5574   test -z "$as_dir" && as_dir=.
5575     for ac_exec_ext in '' $ac_executable_extensions; do
5576   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5577     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5578     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5579     break 2
5580   fi
5581 done
5582   done
5583 IFS=$as_save_IFS
5584 
5585   ;;
5586 esac
5587 fi
5588 TOUCH=$ac_cv_path_TOUCH
5589 if test -n "$TOUCH"; then
5590   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5591 $as_echo "$TOUCH" >&6; }
5592 else
5593   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5594 $as_echo "no" >&6; }
5595 fi
5596 
5597 
5598   test -n "$TOUCH" && break
5599 done
5600 
5601 
5602     if test "x$TOUCH" = x; then
5603         if test "xtouch" = x; then
5604           PROG_NAME=touch
5605         else
5606           PROG_NAME=touch
5607         fi
5608         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5609 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5610         as_fn_error $? "Cannot continue" "$LINENO" 5
5611     fi
5612 
5613 
5614 
5615     for ac_prog in tr
5616 do
5617   # Extract the first word of "$ac_prog", so it can be a program name with args.
5618 set dummy $ac_prog; ac_word=$2
5619 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5620 $as_echo_n "checking for $ac_word... " >&6; }
5621 if ${ac_cv_path_TR+:} false; then :
5622   $as_echo_n "(cached) " >&6
5623 else
5624   case $TR in
5625   [\\/]* | ?:[\\/]*)
5626   ac_cv_path_TR="$TR" # Let the user override the test with a path.
5627   ;;
5628   *)
5629   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5630 for as_dir in $PATH
5631 do
5632   IFS=$as_save_IFS
5633   test -z "$as_dir" && as_dir=.
5634     for ac_exec_ext in '' $ac_executable_extensions; do
5635   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5636     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5637     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5638     break 2
5639   fi
5640 done
5641   done
5642 IFS=$as_save_IFS
5643 
5644   ;;
5645 esac
5646 fi
5647 TR=$ac_cv_path_TR
5648 if test -n "$TR"; then
5649   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5650 $as_echo "$TR" >&6; }
5651 else
5652   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5653 $as_echo "no" >&6; }
5654 fi
5655 
5656 
5657   test -n "$TR" && break
5658 done
5659 
5660 
5661     if test "x$TR" = x; then
5662         if test "xtr" = x; then
5663           PROG_NAME=tr
5664         else
5665           PROG_NAME=tr
5666         fi
5667         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5668 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5669         as_fn_error $? "Cannot continue" "$LINENO" 5
5670     fi
5671 
5672 
5673 
5674     for ac_prog in uname
5675 do
5676   # Extract the first word of "$ac_prog", so it can be a program name with args.
5677 set dummy $ac_prog; ac_word=$2
5678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5679 $as_echo_n "checking for $ac_word... " >&6; }
5680 if ${ac_cv_path_UNAME+:} false; then :
5681   $as_echo_n "(cached) " >&6
5682 else
5683   case $UNAME in
5684   [\\/]* | ?:[\\/]*)
5685   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
5686   ;;
5687   *)
5688   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5689 for as_dir in $PATH
5690 do
5691   IFS=$as_save_IFS
5692   test -z "$as_dir" && as_dir=.
5693     for ac_exec_ext in '' $ac_executable_extensions; do
5694   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5695     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
5696     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5697     break 2
5698   fi
5699 done
5700   done
5701 IFS=$as_save_IFS
5702 
5703   ;;
5704 esac
5705 fi
5706 UNAME=$ac_cv_path_UNAME
5707 if test -n "$UNAME"; then
5708   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
5709 $as_echo "$UNAME" >&6; }
5710 else
5711   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5712 $as_echo "no" >&6; }
5713 fi
5714 
5715 
5716   test -n "$UNAME" && break
5717 done
5718 
5719 
5720     if test "x$UNAME" = x; then
5721         if test "xuname" = x; then
5722           PROG_NAME=uname
5723         else
5724           PROG_NAME=uname
5725         fi
5726         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5727 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5728         as_fn_error $? "Cannot continue" "$LINENO" 5
5729     fi
5730 
5731 
5732 
5733     for ac_prog in uniq
5734 do
5735   # Extract the first word of "$ac_prog", so it can be a program name with args.
5736 set dummy $ac_prog; ac_word=$2
5737 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5738 $as_echo_n "checking for $ac_word... " >&6; }
5739 if ${ac_cv_path_UNIQ+:} false; then :
5740   $as_echo_n "(cached) " >&6
5741 else
5742   case $UNIQ in
5743   [\\/]* | ?:[\\/]*)
5744   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5745   ;;
5746   *)
5747   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5748 for as_dir in $PATH
5749 do
5750   IFS=$as_save_IFS
5751   test -z "$as_dir" && as_dir=.
5752     for ac_exec_ext in '' $ac_executable_extensions; do
5753   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5754     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5755     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5756     break 2
5757   fi
5758 done
5759   done
5760 IFS=$as_save_IFS
5761 
5762   ;;
5763 esac
5764 fi
5765 UNIQ=$ac_cv_path_UNIQ
5766 if test -n "$UNIQ"; then
5767   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
5768 $as_echo "$UNIQ" >&6; }
5769 else
5770   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5771 $as_echo "no" >&6; }
5772 fi
5773 
5774 
5775   test -n "$UNIQ" && break
5776 done
5777 
5778 
5779     if test "x$UNIQ" = x; then
5780         if test "xuniq" = x; then
5781           PROG_NAME=uniq
5782         else
5783           PROG_NAME=uniq
5784         fi
5785         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5786 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5787         as_fn_error $? "Cannot continue" "$LINENO" 5
5788     fi
5789 
5790 
5791 
5792     for ac_prog in wc
5793 do
5794   # Extract the first word of "$ac_prog", so it can be a program name with args.
5795 set dummy $ac_prog; ac_word=$2
5796 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5797 $as_echo_n "checking for $ac_word... " >&6; }
5798 if ${ac_cv_path_WC+:} false; then :
5799   $as_echo_n "(cached) " >&6
5800 else
5801   case $WC in
5802   [\\/]* | ?:[\\/]*)
5803   ac_cv_path_WC="$WC" # Let the user override the test with a path.
5804   ;;
5805   *)
5806   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5807 for as_dir in $PATH
5808 do
5809   IFS=$as_save_IFS
5810   test -z "$as_dir" && as_dir=.
5811     for ac_exec_ext in '' $ac_executable_extensions; do
5812   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5813     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5814     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5815     break 2
5816   fi
5817 done
5818   done
5819 IFS=$as_save_IFS
5820 
5821   ;;
5822 esac
5823 fi
5824 WC=$ac_cv_path_WC
5825 if test -n "$WC"; then
5826   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
5827 $as_echo "$WC" >&6; }
5828 else
5829   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5830 $as_echo "no" >&6; }
5831 fi
5832 
5833 
5834   test -n "$WC" && break
5835 done
5836 
5837 
5838     if test "x$WC" = x; then
5839         if test "xwc" = x; then
5840           PROG_NAME=wc
5841         else
5842           PROG_NAME=wc
5843         fi
5844         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5845 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5846         as_fn_error $? "Cannot continue" "$LINENO" 5
5847     fi
5848 
5849 
5850 
5851     for ac_prog in which
5852 do
5853   # Extract the first word of "$ac_prog", so it can be a program name with args.
5854 set dummy $ac_prog; ac_word=$2
5855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5856 $as_echo_n "checking for $ac_word... " >&6; }
5857 if ${ac_cv_path_WHICH+:} false; then :
5858   $as_echo_n "(cached) " >&6
5859 else
5860   case $WHICH in
5861   [\\/]* | ?:[\\/]*)
5862   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5863   ;;
5864   *)
5865   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5866 for as_dir in $PATH
5867 do
5868   IFS=$as_save_IFS
5869   test -z "$as_dir" && as_dir=.
5870     for ac_exec_ext in '' $ac_executable_extensions; do
5871   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5872     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5873     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5874     break 2
5875   fi
5876 done
5877   done
5878 IFS=$as_save_IFS
5879 
5880   ;;
5881 esac
5882 fi
5883 WHICH=$ac_cv_path_WHICH
5884 if test -n "$WHICH"; then
5885   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
5886 $as_echo "$WHICH" >&6; }
5887 else
5888   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5889 $as_echo "no" >&6; }
5890 fi
5891 
5892 
5893   test -n "$WHICH" && break
5894 done
5895 
5896 
5897     if test "x$WHICH" = x; then
5898         if test "xwhich" = x; then
5899           PROG_NAME=which
5900         else
5901           PROG_NAME=which
5902         fi
5903         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5904 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5905         as_fn_error $? "Cannot continue" "$LINENO" 5
5906     fi
5907 
5908 
5909 
5910     for ac_prog in xargs
5911 do
5912   # Extract the first word of "$ac_prog", so it can be a program name with args.
5913 set dummy $ac_prog; ac_word=$2
5914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5915 $as_echo_n "checking for $ac_word... " >&6; }
5916 if ${ac_cv_path_XARGS+:} false; then :
5917   $as_echo_n "(cached) " >&6
5918 else
5919   case $XARGS in
5920   [\\/]* | ?:[\\/]*)
5921   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5922   ;;
5923   *)
5924   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5925 for as_dir in $PATH
5926 do
5927   IFS=$as_save_IFS
5928   test -z "$as_dir" && as_dir=.
5929     for ac_exec_ext in '' $ac_executable_extensions; do
5930   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5931     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
5932     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5933     break 2
5934   fi
5935 done
5936   done
5937 IFS=$as_save_IFS
5938 
5939   ;;
5940 esac
5941 fi
5942 XARGS=$ac_cv_path_XARGS
5943 if test -n "$XARGS"; then
5944   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
5945 $as_echo "$XARGS" >&6; }
5946 else
5947   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5948 $as_echo "no" >&6; }
5949 fi
5950 
5951 
5952   test -n "$XARGS" && break
5953 done
5954 
5955 
5956     if test "x$XARGS" = x; then
5957         if test "xxargs" = x; then
5958           PROG_NAME=xargs
5959         else
5960           PROG_NAME=xargs
5961         fi
5962         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5963 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5964         as_fn_error $? "Cannot continue" "$LINENO" 5
5965     fi
5966 
5967 
5968 
5969 # Then required tools that require some special treatment.
5970 for ac_prog in gawk mawk nawk awk
5971 do
5972   # Extract the first word of "$ac_prog", so it can be a program name with args.
5973 set dummy $ac_prog; ac_word=$2
5974 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5975 $as_echo_n "checking for $ac_word... " >&6; }
5976 if ${ac_cv_prog_AWK+:} false; then :
5977   $as_echo_n "(cached) " >&6
5978 else
5979   if test -n "$AWK"; then
5980   ac_cv_prog_AWK="$AWK" # Let the user override the test.
5981 else
5982 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5983 for as_dir in $PATH
5984 do
5985   IFS=$as_save_IFS
5986   test -z "$as_dir" && as_dir=.
5987     for ac_exec_ext in '' $ac_executable_extensions; do
5988   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5989     ac_cv_prog_AWK="$ac_prog"
5990     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5991     break 2
5992   fi
5993 done
5994   done
5995 IFS=$as_save_IFS
5996 
5997 fi
5998 fi
5999 AWK=$ac_cv_prog_AWK
6000 if test -n "$AWK"; then
6001   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
6002 $as_echo "$AWK" >&6; }
6003 else
6004   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6005 $as_echo "no" >&6; }
6006 fi
6007 
6008 
6009   test -n "$AWK" && break
6010 done
6011 
6012 
6013     if test "x$AWK" = x; then
6014         if test "x" = x; then
6015           PROG_NAME=awk
6016         else
6017           PROG_NAME=
6018         fi
6019         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6020 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6021         as_fn_error $? "Cannot continue" "$LINENO" 5
6022     fi
6023 
6024 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6025 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6026 if ${ac_cv_path_GREP+:} false; then :
6027   $as_echo_n "(cached) " >&6
6028 else
6029   if test -z "$GREP"; then
6030   ac_path_GREP_found=false
6031   # Loop through the user's path and test for each of PROGNAME-LIST
6032   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6033 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6034 do
6035   IFS=$as_save_IFS
6036   test -z "$as_dir" && as_dir=.
6037     for ac_prog in grep ggrep; do
6038     for ac_exec_ext in '' $ac_executable_extensions; do
6039       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6040       { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
6041 # Check for GNU ac_path_GREP and select it if it is found.
6042   # Check for GNU $ac_path_GREP
6043 case `"$ac_path_GREP" --version 2>&1` in
6044 *GNU*)
6045   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6046 *)
6047   ac_count=0
6048   $as_echo_n 0123456789 >"conftest.in"
6049   while :
6050   do
6051     cat "conftest.in" "conftest.in" >"conftest.tmp"
6052     mv "conftest.tmp" "conftest.in"
6053     cp "conftest.in" "conftest.nl"
6054     $as_echo 'GREP' >> "conftest.nl"
6055     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6056     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6057     as_fn_arith $ac_count + 1 && ac_count=$as_val
6058     if test $ac_count -gt ${ac_path_GREP_max-0}; then
6059       # Best one so far, save it but keep looking for a better one
6060       ac_cv_path_GREP="$ac_path_GREP"
6061       ac_path_GREP_max=$ac_count
6062     fi
6063     # 10*(2^10) chars as input seems more than enough
6064     test $ac_count -gt 10 && break
6065   done
6066   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6067 esac
6068 
6069       $ac_path_GREP_found && break 3
6070     done
6071   done
6072   done
6073 IFS=$as_save_IFS
6074   if test -z "$ac_cv_path_GREP"; then
6075     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6076   fi
6077 else
6078   ac_cv_path_GREP=$GREP
6079 fi
6080 
6081 fi
6082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6083 $as_echo "$ac_cv_path_GREP" >&6; }
6084  GREP="$ac_cv_path_GREP"
6085 
6086 
6087 
6088     if test "x$GREP" = x; then
6089         if test "x" = x; then
6090           PROG_NAME=grep
6091         else
6092           PROG_NAME=
6093         fi
6094         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6095 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6096         as_fn_error $? "Cannot continue" "$LINENO" 5
6097     fi
6098 
6099 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6100 $as_echo_n "checking for egrep... " >&6; }
6101 if ${ac_cv_path_EGREP+:} false; then :
6102   $as_echo_n "(cached) " >&6
6103 else
6104   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6105    then ac_cv_path_EGREP="$GREP -E"
6106    else
6107      if test -z "$EGREP"; then
6108   ac_path_EGREP_found=false
6109   # Loop through the user's path and test for each of PROGNAME-LIST
6110   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6111 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6112 do
6113   IFS=$as_save_IFS
6114   test -z "$as_dir" && as_dir=.
6115     for ac_prog in egrep; do
6116     for ac_exec_ext in '' $ac_executable_extensions; do
6117       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6118       { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
6119 # Check for GNU ac_path_EGREP and select it if it is found.
6120   # Check for GNU $ac_path_EGREP
6121 case `"$ac_path_EGREP" --version 2>&1` in
6122 *GNU*)
6123   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6124 *)
6125   ac_count=0
6126   $as_echo_n 0123456789 >"conftest.in"
6127   while :
6128   do
6129     cat "conftest.in" "conftest.in" >"conftest.tmp"
6130     mv "conftest.tmp" "conftest.in"
6131     cp "conftest.in" "conftest.nl"
6132     $as_echo 'EGREP' >> "conftest.nl"
6133     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6134     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6135     as_fn_arith $ac_count + 1 && ac_count=$as_val
6136     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6137       # Best one so far, save it but keep looking for a better one
6138       ac_cv_path_EGREP="$ac_path_EGREP"
6139       ac_path_EGREP_max=$ac_count
6140     fi
6141     # 10*(2^10) chars as input seems more than enough
6142     test $ac_count -gt 10 && break
6143   done
6144   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6145 esac
6146 
6147       $ac_path_EGREP_found && break 3
6148     done
6149   done
6150   done
6151 IFS=$as_save_IFS
6152   if test -z "$ac_cv_path_EGREP"; then
6153     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6154   fi
6155 else
6156   ac_cv_path_EGREP=$EGREP
6157 fi
6158 
6159    fi
6160 fi
6161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6162 $as_echo "$ac_cv_path_EGREP" >&6; }
6163  EGREP="$ac_cv_path_EGREP"
6164 
6165 
6166 
6167     if test "x$EGREP" = x; then
6168         if test "x" = x; then
6169           PROG_NAME=egrep
6170         else
6171           PROG_NAME=
6172         fi
6173         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6174 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6175         as_fn_error $? "Cannot continue" "$LINENO" 5
6176     fi
6177 
6178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
6179 $as_echo_n "checking for fgrep... " >&6; }
6180 if ${ac_cv_path_FGREP+:} false; then :
6181   $as_echo_n "(cached) " >&6
6182 else
6183   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
6184    then ac_cv_path_FGREP="$GREP -F"
6185    else
6186      if test -z "$FGREP"; then
6187   ac_path_FGREP_found=false
6188   # Loop through the user's path and test for each of PROGNAME-LIST
6189   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6190 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6191 do
6192   IFS=$as_save_IFS
6193   test -z "$as_dir" && as_dir=.
6194     for ac_prog in fgrep; do
6195     for ac_exec_ext in '' $ac_executable_extensions; do
6196       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6197       { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
6198 # Check for GNU ac_path_FGREP and select it if it is found.
6199   # Check for GNU $ac_path_FGREP
6200 case `"$ac_path_FGREP" --version 2>&1` in
6201 *GNU*)
6202   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6203 *)
6204   ac_count=0
6205   $as_echo_n 0123456789 >"conftest.in"
6206   while :
6207   do
6208     cat "conftest.in" "conftest.in" >"conftest.tmp"
6209     mv "conftest.tmp" "conftest.in"
6210     cp "conftest.in" "conftest.nl"
6211     $as_echo 'FGREP' >> "conftest.nl"
6212     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6213     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6214     as_fn_arith $ac_count + 1 && ac_count=$as_val
6215     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6216       # Best one so far, save it but keep looking for a better one
6217       ac_cv_path_FGREP="$ac_path_FGREP"
6218       ac_path_FGREP_max=$ac_count
6219     fi
6220     # 10*(2^10) chars as input seems more than enough
6221     test $ac_count -gt 10 && break
6222   done
6223   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6224 esac
6225 
6226       $ac_path_FGREP_found && break 3
6227     done
6228   done
6229   done
6230 IFS=$as_save_IFS
6231   if test -z "$ac_cv_path_FGREP"; then
6232     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6233   fi
6234 else
6235   ac_cv_path_FGREP=$FGREP
6236 fi
6237 
6238    fi
6239 fi
6240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6241 $as_echo "$ac_cv_path_FGREP" >&6; }
6242  FGREP="$ac_cv_path_FGREP"
6243 
6244 
6245 
6246     if test "x$FGREP" = x; then
6247         if test "x" = x; then
6248           PROG_NAME=fgrep
6249         else
6250           PROG_NAME=
6251         fi
6252         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6253 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6254         as_fn_error $? "Cannot continue" "$LINENO" 5
6255     fi
6256 
6257 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6258 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
6259 if ${ac_cv_path_SED+:} false; then :
6260   $as_echo_n "(cached) " >&6
6261 else
6262             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6263      for ac_i in 1 2 3 4 5 6 7; do
6264        ac_script="$ac_script$as_nl$ac_script"
6265      done
6266      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6267      { ac_script=; unset ac_script;}
6268      if test -z "$SED"; then
6269   ac_path_SED_found=false
6270   # Loop through the user's path and test for each of PROGNAME-LIST
6271   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6272 for as_dir in $PATH
6273 do
6274   IFS=$as_save_IFS
6275   test -z "$as_dir" && as_dir=.
6276     for ac_prog in sed gsed; do
6277     for ac_exec_ext in '' $ac_executable_extensions; do
6278       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6279       { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
6280 # Check for GNU ac_path_SED and select it if it is found.
6281   # Check for GNU $ac_path_SED
6282 case `"$ac_path_SED" --version 2>&1` in
6283 *GNU*)
6284   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6285 *)
6286   ac_count=0
6287   $as_echo_n 0123456789 >"conftest.in"
6288   while :
6289   do
6290     cat "conftest.in" "conftest.in" >"conftest.tmp"
6291     mv "conftest.tmp" "conftest.in"
6292     cp "conftest.in" "conftest.nl"
6293     $as_echo '' >> "conftest.nl"
6294     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6295     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6296     as_fn_arith $ac_count + 1 && ac_count=$as_val
6297     if test $ac_count -gt ${ac_path_SED_max-0}; then
6298       # Best one so far, save it but keep looking for a better one
6299       ac_cv_path_SED="$ac_path_SED"
6300       ac_path_SED_max=$ac_count
6301     fi
6302     # 10*(2^10) chars as input seems more than enough
6303     test $ac_count -gt 10 && break
6304   done
6305   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6306 esac
6307 
6308       $ac_path_SED_found && break 3
6309     done
6310   done
6311   done
6312 IFS=$as_save_IFS
6313   if test -z "$ac_cv_path_SED"; then
6314     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6315   fi
6316 else
6317   ac_cv_path_SED=$SED
6318 fi
6319 
6320 fi
6321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6322 $as_echo "$ac_cv_path_SED" >&6; }
6323  SED="$ac_cv_path_SED"
6324   rm -f conftest.sed
6325 
6326 
6327     if test "x$SED" = x; then
6328         if test "x" = x; then
6329           PROG_NAME=sed
6330         else
6331           PROG_NAME=
6332         fi
6333         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6334 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6335         as_fn_error $? "Cannot continue" "$LINENO" 5
6336     fi
6337 
6338 
6339 for ac_prog in nawk gawk awk
6340 do
6341   # Extract the first word of "$ac_prog", so it can be a program name with args.
6342 set dummy $ac_prog; ac_word=$2
6343 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6344 $as_echo_n "checking for $ac_word... " >&6; }
6345 if ${ac_cv_path_NAWK+:} false; then :
6346   $as_echo_n "(cached) " >&6
6347 else
6348   case $NAWK in
6349   [\\/]* | ?:[\\/]*)
6350   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
6351   ;;
6352   *)
6353   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6354 for as_dir in $PATH
6355 do
6356   IFS=$as_save_IFS
6357   test -z "$as_dir" && as_dir=.
6358     for ac_exec_ext in '' $ac_executable_extensions; do
6359   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6360     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
6361     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6362     break 2
6363   fi
6364 done
6365   done
6366 IFS=$as_save_IFS
6367 
6368   ;;
6369 esac
6370 fi
6371 NAWK=$ac_cv_path_NAWK
6372 if test -n "$NAWK"; then
6373   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6374 $as_echo "$NAWK" >&6; }
6375 else
6376   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6377 $as_echo "no" >&6; }
6378 fi
6379 
6380 
6381   test -n "$NAWK" && break
6382 done
6383 
6384 
6385     if test "x$NAWK" = x; then
6386         if test "x" = x; then
6387           PROG_NAME=nawk
6388         else
6389           PROG_NAME=
6390         fi
6391         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6392 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6393         as_fn_error $? "Cannot continue" "$LINENO" 5
6394     fi
6395 
6396 
6397 # Always force rm.
6398 RM="$RM -f"
6399 
6400 # These are not required on all platforms
6401 # Extract the first word of "cygpath", so it can be a program name with args.
6402 set dummy cygpath; ac_word=$2
6403 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6404 $as_echo_n "checking for $ac_word... " >&6; }
6405 if ${ac_cv_path_CYGPATH+:} false; then :
6406   $as_echo_n "(cached) " >&6
6407 else
6408   case $CYGPATH in
6409   [\\/]* | ?:[\\/]*)
6410   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
6411   ;;
6412   *)
6413   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6414 for as_dir in $PATH
6415 do
6416   IFS=$as_save_IFS
6417   test -z "$as_dir" && as_dir=.
6418     for ac_exec_ext in '' $ac_executable_extensions; do
6419   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6420     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
6421     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6422     break 2
6423   fi
6424 done
6425   done
6426 IFS=$as_save_IFS
6427 
6428   ;;
6429 esac
6430 fi
6431 CYGPATH=$ac_cv_path_CYGPATH
6432 if test -n "$CYGPATH"; then
6433   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
6434 $as_echo "$CYGPATH" >&6; }
6435 else
6436   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6437 $as_echo "no" >&6; }
6438 fi
6439 
6440 
6441 # Extract the first word of "readlink", so it can be a program name with args.
6442 set dummy readlink; ac_word=$2
6443 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6444 $as_echo_n "checking for $ac_word... " >&6; }
6445 if ${ac_cv_path_READLINK+:} false; then :
6446   $as_echo_n "(cached) " >&6
6447 else
6448   case $READLINK in
6449   [\\/]* | ?:[\\/]*)
6450   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
6451   ;;
6452   *)
6453   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6454 for as_dir in $PATH
6455 do
6456   IFS=$as_save_IFS
6457   test -z "$as_dir" && as_dir=.
6458     for ac_exec_ext in '' $ac_executable_extensions; do
6459   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6460     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
6461     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6462     break 2
6463   fi
6464 done
6465   done
6466 IFS=$as_save_IFS
6467 
6468   ;;
6469 esac
6470 fi
6471 READLINK=$ac_cv_path_READLINK
6472 if test -n "$READLINK"; then
6473   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
6474 $as_echo "$READLINK" >&6; }
6475 else
6476   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6477 $as_echo "no" >&6; }
6478 fi
6479 
6480 
6481 # Extract the first word of "df", so it can be a program name with args.
6482 set dummy df; ac_word=$2
6483 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6484 $as_echo_n "checking for $ac_word... " >&6; }
6485 if ${ac_cv_path_DF+:} false; then :
6486   $as_echo_n "(cached) " >&6
6487 else
6488   case $DF in
6489   [\\/]* | ?:[\\/]*)
6490   ac_cv_path_DF="$DF" # Let the user override the test with a path.
6491   ;;
6492   *)
6493   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6494 for as_dir in $PATH
6495 do
6496   IFS=$as_save_IFS
6497   test -z "$as_dir" && as_dir=.
6498     for ac_exec_ext in '' $ac_executable_extensions; do
6499   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6500     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
6501     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6502     break 2
6503   fi
6504 done
6505   done
6506 IFS=$as_save_IFS
6507 
6508   ;;
6509 esac
6510 fi
6511 DF=$ac_cv_path_DF
6512 if test -n "$DF"; then
6513   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
6514 $as_echo "$DF" >&6; }
6515 else
6516   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6517 $as_echo "no" >&6; }
6518 fi
6519 
6520 
6521 # Extract the first word of "SetFile", so it can be a program name with args.
6522 set dummy SetFile; ac_word=$2
6523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6524 $as_echo_n "checking for $ac_word... " >&6; }
6525 if ${ac_cv_path_SETFILE+:} false; then :
6526   $as_echo_n "(cached) " >&6
6527 else
6528   case $SETFILE in
6529   [\\/]* | ?:[\\/]*)
6530   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
6531   ;;
6532   *)
6533   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6534 for as_dir in $PATH
6535 do
6536   IFS=$as_save_IFS
6537   test -z "$as_dir" && as_dir=.
6538     for ac_exec_ext in '' $ac_executable_extensions; do
6539   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6540     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
6541     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6542     break 2
6543   fi
6544 done
6545   done
6546 IFS=$as_save_IFS
6547 
6548   ;;
6549 esac
6550 fi
6551 SETFILE=$ac_cv_path_SETFILE
6552 if test -n "$SETFILE"; then
6553   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
6554 $as_echo "$SETFILE" >&6; }
6555 else
6556   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6557 $as_echo "no" >&6; }
6558 fi
6559 
6560 
6561 
6562 
6563 # Now we can determine OpenJDK build and target platforms. This is required to
6564 # have early on.
6565 # Make sure we can run config.sub.
6566 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6567   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6568 
6569 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6570 $as_echo_n "checking build system type... " >&6; }
6571 if ${ac_cv_build+:} false; then :
6572   $as_echo_n "(cached) " >&6
6573 else
6574   ac_build_alias=$build_alias
6575 test "x$ac_build_alias" = x &&
6576   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6577 test "x$ac_build_alias" = x &&
6578   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6579 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6580   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6581 
6582 fi
6583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6584 $as_echo "$ac_cv_build" >&6; }
6585 case $ac_cv_build in
6586 *-*-*) ;;
6587 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
6588 esac
6589 build=$ac_cv_build
6590 ac_save_IFS=$IFS; IFS='-'
6591 set x $ac_cv_build
6592 shift
6593 build_cpu=$1
6594 build_vendor=$2
6595 shift; shift
6596 # Remember, the first character of IFS is used to create $*,
6597 # except with old shells:
6598 build_os=$*
6599 IFS=$ac_save_IFS
6600 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6601 
6602 
6603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6604 $as_echo_n "checking host system type... " >&6; }
6605 if ${ac_cv_host+:} false; then :
6606   $as_echo_n "(cached) " >&6
6607 else
6608   if test "x$host_alias" = x; then
6609   ac_cv_host=$ac_cv_build
6610 else
6611   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6612     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6613 fi
6614 
6615 fi
6616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6617 $as_echo "$ac_cv_host" >&6; }
6618 case $ac_cv_host in
6619 *-*-*) ;;
6620 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6621 esac
6622 host=$ac_cv_host
6623 ac_save_IFS=$IFS; IFS='-'
6624 set x $ac_cv_host
6625 shift
6626 host_cpu=$1
6627 host_vendor=$2
6628 shift; shift
6629 # Remember, the first character of IFS is used to create $*,
6630 # except with old shells:
6631 host_os=$*
6632 IFS=$ac_save_IFS
6633 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6634 
6635 
6636 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6637 $as_echo_n "checking target system type... " >&6; }
6638 if ${ac_cv_target+:} false; then :
6639   $as_echo_n "(cached) " >&6
6640 else
6641   if test "x$target_alias" = x; then
6642   ac_cv_target=$ac_cv_host
6643 else
6644   ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6645     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6646 fi
6647 
6648 fi
6649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6650 $as_echo "$ac_cv_target" >&6; }
6651 case $ac_cv_target in
6652 *-*-*) ;;
6653 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6654 esac
6655 target=$ac_cv_target
6656 ac_save_IFS=$IFS; IFS='-'
6657 set x $ac_cv_target
6658 shift
6659 target_cpu=$1
6660 target_vendor=$2
6661 shift; shift
6662 # Remember, the first character of IFS is used to create $*,
6663 # except with old shells:
6664 target_os=$*
6665 IFS=$ac_save_IFS
6666 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6667 
6668 
6669 # The aliases save the names the user supplied, while $host etc.
6670 # will get canonicalized.
6671 test -n "$target_alias" &&
6672   test "$program_prefix$program_suffix$program_transform_name" = \
6673     NONENONEs,x,x, &&
6674   program_prefix=${target_alias}-
6675 
6676 # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
6677 # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
6678 # product you're building. The target of this build is called "host". Since this is confusing to most people, we
6679 # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
6680 # to use the configure naming style.
6681 
6682 
6683 
6684 
6685 
6686     # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
6687     # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
6688     # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
6689     # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
6690     OPENJDK_TARGET_AUTOCONF_NAME="$host"
6691     OPENJDK_BUILD_AUTOCONF_NAME="$build"
6692 
6693 
6694 
6695     # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6696 
6697   case "$build_os" in
6698     *linux*)
6699       VAR_OS=linux
6700       VAR_OS_API=posix
6701       VAR_OS_ENV=linux
6702       ;;
6703     *solaris*)
6704       VAR_OS=solaris
6705       VAR_OS_API=posix
6706       VAR_OS_ENV=solaris
6707       ;;
6708     *darwin*)
6709       VAR_OS=macosx
6710       VAR_OS_API=posix
6711       VAR_OS_ENV=macosx
6712       ;;
6713     *bsd*)
6714       VAR_OS=bsd
6715       VAR_OS_API=posix
6716       VAR_OS_ENV=bsd
6717       ;;
6718     *cygwin*)
6719       VAR_OS=windows
6720       VAR_OS_API=winapi
6721       VAR_OS_ENV=windows.cygwin
6722       ;;
6723     *mingw*)
6724       VAR_OS=windows
6725       VAR_OS_API=winapi
6726       VAR_OS_ENV=windows.msys
6727       ;;
6728     *)
6729       as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
6730       ;;
6731   esac
6732 
6733 
6734   # First argument is the cpu name from the trip/quad
6735   case "$build_cpu" in
6736     x86_64)
6737       VAR_CPU=x86_64
6738       VAR_CPU_ARCH=x86
6739       VAR_CPU_BITS=64
6740       VAR_CPU_ENDIAN=little
6741       ;;
6742     i?86)
6743       VAR_CPU=x86
6744       VAR_CPU_ARCH=x86
6745       VAR_CPU_BITS=32
6746       VAR_CPU_ENDIAN=little
6747       ;;
6748     arm*)
6749       VAR_CPU=arm
6750       VAR_CPU_ARCH=arm
6751       VAR_CPU_BITS=32
6752       VAR_CPU_ENDIAN=little
6753       ;;
6754     powerpc)
6755       VAR_CPU=ppc
6756       VAR_CPU_ARCH=ppc
6757       VAR_CPU_BITS=32
6758       VAR_CPU_ENDIAN=big
6759        ;;
6760     powerpc64)
6761       VAR_CPU=ppc64
6762       VAR_CPU_ARCH=ppc
6763       VAR_CPU_BITS=64
6764       VAR_CPU_ENDIAN=big
6765        ;;
6766     sparc)
6767       VAR_CPU=sparc
6768       VAR_CPU_ARCH=sparc
6769       VAR_CPU_BITS=32
6770       VAR_CPU_ENDIAN=big
6771        ;;
6772     sparcv9)
6773       VAR_CPU=sparcv9
6774       VAR_CPU_ARCH=sparc
6775       VAR_CPU_BITS=64
6776       VAR_CPU_ENDIAN=big
6777        ;;
6778     *)
6779       as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
6780       ;;
6781   esac
6782 
6783     # ..and setup our own variables. (Do this explicitely to facilitate searching)
6784     OPENJDK_BUILD_OS="$VAR_OS"
6785     OPENJDK_BUILD_OS_API="$VAR_OS_API"
6786     OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6787     OPENJDK_BUILD_CPU="$VAR_CPU"
6788     OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6789     OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6790     OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6791 
6792 
6793 
6794 
6795 
6796 
6797 
6798     { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
6799 $as_echo_n "checking openjdk-build os-cpu... " >&6; }
6800     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6801 $as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6802 
6803     # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6804 
6805   case "$host_os" in
6806     *linux*)
6807       VAR_OS=linux
6808       VAR_OS_API=posix
6809       VAR_OS_ENV=linux
6810       ;;
6811     *solaris*)
6812       VAR_OS=solaris
6813       VAR_OS_API=posix
6814       VAR_OS_ENV=solaris
6815       ;;
6816     *darwin*)
6817       VAR_OS=macosx
6818       VAR_OS_API=posix
6819       VAR_OS_ENV=macosx
6820       ;;
6821     *bsd*)
6822       VAR_OS=bsd
6823       VAR_OS_API=posix
6824       VAR_OS_ENV=bsd
6825       ;;
6826     *cygwin*)
6827       VAR_OS=windows
6828       VAR_OS_API=winapi
6829       VAR_OS_ENV=windows.cygwin
6830       ;;
6831     *mingw*)
6832       VAR_OS=windows
6833       VAR_OS_API=winapi
6834       VAR_OS_ENV=windows.msys
6835       ;;
6836     *)
6837       as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
6838       ;;
6839   esac
6840 
6841 
6842   # First argument is the cpu name from the trip/quad
6843   case "$host_cpu" in
6844     x86_64)
6845       VAR_CPU=x86_64
6846       VAR_CPU_ARCH=x86
6847       VAR_CPU_BITS=64
6848       VAR_CPU_ENDIAN=little
6849       ;;
6850     i?86)
6851       VAR_CPU=x86
6852       VAR_CPU_ARCH=x86
6853       VAR_CPU_BITS=32
6854       VAR_CPU_ENDIAN=little
6855       ;;
6856     arm*)
6857       VAR_CPU=arm
6858       VAR_CPU_ARCH=arm
6859       VAR_CPU_BITS=32
6860       VAR_CPU_ENDIAN=little
6861       ;;
6862     powerpc)
6863       VAR_CPU=ppc
6864       VAR_CPU_ARCH=ppc
6865       VAR_CPU_BITS=32
6866       VAR_CPU_ENDIAN=big
6867        ;;
6868     powerpc64)
6869       VAR_CPU=ppc64
6870       VAR_CPU_ARCH=ppc
6871       VAR_CPU_BITS=64
6872       VAR_CPU_ENDIAN=big
6873        ;;
6874     sparc)
6875       VAR_CPU=sparc
6876       VAR_CPU_ARCH=sparc
6877       VAR_CPU_BITS=32
6878       VAR_CPU_ENDIAN=big
6879        ;;
6880     sparcv9)
6881       VAR_CPU=sparcv9
6882       VAR_CPU_ARCH=sparc
6883       VAR_CPU_BITS=64
6884       VAR_CPU_ENDIAN=big
6885        ;;
6886     *)
6887       as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
6888       ;;
6889   esac
6890 
6891     # ... and setup our own variables. (Do this explicitely to facilitate searching)
6892     OPENJDK_TARGET_OS="$VAR_OS"
6893     OPENJDK_TARGET_OS_API="$VAR_OS_API"
6894     OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
6895     OPENJDK_TARGET_CPU="$VAR_CPU"
6896     OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
6897     OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
6898     OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6899 
6900 
6901 
6902 
6903 
6904 
6905 
6906     { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
6907 $as_echo_n "checking openjdk-target os-cpu... " >&6; }
6908     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
6909 $as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
6910 
6911 
6912 
6913 # Check whether --with-target-bits was given.
6914 if test "${with_target_bits+set}" = set; then :
6915   withval=$with_target_bits;
6916 fi
6917 
6918 
6919   # We have three types of compiles:
6920   # native  == normal compilation, target system == build system
6921   # cross   == traditional cross compilation, target system != build system; special toolchain needed
6922   # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
6923   #
6924   if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
6925     # We're doing a proper cross-compilation
6926     COMPILE_TYPE="cross"
6927   else
6928     COMPILE_TYPE="native"
6929   fi
6930 
6931   if test "x$with_target_bits" != x; then
6932     if test "x$COMPILE_TYPE" = "xcross"; then
6933       as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
6934     fi
6935 
6936     if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6937       # A reduced build is requested
6938       COMPILE_TYPE="reduced"
6939       OPENJDK_TARGET_CPU_BITS=32
6940       if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
6941         OPENJDK_TARGET_CPU=x86
6942       elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
6943         OPENJDK_TARGET_CPU=sparc
6944       else
6945         as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
6946       fi
6947     elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
6948       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
6949     elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
6950       { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
6951 $as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
6952     else
6953       as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
6954     fi
6955   fi
6956 
6957 
6958 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
6959 $as_echo_n "checking compilation type... " >&6; }
6960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
6961 $as_echo "$COMPILE_TYPE" >&6; }
6962 
6963 
6964     if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
6965        REQUIRED_OS_NAME=SunOS
6966        REQUIRED_OS_VERSION=5.10
6967     fi
6968     if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
6969        REQUIRED_OS_NAME=Linux
6970        REQUIRED_OS_VERSION=2.6
6971     fi
6972     if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
6973         REQUIRED_OS_NAME=Windows
6974         if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
6975             REQUIRED_OS_VERSION=5.2
6976         else
6977             REQUIRED_OS_VERSION=5.1
6978         fi
6979     fi
6980     if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
6981         REQUIRED_OS_NAME=Darwin
6982         REQUIRED_OS_VERSION=11.2
6983     fi
6984 
6985 
6986 
6987 
6988 
6989     # Also store the legacy naming of the cpu.
6990     # Ie i586 and amd64 instead of x86 and x86_64
6991     OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
6992     if test "x$OPENJDK_TARGET_CPU" = xx86; then
6993       OPENJDK_TARGET_CPU_LEGACY="i586"
6994     elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6995       # On all platforms except MacOSX replace x86_64 with amd64.
6996       OPENJDK_TARGET_CPU_LEGACY="amd64"
6997     fi
6998 
6999 
7000     # And the second legacy naming of the cpu.
7001     # Ie i386 and amd64 instead of x86 and x86_64.
7002     OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
7003     if test "x$OPENJDK_TARGET_CPU" = xx86; then
7004       OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
7005     elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7006       OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
7007     fi
7008 
7009 
7010     # This is the name of the cpu (but using i386 and amd64 instead of
7011     # x86 and x86_64, respectively), preceeded by a /, to be used when
7012     # locating libraries. On macosx, it's empty, though.
7013     OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
7014     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
7015         OPENJDK_TARGET_CPU_LIBDIR=""
7016     fi
7017 
7018 
7019     # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
7020     # /amd64 or /sparcv9. This string is appended to some library paths, like this:
7021     # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
7022     OPENJDK_TARGET_CPU_ISADIR=""
7023     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7024       if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7025           OPENJDK_TARGET_CPU_ISADIR="/amd64"
7026       elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
7027           OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
7028       fi
7029     fi
7030 
7031 
7032     # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
7033     OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
7034     if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
7035       # On linux only, we replace x86 with i386.
7036       OPENJDK_TARGET_CPU_OSARCH="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_OSARCH="amd64"
7040     fi
7041 
7042 
7043     OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
7044     if test "x$OPENJDK_TARGET_CPU" = xx86; then
7045       OPENJDK_TARGET_CPU_JLI="i386"
7046     elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7047       # On all platforms except macosx, we replace x86_64 with amd64.
7048       OPENJDK_TARGET_CPU_JLI="amd64"
7049     fi
7050     # Now setup the -D flags for building libjli.
7051     OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
7052     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7053       if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
7054         OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
7055       elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
7056         OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
7057       fi
7058     fi
7059 
7060 
7061     # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
7062     if test "x$OPENJDK_TARGET_OS_API" = xposix; then
7063         OPENJDK_TARGET_OS_API_DIR="solaris"
7064     fi
7065     if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
7066         OPENJDK_TARGET_OS_API_DIR="windows"
7067     fi
7068 
7069 
7070     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7071         A_LP64="LP64:="
7072         # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
7073         # unpack200.exe
7074         if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
7075             ADD_LP64="-D_LP64=1"
7076         fi
7077     fi
7078     LP64=$A_LP64
7079 
7080 
7081     if test "x$COMPILE_TYPE" = "xcross"; then
7082       # FIXME: ... or should this include reduced builds..?
7083       DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
7084     else
7085       DEFINE_CROSS_COMPILE_ARCH=""
7086     fi
7087 
7088 
7089 
7090 
7091 # Continue setting up basic stuff. Most remaining code require fundamental tools.
7092 
7093 # Locate the directory of this script.
7094 SCRIPT="$0"
7095 
7096     if test "x$OPENJDK_BUILD_OS" != xwindows; then
7097         # Follow a chain of symbolic links. Use readlink
7098         # where it exists, else fall back to horribly
7099         # complicated shell code.
7100         if test "x$READLINK_TESTED" != yes; then
7101             # On MacOSX there is a readlink tool with a different
7102             # purpose than the GNU readlink tool. Check the found readlink.
7103             ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
7104             if test "x$ISGNU" = x; then
7105                  # A readlink that we do not know how to use.
7106                  # Are there other non-GNU readlinks out there?
7107                  READLINK_TESTED=yes
7108                  READLINK=
7109             fi
7110         fi
7111 
7112         if test "x$READLINK" != x; then
7113             SCRIPT=`$READLINK -f $SCRIPT`
7114         else
7115             # Save the current directory for restoring afterwards
7116             STARTDIR=$PWD
7117             COUNTER=0
7118             sym_link_dir=`$DIRNAME $SCRIPT`
7119             sym_link_file=`$BASENAME $SCRIPT`
7120             # Use the system pwd and not the shell builtin to resolve directory symlinks
7121             cd $sym_link_dir
7122             cd `$THEPWDCMD`
7123             sym_link_dir=`$THEPWDCMD`
7124             # Resolve file symlinks
7125             while test $COUNTER -lt 20; do
7126                 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
7127                 if test "x$ISLINK" == x; then
7128                     # This is not a symbolic link! We are done!
7129                     break
7130                 fi
7131                 # Again resolve directory symlinks since the target of the just found
7132                 # link could be in a different directory
7133                 cd `$DIRNAME $ISLINK`
7134                 sym_link_dir=`$THEPWDCMD`
7135                 sym_link_file=`$BASENAME $ISLINK`
7136                 let COUNTER=COUNTER+1
7137             done
7138             cd $STARTDIR
7139             SCRIPT=$sym_link_dir/$sym_link_file
7140         fi
7141     fi
7142 
7143 AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD`
7144 
7145 # Where is the source? It is located two levels above the configure script.
7146 CURDIR="$PWD"
7147 cd "$AUTOCONF_DIR/../.."
7148 SRC_ROOT="`$THEPWDCMD`"
7149 
7150 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7151   PATH_SEP=";"
7152 
7153   SRC_ROOT_LENGTH=`$THEPWDCMD|$WC -m`
7154   if test $SRC_ROOT_LENGTH -gt 100; then
7155       as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
7156   fi
7157 
7158   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7159     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
7160 $as_echo_n "checking cygwin release... " >&6; }
7161     CYGWIN_VERSION=`$UNAME -r`
7162     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
7163 $as_echo "$CYGWIN_VERSION" >&6; }
7164     WINDOWS_ENV_VENDOR='cygwin'
7165     WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
7166 
7167     CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
7168     if test "x$CYGWIN_VERSION_OK" = x; then
7169       { $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
7170 $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;}
7171       as_fn_error $? "Cannot continue" "$LINENO" 5
7172     fi
7173     if test "x$CYGPATH" = x; then
7174         as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
7175     fi
7176     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
7177 $as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
7178     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7179     cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
7180     # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
7181     CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
7182     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
7183 $as_echo "$CYGWIN_ROOT_PATH" >&6; }
7184     WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
7185     test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
7186     if test "x$test_cygdrive_prefix" = x; then
7187         as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
7188     fi
7189   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7190     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
7191 $as_echo_n "checking msys release... " >&6; }
7192     MSYS_VERSION=`$UNAME -r`
7193     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
7194 $as_echo "$MSYS_VERSION" >&6; }
7195 
7196     WINDOWS_ENV_VENDOR='msys'
7197     WINDOWS_ENV_VERSION="$MSYS_VERSION"
7198 
7199     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
7200 $as_echo_n "checking msys root directory as unix-style path... " >&6; }
7201     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7202     MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
7203 
7204   windows_path="$MSYS_ROOT_PATH"
7205   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7206     unix_path=`$CYGPATH -u "$windows_path"`
7207     MSYS_ROOT_PATH="$unix_path"
7208   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7209     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7210     MSYS_ROOT_PATH="$unix_path"
7211   fi
7212 
7213     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
7214 $as_echo "$MSYS_ROOT_PATH" >&6; }
7215     WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
7216   else
7217     as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
7218   fi
7219 
7220   # Test if windows or unix (cygwin/msys) find is first in path.
7221   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
7222 $as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
7223   FIND_BINARY_OUTPUT=`find --version 2>&1`
7224   if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
7225     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
7226 $as_echo "unix style" >&6; }
7227   elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
7228     { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
7229 $as_echo "Windows" >&6; }
7230     { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
7231 $as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
7232     { $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
7233 $as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
7234     as_fn_error $? "Cannot continue" "$LINENO" 5
7235   else
7236     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
7237 $as_echo "unknown" >&6; }
7238     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
7239 $as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
7240   fi
7241 
7242 else
7243   PATH_SEP=":"
7244 fi
7245 
7246 
7247 
7248 cd "$CURDIR"
7249 
7250 
7251   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7252 
7253   # Input might be given as Windows format, start by converting to
7254   # unix format.
7255   path="$SRC_ROOT"
7256   new_path=`$CYGPATH -u "$path"`
7257 
7258   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7259   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7260   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7261   # "foo.exe" is OK but "foo" is an error.
7262   #
7263   # This test is therefore slightly more accurate than "test -f" to check for file precense.
7264   # It is also a way to make sure we got the proper file name for the real test later on.
7265   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7266   if test "x$test_shortpath" = x; then
7267     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7268 $as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7269     as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
7270   fi
7271 
7272   # Call helper function which possibly converts this using DOS-style short mode.
7273   # If so, the updated path is stored in $new_path.
7274 
7275   input_path="$new_path"
7276   # Check if we need to convert this using DOS-style short mode. If the path
7277   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7278   # take no chances and rewrite it.
7279   # Note: m4 eats our [], so we need to use [ and ] instead.
7280   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7281   if test "x$has_forbidden_chars" != x; then
7282     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7283     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7284     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7285     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7286       # Going to short mode and back again did indeed matter. Since short mode is
7287       # case insensitive, let's make it lowercase to improve readability.
7288       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7289       # Now convert it back to Unix-stile (cygpath)
7290       input_path=`$CYGPATH -u "$shortmode_path"`
7291       new_path="$input_path"
7292     fi
7293   fi
7294 
7295   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7296   if test "x$test_cygdrive_prefix" = x; then
7297     # As a simple fix, exclude /usr/bin since it's not a real path.
7298     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7299       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7300       # a path prefixed by /cygdrive for fixpath to work.
7301       new_path="$CYGWIN_ROOT_PATH$input_path"
7302     fi
7303   fi
7304 
7305 
7306   if test "x$path" != "x$new_path"; then
7307     SRC_ROOT="$new_path"
7308     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7309 $as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7310   fi
7311 
7312   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7313 
7314   path="$SRC_ROOT"
7315   has_colon=`$ECHO $path | $GREP ^.:`
7316   new_path="$path"
7317   if test "x$has_colon" = x; then
7318     # Not in mixed or Windows style, start by that.
7319     new_path=`cmd //c echo $path`
7320   fi
7321 
7322 
7323   input_path="$new_path"
7324   # Check if we need to convert this using DOS-style short mode. If the path
7325   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7326   # take no chances and rewrite it.
7327   # Note: m4 eats our [], so we need to use [ and ] instead.
7328   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7329   if test "x$has_forbidden_chars" != x; then
7330     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7331     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7332   fi
7333 
7334 
7335   windows_path="$new_path"
7336   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7337     unix_path=`$CYGPATH -u "$windows_path"`
7338     new_path="$unix_path"
7339   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7340     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7341     new_path="$unix_path"
7342   fi
7343 
7344   if test "x$path" != "x$new_path"; then
7345     SRC_ROOT="$new_path"
7346     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7347 $as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7348   fi
7349 
7350   # Save the first 10 bytes of this path to the storage, so fixpath can work.
7351   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7352 
7353   else
7354     # We're on a posix platform. Hooray! :)
7355     path="$SRC_ROOT"
7356 
7357     if test ! -f "$path" && test ! -d "$path"; then
7358       as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7359     fi
7360 
7361     has_space=`$ECHO "$path" | $GREP " "`
7362     if test "x$has_space" != x; then
7363       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7364 $as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7365       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7366     fi
7367   fi
7368 
7369 
7370   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7371 
7372   # Input might be given as Windows format, start by converting to
7373   # unix format.
7374   path="$CURDIR"
7375   new_path=`$CYGPATH -u "$path"`
7376 
7377   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7378   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7379   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7380   # "foo.exe" is OK but "foo" is an error.
7381   #
7382   # This test is therefore slightly more accurate than "test -f" to check for file precense.
7383   # It is also a way to make sure we got the proper file name for the real test later on.
7384   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7385   if test "x$test_shortpath" = x; then
7386     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7387 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7388     as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
7389   fi
7390 
7391   # Call helper function which possibly converts this using DOS-style short mode.
7392   # If so, the updated path is stored in $new_path.
7393 
7394   input_path="$new_path"
7395   # Check if we need to convert this using DOS-style short mode. If the path
7396   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7397   # take no chances and rewrite it.
7398   # Note: m4 eats our [], so we need to use [ and ] instead.
7399   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7400   if test "x$has_forbidden_chars" != x; then
7401     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7402     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7403     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7404     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7405       # Going to short mode and back again did indeed matter. Since short mode is
7406       # case insensitive, let's make it lowercase to improve readability.
7407       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7408       # Now convert it back to Unix-stile (cygpath)
7409       input_path=`$CYGPATH -u "$shortmode_path"`
7410       new_path="$input_path"
7411     fi
7412   fi
7413 
7414   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7415   if test "x$test_cygdrive_prefix" = x; then
7416     # As a simple fix, exclude /usr/bin since it's not a real path.
7417     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7418       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7419       # a path prefixed by /cygdrive for fixpath to work.
7420       new_path="$CYGWIN_ROOT_PATH$input_path"
7421     fi
7422   fi
7423 
7424 
7425   if test "x$path" != "x$new_path"; then
7426     CURDIR="$new_path"
7427     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7428 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7429   fi
7430 
7431   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7432 
7433   path="$CURDIR"
7434   has_colon=`$ECHO $path | $GREP ^.:`
7435   new_path="$path"
7436   if test "x$has_colon" = x; then
7437     # Not in mixed or Windows style, start by that.
7438     new_path=`cmd //c echo $path`
7439   fi
7440 
7441 
7442   input_path="$new_path"
7443   # Check if we need to convert this using DOS-style short mode. If the path
7444   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7445   # take no chances and rewrite it.
7446   # Note: m4 eats our [], so we need to use [ and ] instead.
7447   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7448   if test "x$has_forbidden_chars" != x; then
7449     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7450     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7451   fi
7452 
7453 
7454   windows_path="$new_path"
7455   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7456     unix_path=`$CYGPATH -u "$windows_path"`
7457     new_path="$unix_path"
7458   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7459     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7460     new_path="$unix_path"
7461   fi
7462 
7463   if test "x$path" != "x$new_path"; then
7464     CURDIR="$new_path"
7465     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7466 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7467   fi
7468 
7469   # Save the first 10 bytes of this path to the storage, so fixpath can work.
7470   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7471 
7472   else
7473     # We're on a posix platform. Hooray! :)
7474     path="$CURDIR"
7475 
7476     if test ! -f "$path" && test ! -d "$path"; then
7477       as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
7478     fi
7479 
7480     has_space=`$ECHO "$path" | $GREP " "`
7481     if test "x$has_space" != x; then
7482       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7483 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7484       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7485     fi
7486   fi
7487 
7488 
7489 if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
7490     # Add extra search paths on solaris for utilities like ar and as etc...
7491     PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
7492 fi
7493 
7494 # You can force the sys-root if the sys-root encoded into the cross compiler tools
7495 # is not correct.
7496 
7497 # Check whether --with-sys-root was given.
7498 if test "${with_sys_root+set}" = set; then :
7499   withval=$with_sys_root;
7500 fi
7501 
7502 
7503 if test "x$with_sys_root" != x; then
7504   SYS_ROOT=$with_sys_root
7505 else
7506   SYS_ROOT=/
7507 fi
7508 
7509 
7510 
7511 # Check whether --with-tools-dir was given.
7512 if test "${with_tools_dir+set}" = set; then :
7513   withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
7514 fi
7515 
7516 
7517 
7518 # Check whether --with-devkit was given.
7519 if test "${with_devkit+set}" = set; then :
7520   withval=$with_devkit;
7521     if test "x$with_sys_root" != x; then
7522       as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
7523     fi
7524     if test "x$with_tools_dir" != x; then
7525       as_fn_error $? "Cannot specify both --with-devkit and --with-tools-dir at the same time" "$LINENO" 5
7526     fi
7527     TOOLS_DIR=$with_devkit/bin
7528     SYS_ROOT=$with_devkit/$host_alias/libc
7529 
7530 fi
7531 
7532 
7533 
7534 
7535 # Setup default logging of stdout and stderr to build.log in the output root.
7536 BUILD_LOG='$(OUTPUT_ROOT)/build.log'
7537 BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
7538 BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
7539 
7540 
7541 
7542 
7543 
7544 # Check if it's a pure open build or if custom sources are to be used.
7545 
7546   # Check whether --enable-openjdk-only was given.
7547 if test "${enable_openjdk_only+set}" = set; then :
7548   enableval=$enable_openjdk_only;
7549 else
7550   enable_openjdk_only="no"
7551 fi
7552 
7553 
7554   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
7555 $as_echo_n "checking for presence of closed sources... " >&6; }
7556   if test -d "$SRC_ROOT/jdk/src/closed"; then
7557     CLOSED_SOURCE_PRESENT=yes
7558   else
7559     CLOSED_SOURCE_PRESENT=no
7560   fi
7561   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
7562 $as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
7563 
7564   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
7565 $as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
7566   SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
7567   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
7568 $as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
7569 
7570   if test "x$CLOSED_SOURCE_PRESENT" = xno; then
7571     OPENJDK=true
7572     if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7573       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
7574 $as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
7575     fi
7576   else
7577     if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7578       OPENJDK=true
7579     else
7580       OPENJDK=false
7581     fi
7582   fi
7583 
7584   if test "x$OPENJDK" = "xtrue"; then
7585     SET_OPENJDK="OPENJDK=true"
7586   fi
7587 
7588 
7589 
7590 
7591 # These are needed to be able to create a configuration name (and thus the output directory)
7592 
7593 ###############################################################################
7594 #
7595 # Check which variant of the JDK that we want to build.
7596 # Currently we have:
7597 #    normal:   standard edition
7598 # but the custom make system may add other variants
7599 #
7600 # Effectively the JDK variant gives a name to a specific set of
7601 # modules to compile into the JDK. In the future, these modules
7602 # might even be Jigsaw modules.
7603 #
7604 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
7605 $as_echo_n "checking which variant of the JDK to build... " >&6; }
7606 
7607 # Check whether --with-jdk-variant was given.
7608 if test "${with_jdk_variant+set}" = set; then :
7609   withval=$with_jdk_variant;
7610 fi
7611 
7612 
7613 if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7614     JDK_VARIANT="normal"
7615 else
7616     as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7617 fi
7618 
7619 
7620 
7621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
7622 $as_echo "$JDK_VARIANT" >&6; }
7623 
7624 
7625 
7626 ###############################################################################
7627 #
7628 # Check which variants of the JVM that we want to build.
7629 # Currently we have:
7630 #    server: normal interpreter and a tiered C1/C2 compiler
7631 #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
7632 #    minimal1: reduced form of client with optional VM services and features stripped out
7633 #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
7634 #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
7635 #    zero: no machine code interpreter, no compiler
7636 #    zeroshark: zero interpreter and shark/llvm compiler backend
7637 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
7638 $as_echo_n "checking which variants of the JVM to build... " >&6; }
7639 
7640 # Check whether --with-jvm-variants was given.
7641 if test "${with_jvm_variants+set}" = set; then :
7642   withval=$with_jvm_variants;
7643 fi
7644 
7645 
7646 if test "x$with_jvm_variants" = x; then
7647      with_jvm_variants="server"
7648 fi
7649 
7650 JVM_VARIANTS=",$with_jvm_variants,"
7651 TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
7652 
7653 if test "x$TEST_VARIANTS" != "x,"; then
7654    as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark" "$LINENO" 5
7655 fi
7656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7657 $as_echo "$with_jvm_variants" >&6; }
7658 
7659 JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7660 JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7661 JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
7662 JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7663 JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7664 JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7665 
7666 if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7667     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7668         as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
7669     fi
7670 fi
7671 if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7672     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7673         as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
7674     fi
7675 fi
7676 if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7677     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7678         as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
7679     fi
7680 fi
7681 
7682 # Replace the commas with AND for use in the build directory name.
7683 ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
7684 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/'`
7685 if test "x$COUNT_VARIANTS" != "x,1"; then
7686     BUILDING_MULTIPLE_JVM_VARIANTS=yes
7687 else
7688     BUILDING_MULTIPLE_JVM_VARIANTS=no
7689 fi
7690 
7691 
7692 
7693 
7694 
7695 
7696 
7697 
7698 
7699 if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7700    MACOSX_UNIVERSAL="true"
7701 fi
7702 
7703 
7704 
7705 
7706 
7707 ###############################################################################
7708 #
7709 # Set the debug level
7710 #    release: no debug information, all optimizations, no asserts.
7711 #    fastdebug: debug information (-g), all optimizations, all asserts
7712 #    slowdebug: debug information (-g), no optimizations, all asserts
7713 #
7714 DEBUG_LEVEL="release"
7715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
7716 $as_echo_n "checking which debug level to use... " >&6; }
7717 # Check whether --enable-debug was given.
7718 if test "${enable_debug+set}" = set; then :
7719   enableval=$enable_debug;
7720         ENABLE_DEBUG="${enableval}"
7721         DEBUG_LEVEL="fastdebug"
7722 
7723 else
7724   ENABLE_DEBUG="no"
7725 fi
7726 
7727 
7728 
7729 # Check whether --with-debug-level was given.
7730 if test "${with_debug_level+set}" = set; then :
7731   withval=$with_debug_level;
7732         DEBUG_LEVEL="${withval}"
7733         if test "x$ENABLE_DEBUG" = xyes; then
7734                         as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
7735         fi
7736 
7737 fi
7738 
7739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
7740 $as_echo "$DEBUG_LEVEL" >&6; }
7741 
7742 if test "x$DEBUG_LEVEL" != xrelease && \
7743    test "x$DEBUG_LEVEL" != xfastdebug && \
7744    test "x$DEBUG_LEVEL" != xslowdebug; then
7745    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
7746 fi
7747 
7748 
7749 ###############################################################################
7750 #
7751 # Setup legacy vars/targets and new vars to deal with different debug levels.
7752 #
7753 
7754 case $DEBUG_LEVEL in
7755       release )
7756           VARIANT="OPT"
7757           FASTDEBUG="false"
7758           DEBUG_CLASSFILES="false"
7759           BUILD_VARIANT_RELEASE=""
7760           HOTSPOT_DEBUG_LEVEL="product"
7761           HOTSPOT_EXPORT="product"
7762            ;;
7763       fastdebug )
7764           VARIANT="DBG"
7765           FASTDEBUG="true"
7766           DEBUG_CLASSFILES="true"
7767           BUILD_VARIANT_RELEASE="-fastdebug"
7768           HOTSPOT_DEBUG_LEVEL="fastdebug"
7769           HOTSPOT_EXPORT="fastdebug"
7770            ;;
7771       slowdebug )
7772           VARIANT="DBG"
7773           FASTDEBUG="false"
7774           DEBUG_CLASSFILES="true"
7775           BUILD_VARIANT_RELEASE="-debug"
7776           HOTSPOT_DEBUG_LEVEL="jvmg"
7777           HOTSPOT_EXPORT="debug"
7778            ;;
7779 esac
7780 
7781 #####
7782 # Generate the legacy makefile targets for hotspot.
7783 # The hotspot api for selecting the build artifacts, really, needs to be improved.
7784 # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
7785 # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
7786 # But until then ...
7787 HOTSPOT_TARGET=""
7788 
7789 if test "x$JVM_VARIANT_SERVER" = xtrue; then
7790     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
7791 fi
7792 
7793 if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7794     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
7795 fi
7796 
7797 if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7798     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
7799 fi
7800 
7801 if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7802     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
7803 fi
7804 
7805 if test "x$JVM_VARIANT_ZERO" = xtrue; then
7806     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
7807 fi
7808 
7809 if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
7810     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
7811 fi
7812 
7813 HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
7814 
7815 # On Macosx universal binaries are produced, but they only contain
7816 # 64 bit intel. This invalidates control of which jvms are built
7817 # from configure, but only server is valid anyway. Fix this
7818 # when hotspot makefiles are rewritten.
7819 if test "x$MACOSX_UNIVERSAL" = xtrue; then
7820     HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
7821 fi
7822 
7823 #####
7824 
7825 
7826 
7827 
7828 
7829 
7830 
7831 
7832 # With basic setup done, call the custom early hook.
7833 
7834 
7835 # To properly create a configuration name, we need to have the OpenJDK target
7836 # and options (variants and debug level) parsed.
7837 
7838 
7839 
7840 # Check whether --with-conf-name was given.
7841 if test "${with_conf_name+set}" = set; then :
7842   withval=$with_conf_name;  CONF_NAME=${with_conf_name}
7843 fi
7844 
7845 
7846 # Test from where we are running configure, in or outside of src root.
7847 # To enable comparison of directories, CURDIR needs to be symlink free
7848 # just like SRC_ROOT already is
7849 NOSYM_CURDIR="$CURDIR"
7850 
7851     if test "x$OPENJDK_BUILD_OS" != xwindows; then
7852         # Follow a chain of symbolic links. Use readlink
7853         # where it exists, else fall back to horribly
7854         # complicated shell code.
7855         if test "x$READLINK_TESTED" != yes; then
7856             # On MacOSX there is a readlink tool with a different
7857             # purpose than the GNU readlink tool. Check the found readlink.
7858             ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
7859             if test "x$ISGNU" = x; then
7860                  # A readlink that we do not know how to use.
7861                  # Are there other non-GNU readlinks out there?
7862                  READLINK_TESTED=yes
7863                  READLINK=
7864             fi
7865         fi
7866 
7867         if test "x$READLINK" != x; then
7868             NOSYM_CURDIR=`$READLINK -f $NOSYM_CURDIR`
7869         else
7870             # Save the current directory for restoring afterwards
7871             STARTDIR=$PWD
7872             COUNTER=0
7873             sym_link_dir=`$DIRNAME $NOSYM_CURDIR`
7874             sym_link_file=`$BASENAME $NOSYM_CURDIR`
7875             # Use the system pwd and not the shell builtin to resolve directory symlinks
7876             cd $sym_link_dir
7877             cd `$THEPWDCMD`
7878             sym_link_dir=`$THEPWDCMD`
7879             # Resolve file symlinks
7880             while test $COUNTER -lt 20; do
7881                 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
7882                 if test "x$ISLINK" == x; then
7883                     # This is not a symbolic link! We are done!
7884                     break
7885                 fi
7886                 # Again resolve directory symlinks since the target of the just found
7887                 # link could be in a different directory
7888                 cd `$DIRNAME $ISLINK`
7889                 sym_link_dir=`$THEPWDCMD`
7890                 sym_link_file=`$BASENAME $ISLINK`
7891                 let COUNTER=COUNTER+1
7892             done
7893             cd $STARTDIR
7894             NOSYM_CURDIR=$sym_link_dir/$sym_link_file
7895         fi
7896     fi
7897 
7898 if test "x$NOSYM_CURDIR" = "x$SRC_ROOT" || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common" \
7899         || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/autoconf" \
7900         || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
7901     # We are running configure from the src root.
7902     # Create a default ./build/target-variant-debuglevel output root.
7903     if test "x${CONF_NAME}" = x; then
7904         CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
7905     fi
7906     OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
7907     $MKDIR -p "$OUTPUT_ROOT"
7908     if test ! -d "$OUTPUT_ROOT"; then
7909         as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
7910     fi
7911 else
7912     # We are running configure from outside of the src dir.
7913     # Then use the current directory as output dir!
7914     # If configuration is situated in normal build directory, just use the build
7915     # directory name as configuration name, otherwise use the complete path.
7916     if test "x${CONF_NAME}" = x; then
7917         CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
7918     fi
7919     OUTPUT_ROOT="$CURDIR"
7920 
7921     # WARNING: This might be a bad thing to do. You need to be sure you want to
7922     # have a configuration in this directory. Do some sanity checks!
7923 
7924     if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
7925       # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
7926       # other files
7927       files_present=`$LS $OUTPUT_ROOT`
7928       # Configure has already touched config.log and confdefs.h in the current dir when this check
7929       # is performed.
7930       filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
7931                                              | $TR -d '\n'`
7932       if test "x$filtered_files" != x; then
7933         { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
7934 $as_echo "$as_me: Current directory is $CURDIR." >&6;}
7935         { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
7936 $as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
7937         { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
7938 $as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
7939         { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
7940 $as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
7941         { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
7942 $as_echo "$as_me: seriously mess up just about everything." >&6;}
7943         { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
7944 $as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
7945         { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
7946 $as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
7947         as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
7948       fi
7949     fi
7950 fi
7951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
7952 $as_echo_n "checking what configuration name to use... " >&6; }
7953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
7954 $as_echo "$CONF_NAME" >&6; }
7955 
7956 
7957   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7958 
7959   # Input might be given as Windows format, start by converting to
7960   # unix format.
7961   path="$OUTPUT_ROOT"
7962   new_path=`$CYGPATH -u "$path"`
7963 
7964   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7965   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7966   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7967   # "foo.exe" is OK but "foo" is an error.
7968   #
7969   # This test is therefore slightly more accurate than "test -f" to check for file precense.
7970   # It is also a way to make sure we got the proper file name for the real test later on.
7971   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7972   if test "x$test_shortpath" = x; then
7973     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
7974 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
7975     as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
7976   fi
7977 
7978   # Call helper function which possibly converts this using DOS-style short mode.
7979   # If so, the updated path is stored in $new_path.
7980 
7981   input_path="$new_path"
7982   # Check if we need to convert this using DOS-style short mode. If the path
7983   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7984   # take no chances and rewrite it.
7985   # Note: m4 eats our [], so we need to use [ and ] instead.
7986   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7987   if test "x$has_forbidden_chars" != x; then
7988     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7989     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7990     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7991     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7992       # Going to short mode and back again did indeed matter. Since short mode is
7993       # case insensitive, let's make it lowercase to improve readability.
7994       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7995       # Now convert it back to Unix-stile (cygpath)
7996       input_path=`$CYGPATH -u "$shortmode_path"`
7997       new_path="$input_path"
7998     fi
7999   fi
8000 
8001   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8002   if test "x$test_cygdrive_prefix" = x; then
8003     # As a simple fix, exclude /usr/bin since it's not a real path.
8004     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
8005       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8006       # a path prefixed by /cygdrive for fixpath to work.
8007       new_path="$CYGWIN_ROOT_PATH$input_path"
8008     fi
8009   fi
8010 
8011 
8012   if test "x$path" != "x$new_path"; then
8013     OUTPUT_ROOT="$new_path"
8014     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8015 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8016   fi
8017 
8018   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8019 
8020   path="$OUTPUT_ROOT"
8021   has_colon=`$ECHO $path | $GREP ^.:`
8022   new_path="$path"
8023   if test "x$has_colon" = x; then
8024     # Not in mixed or Windows style, start by that.
8025     new_path=`cmd //c echo $path`
8026   fi
8027 
8028 
8029   input_path="$new_path"
8030   # Check if we need to convert this using DOS-style short mode. If the path
8031   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8032   # take no chances and rewrite it.
8033   # Note: m4 eats our [], so we need to use [ and ] instead.
8034   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8035   if test "x$has_forbidden_chars" != x; then
8036     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8037     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8038   fi
8039 
8040 
8041   windows_path="$new_path"
8042   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8043     unix_path=`$CYGPATH -u "$windows_path"`
8044     new_path="$unix_path"
8045   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8046     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8047     new_path="$unix_path"
8048   fi
8049 
8050   if test "x$path" != "x$new_path"; then
8051     OUTPUT_ROOT="$new_path"
8052     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8053 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8054   fi
8055 
8056   # Save the first 10 bytes of this path to the storage, so fixpath can work.
8057   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8058 
8059   else
8060     # We're on a posix platform. Hooray! :)
8061     path="$OUTPUT_ROOT"
8062 
8063     if test ! -f "$path" && test ! -d "$path"; then
8064       as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
8065     fi
8066 
8067     has_space=`$ECHO "$path" | $GREP " "`
8068     if test "x$has_space" != x; then
8069       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8070 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8071       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
8072     fi
8073   fi
8074 
8075 
8076 SPEC=$OUTPUT_ROOT/spec.gmk
8077 
8078 CONF_NAME=$CONF_NAME
8079 
8080 OUTPUT_ROOT=$OUTPUT_ROOT
8081 
8082 
8083 # Most of the probed defines are put into config.h
8084 ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
8085 
8086 # The spec.gmk file contains all variables for the make system.
8087 ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
8088 
8089 # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
8090 ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
8091 
8092 # The bootcycle-spec.gmk file contains support for boot cycle builds.
8093 ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
8094 
8095 # The compare.sh is used to compare the build output to other builds.
8096 ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
8097 
8098 # Spec.sh is currently used by compare-objects.sh
8099 ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
8100 
8101 # The generated Makefile knows where the spec.gmk is and where the source is.
8102 # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
8103 # which will look for generated configurations
8104 ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
8105 
8106 
8107 # Save the arguments given to us
8108 echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
8109 
8110 
8111 # Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
8112 
8113     for ac_prog in apt-get yum port pkgutil pkgadd
8114 do
8115   # Extract the first word of "$ac_prog", so it can be a program name with args.
8116 set dummy $ac_prog; ac_word=$2
8117 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8118 $as_echo_n "checking for $ac_word... " >&6; }
8119 if ${ac_cv_prog_PKGHANDLER+:} false; then :
8120   $as_echo_n "(cached) " >&6
8121 else
8122   if test -n "$PKGHANDLER"; then
8123   ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
8124 else
8125 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8126 for as_dir in $PATH
8127 do
8128   IFS=$as_save_IFS
8129   test -z "$as_dir" && as_dir=.
8130     for ac_exec_ext in '' $ac_executable_extensions; do
8131   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8132     ac_cv_prog_PKGHANDLER="$ac_prog"
8133     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8134     break 2
8135   fi
8136 done
8137   done
8138 IFS=$as_save_IFS
8139 
8140 fi
8141 fi
8142 PKGHANDLER=$ac_cv_prog_PKGHANDLER
8143 if test -n "$PKGHANDLER"; then
8144   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
8145 $as_echo "$PKGHANDLER" >&6; }
8146 else
8147   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8148 $as_echo "no" >&6; }
8149 fi
8150 
8151 
8152   test -n "$PKGHANDLER" && break
8153 done
8154 
8155 
8156 
8157 # Setup tools that requires more complex handling, or that is not needed by the configure script.
8158 
8159 
8160   # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
8161   if test "x$MAKE" != x; then
8162     # User has supplied a make, test it.
8163     if test ! -f "$MAKE"; then
8164       as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
8165     fi
8166 
8167   MAKE_CANDIDATE=""$MAKE""
8168   DESCRIPTION="user supplied MAKE=$MAKE"
8169   if test "x$MAKE_CANDIDATE" != x; then
8170     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8171 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8172     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8173     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8174     if test "x$IS_GNU_MAKE" = x; then
8175       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8176 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8177     else
8178       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8179       if test "x$IS_MODERN_MAKE" = x; then
8180         { $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
8181 $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;}
8182       else
8183         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8184           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8185             MAKE_EXPECTED_ENV='cygwin'
8186           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8187             MAKE_EXPECTED_ENV='msys'
8188           else
8189             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8190           fi
8191           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8192           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8193         else
8194           # Not relevant for non-Windows
8195           IS_MAKE_CORRECT_ENV=true
8196         fi
8197         if test "x$IS_MAKE_CORRECT_ENV" = x; then
8198           { $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
8199 $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;}
8200         else
8201           FOUND_MAKE=$MAKE_CANDIDATE
8202 
8203   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8204 
8205   # First separate the path from the arguments. This will split at the first
8206   # space.
8207   complete="$FOUND_MAKE"
8208   path="${complete%% *}"
8209   tmp="$complete EOL"
8210   arguments="${tmp#* }"
8211 
8212   # Input might be given as Windows format, start by converting to
8213   # unix format.
8214   new_path=`$CYGPATH -u "$path"`
8215 
8216   # Now try to locate executable using which
8217   new_path=`$WHICH "$new_path" 2> /dev/null`
8218   # bat and cmd files are not always considered executable in cygwin causing which
8219   # to not find them
8220   if test "x$new_path" = x \
8221            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8222            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8223     new_path=`$CYGPATH -u "$path"`
8224   fi
8225   if test "x$new_path" = x; then
8226     # Oops. Which didn't find the executable.
8227     # The splitting of arguments from the executable at a space might have been incorrect,
8228     # since paths with space are more likely in Windows. Give it another try with the whole
8229     # argument.
8230     path="$complete"
8231     arguments="EOL"
8232     new_path=`$CYGPATH -u "$path"`
8233     new_path=`$WHICH "$new_path" 2> /dev/null`
8234     # bat and cmd files are not always considered executable in cygwin causing which
8235     # to not find them
8236     if test "x$new_path" = x \
8237              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8238              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8239       new_path=`$CYGPATH -u "$path"`
8240     fi
8241     if test "x$new_path" = x; then
8242       # It's still not found. Now this is an unrecoverable error.
8243       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8244 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8245       has_space=`$ECHO "$complete" | $GREP " "`
8246       if test "x$has_space" != x; then
8247         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8248 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8249       fi
8250       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8251     fi
8252   fi
8253 
8254   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8255   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8256   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8257   # "foo.exe" is OK but "foo" is an error.
8258   #
8259   # This test is therefore slightly more accurate than "test -f" to check for file precense.
8260   # It is also a way to make sure we got the proper file name for the real test later on.
8261   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8262   if test "x$test_shortpath" = x; then
8263     # Short path failed, file does not exist as specified.
8264     # Try adding .exe or .cmd
8265     if test -f "${new_path}.exe"; then
8266        input_to_shortpath="${new_path}.exe"
8267     elif test -f "${new_path}.cmd"; then
8268        input_to_shortpath="${new_path}.cmd"
8269     else
8270       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8271 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8272       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8273 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8274       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8275     fi
8276   else
8277     input_to_shortpath="$new_path"
8278   fi
8279 
8280   # Call helper function which possibly converts this using DOS-style short mode.
8281   # If so, the updated path is stored in $new_path.
8282   new_path="$input_to_shortpath"
8283 
8284   input_path="$input_to_shortpath"
8285   # Check if we need to convert this using DOS-style short mode. If the path
8286   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8287   # take no chances and rewrite it.
8288   # Note: m4 eats our [], so we need to use [ and ] instead.
8289   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8290   if test "x$has_forbidden_chars" != x; then
8291     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8292     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8293     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8294     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8295       # Going to short mode and back again did indeed matter. Since short mode is
8296       # case insensitive, let's make it lowercase to improve readability.
8297       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8298       # Now convert it back to Unix-stile (cygpath)
8299       input_path=`$CYGPATH -u "$shortmode_path"`
8300       new_path="$input_path"
8301     fi
8302   fi
8303 
8304   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8305   if test "x$test_cygdrive_prefix" = x; then
8306     # As a simple fix, exclude /usr/bin since it's not a real path.
8307     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8308       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8309       # a path prefixed by /cygdrive for fixpath to work.
8310       new_path="$CYGWIN_ROOT_PATH$input_path"
8311     fi
8312   fi
8313 
8314   # remove trailing .exe if any
8315   new_path="${new_path/%.exe/}"
8316 
8317   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8318 
8319   # First separate the path from the arguments. This will split at the first
8320   # space.
8321   complete="$FOUND_MAKE"
8322   path="${complete%% *}"
8323   tmp="$complete EOL"
8324   arguments="${tmp#* }"
8325 
8326   # Input might be given as Windows format, start by converting to
8327   # unix format.
8328   new_path="$path"
8329 
8330   windows_path="$new_path"
8331   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8332     unix_path=`$CYGPATH -u "$windows_path"`
8333     new_path="$unix_path"
8334   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8335     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8336     new_path="$unix_path"
8337   fi
8338 
8339 
8340   # Now try to locate executable using which
8341   new_path=`$WHICH "$new_path" 2> /dev/null`
8342 
8343   if test "x$new_path" = x; then
8344     # Oops. Which didn't find the executable.
8345     # The splitting of arguments from the executable at a space might have been incorrect,
8346     # since paths with space are more likely in Windows. Give it another try with the whole
8347     # argument.
8348     path="$complete"
8349     arguments="EOL"
8350     new_path="$path"
8351 
8352   windows_path="$new_path"
8353   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8354     unix_path=`$CYGPATH -u "$windows_path"`
8355     new_path="$unix_path"
8356   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8357     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8358     new_path="$unix_path"
8359   fi
8360 
8361 
8362     new_path=`$WHICH "$new_path" 2> /dev/null`
8363 
8364     if test "x$new_path" = x; then
8365       # It's still not found. Now this is an unrecoverable error.
8366       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8367 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8368       has_space=`$ECHO "$complete" | $GREP " "`
8369       if test "x$has_space" != x; then
8370         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8371 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8372       fi
8373       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8374     fi
8375   fi
8376 
8377   # Now new_path has a complete unix path to the binary
8378   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8379     # Keep paths in /bin as-is, but remove trailing .exe if any
8380     new_path="${new_path/%.exe/}"
8381     # Do not save /bin paths to all_fixpath_prefixes!
8382   else
8383     # Not in mixed or Windows style, start by that.
8384     new_path=`cmd //c echo $new_path`
8385 
8386   input_path="$new_path"
8387   # Check if we need to convert this using DOS-style short mode. If the path
8388   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8389   # take no chances and rewrite it.
8390   # Note: m4 eats our [], so we need to use [ and ] instead.
8391   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8392   if test "x$has_forbidden_chars" != x; then
8393     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8394     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8395   fi
8396 
8397     # Output is in $new_path
8398 
8399   windows_path="$new_path"
8400   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8401     unix_path=`$CYGPATH -u "$windows_path"`
8402     new_path="$unix_path"
8403   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8404     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8405     new_path="$unix_path"
8406   fi
8407 
8408     # remove trailing .exe if any
8409     new_path="${new_path/%.exe/}"
8410 
8411     # Save the first 10 bytes of this path to the storage, so fixpath can work.
8412     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8413   fi
8414 
8415   else
8416     # We're on a posix platform. Hooray! :)
8417     # First separate the path from the arguments. This will split at the first
8418     # space.
8419     complete="$FOUND_MAKE"
8420     path="${complete%% *}"
8421     tmp="$complete EOL"
8422     arguments="${tmp#* }"
8423 
8424     # Cannot rely on the command "which" here since it doesn't always work.
8425     is_absolute_path=`$ECHO "$path" | $GREP ^/`
8426     if test -z "$is_absolute_path"; then
8427       # Path to executable is not absolute. Find it.
8428       IFS_save="$IFS"
8429       IFS=:
8430       for p in $PATH; do
8431         if test -f "$p/$path" && test -x "$p/$path"; then
8432           new_path="$p/$path"
8433           break
8434         fi
8435       done
8436       IFS="$IFS_save"
8437     else
8438       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8439 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8440       new_path="$path"
8441     fi
8442 
8443     if test "x$new_path" = x; then
8444         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8445 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8446         has_space=`$ECHO "$complete" | $GREP " "`
8447         if test "x$has_space" != x; then
8448           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8449 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8450         fi
8451         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8452       fi
8453   fi
8454 
8455       # Now join together the path and the arguments once again
8456       if test "x$arguments" != xEOL; then
8457         new_complete="$new_path ${arguments% *}"
8458       else
8459         new_complete="$new_path"
8460       fi
8461 
8462   if test "x$complete" != "x$new_complete"; then
8463       FOUND_MAKE="$new_complete"
8464       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8465 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8466     fi
8467 
8468         fi
8469       fi
8470     fi
8471   fi
8472 
8473     if test "x$FOUND_MAKE" = x; then
8474       as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
8475     fi
8476   else
8477     # Try our hardest to locate a correct version of GNU make
8478     for ac_prog in gmake
8479 do
8480   # Extract the first word of "$ac_prog", so it can be a program name with args.
8481 set dummy $ac_prog; ac_word=$2
8482 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8483 $as_echo_n "checking for $ac_word... " >&6; }
8484 if ${ac_cv_path_CHECK_GMAKE+:} false; then :
8485   $as_echo_n "(cached) " >&6
8486 else
8487   case $CHECK_GMAKE in
8488   [\\/]* | ?:[\\/]*)
8489   ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
8490   ;;
8491   *)
8492   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8493 for as_dir in $PATH
8494 do
8495   IFS=$as_save_IFS
8496   test -z "$as_dir" && as_dir=.
8497     for ac_exec_ext in '' $ac_executable_extensions; do
8498   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8499     ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8500     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8501     break 2
8502   fi
8503 done
8504   done
8505 IFS=$as_save_IFS
8506 
8507   ;;
8508 esac
8509 fi
8510 CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
8511 if test -n "$CHECK_GMAKE"; then
8512   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
8513 $as_echo "$CHECK_GMAKE" >&6; }
8514 else
8515   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8516 $as_echo "no" >&6; }
8517 fi
8518 
8519 
8520   test -n "$CHECK_GMAKE" && break
8521 done
8522 
8523 
8524   MAKE_CANDIDATE=""$CHECK_GMAKE""
8525   DESCRIPTION="gmake in PATH"
8526   if test "x$MAKE_CANDIDATE" != x; then
8527     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8528 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8529     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8530     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8531     if test "x$IS_GNU_MAKE" = x; then
8532       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8533 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8534     else
8535       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8536       if test "x$IS_MODERN_MAKE" = x; then
8537         { $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
8538 $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;}
8539       else
8540         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8541           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8542             MAKE_EXPECTED_ENV='cygwin'
8543           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8544             MAKE_EXPECTED_ENV='msys'
8545           else
8546             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8547           fi
8548           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8549           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8550         else
8551           # Not relevant for non-Windows
8552           IS_MAKE_CORRECT_ENV=true
8553         fi
8554         if test "x$IS_MAKE_CORRECT_ENV" = x; then
8555           { $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
8556 $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;}
8557         else
8558           FOUND_MAKE=$MAKE_CANDIDATE
8559 
8560   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8561 
8562   # First separate the path from the arguments. This will split at the first
8563   # space.
8564   complete="$FOUND_MAKE"
8565   path="${complete%% *}"
8566   tmp="$complete EOL"
8567   arguments="${tmp#* }"
8568 
8569   # Input might be given as Windows format, start by converting to
8570   # unix format.
8571   new_path=`$CYGPATH -u "$path"`
8572 
8573   # Now try to locate executable using which
8574   new_path=`$WHICH "$new_path" 2> /dev/null`
8575   # bat and cmd files are not always considered executable in cygwin causing which
8576   # to not find them
8577   if test "x$new_path" = x \
8578            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8579            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8580     new_path=`$CYGPATH -u "$path"`
8581   fi
8582   if test "x$new_path" = x; then
8583     # Oops. Which didn't find the executable.
8584     # The splitting of arguments from the executable at a space might have been incorrect,
8585     # since paths with space are more likely in Windows. Give it another try with the whole
8586     # argument.
8587     path="$complete"
8588     arguments="EOL"
8589     new_path=`$CYGPATH -u "$path"`
8590     new_path=`$WHICH "$new_path" 2> /dev/null`
8591     # bat and cmd files are not always considered executable in cygwin causing which
8592     # to not find them
8593     if test "x$new_path" = x \
8594              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8595              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8596       new_path=`$CYGPATH -u "$path"`
8597     fi
8598     if test "x$new_path" = x; then
8599       # It's still not found. Now this is an unrecoverable error.
8600       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8601 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8602       has_space=`$ECHO "$complete" | $GREP " "`
8603       if test "x$has_space" != x; then
8604         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8605 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8606       fi
8607       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8608     fi
8609   fi
8610 
8611   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8612   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8613   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8614   # "foo.exe" is OK but "foo" is an error.
8615   #
8616   # This test is therefore slightly more accurate than "test -f" to check for file precense.
8617   # It is also a way to make sure we got the proper file name for the real test later on.
8618   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8619   if test "x$test_shortpath" = x; then
8620     # Short path failed, file does not exist as specified.
8621     # Try adding .exe or .cmd
8622     if test -f "${new_path}.exe"; then
8623        input_to_shortpath="${new_path}.exe"
8624     elif test -f "${new_path}.cmd"; then
8625        input_to_shortpath="${new_path}.cmd"
8626     else
8627       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8628 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8629       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8630 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8631       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8632     fi
8633   else
8634     input_to_shortpath="$new_path"
8635   fi
8636 
8637   # Call helper function which possibly converts this using DOS-style short mode.
8638   # If so, the updated path is stored in $new_path.
8639   new_path="$input_to_shortpath"
8640 
8641   input_path="$input_to_shortpath"
8642   # Check if we need to convert this using DOS-style short mode. If the path
8643   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8644   # take no chances and rewrite it.
8645   # Note: m4 eats our [], so we need to use [ and ] instead.
8646   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8647   if test "x$has_forbidden_chars" != x; then
8648     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8649     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8650     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8651     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8652       # Going to short mode and back again did indeed matter. Since short mode is
8653       # case insensitive, let's make it lowercase to improve readability.
8654       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8655       # Now convert it back to Unix-stile (cygpath)
8656       input_path=`$CYGPATH -u "$shortmode_path"`
8657       new_path="$input_path"
8658     fi
8659   fi
8660 
8661   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8662   if test "x$test_cygdrive_prefix" = x; then
8663     # As a simple fix, exclude /usr/bin since it's not a real path.
8664     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8665       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8666       # a path prefixed by /cygdrive for fixpath to work.
8667       new_path="$CYGWIN_ROOT_PATH$input_path"
8668     fi
8669   fi
8670 
8671   # remove trailing .exe if any
8672   new_path="${new_path/%.exe/}"
8673 
8674   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8675 
8676   # First separate the path from the arguments. This will split at the first
8677   # space.
8678   complete="$FOUND_MAKE"
8679   path="${complete%% *}"
8680   tmp="$complete EOL"
8681   arguments="${tmp#* }"
8682 
8683   # Input might be given as Windows format, start by converting to
8684   # unix format.
8685   new_path="$path"
8686 
8687   windows_path="$new_path"
8688   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8689     unix_path=`$CYGPATH -u "$windows_path"`
8690     new_path="$unix_path"
8691   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8692     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8693     new_path="$unix_path"
8694   fi
8695 
8696 
8697   # Now try to locate executable using which
8698   new_path=`$WHICH "$new_path" 2> /dev/null`
8699 
8700   if test "x$new_path" = x; then
8701     # Oops. Which didn't find the executable.
8702     # The splitting of arguments from the executable at a space might have been incorrect,
8703     # since paths with space are more likely in Windows. Give it another try with the whole
8704     # argument.
8705     path="$complete"
8706     arguments="EOL"
8707     new_path="$path"
8708 
8709   windows_path="$new_path"
8710   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8711     unix_path=`$CYGPATH -u "$windows_path"`
8712     new_path="$unix_path"
8713   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8714     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8715     new_path="$unix_path"
8716   fi
8717 
8718 
8719     new_path=`$WHICH "$new_path" 2> /dev/null`
8720 
8721     if test "x$new_path" = x; then
8722       # It's still not found. Now this is an unrecoverable error.
8723       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8724 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8725       has_space=`$ECHO "$complete" | $GREP " "`
8726       if test "x$has_space" != x; then
8727         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8728 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8729       fi
8730       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8731     fi
8732   fi
8733 
8734   # Now new_path has a complete unix path to the binary
8735   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8736     # Keep paths in /bin as-is, but remove trailing .exe if any
8737     new_path="${new_path/%.exe/}"
8738     # Do not save /bin paths to all_fixpath_prefixes!
8739   else
8740     # Not in mixed or Windows style, start by that.
8741     new_path=`cmd //c echo $new_path`
8742 
8743   input_path="$new_path"
8744   # Check if we need to convert this using DOS-style short mode. If the path
8745   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8746   # take no chances and rewrite it.
8747   # Note: m4 eats our [], so we need to use [ and ] instead.
8748   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8749   if test "x$has_forbidden_chars" != x; then
8750     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8751     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8752   fi
8753 
8754     # Output is in $new_path
8755 
8756   windows_path="$new_path"
8757   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8758     unix_path=`$CYGPATH -u "$windows_path"`
8759     new_path="$unix_path"
8760   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8761     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8762     new_path="$unix_path"
8763   fi
8764 
8765     # remove trailing .exe if any
8766     new_path="${new_path/%.exe/}"
8767 
8768     # Save the first 10 bytes of this path to the storage, so fixpath can work.
8769     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8770   fi
8771 
8772   else
8773     # We're on a posix platform. Hooray! :)
8774     # First separate the path from the arguments. This will split at the first
8775     # space.
8776     complete="$FOUND_MAKE"
8777     path="${complete%% *}"
8778     tmp="$complete EOL"
8779     arguments="${tmp#* }"
8780 
8781     # Cannot rely on the command "which" here since it doesn't always work.
8782     is_absolute_path=`$ECHO "$path" | $GREP ^/`
8783     if test -z "$is_absolute_path"; then
8784       # Path to executable is not absolute. Find it.
8785       IFS_save="$IFS"
8786       IFS=:
8787       for p in $PATH; do
8788         if test -f "$p/$path" && test -x "$p/$path"; then
8789           new_path="$p/$path"
8790           break
8791         fi
8792       done
8793       IFS="$IFS_save"
8794     else
8795       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8796 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8797       new_path="$path"
8798     fi
8799 
8800     if test "x$new_path" = x; then
8801         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8802 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8803         has_space=`$ECHO "$complete" | $GREP " "`
8804         if test "x$has_space" != x; then
8805           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8806 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8807         fi
8808         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8809       fi
8810   fi
8811 
8812       # Now join together the path and the arguments once again
8813       if test "x$arguments" != xEOL; then
8814         new_complete="$new_path ${arguments% *}"
8815       else
8816         new_complete="$new_path"
8817       fi
8818 
8819   if test "x$complete" != "x$new_complete"; then
8820       FOUND_MAKE="$new_complete"
8821       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8822 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8823     fi
8824 
8825         fi
8826       fi
8827     fi
8828   fi
8829 
8830 
8831     if test "x$FOUND_MAKE" = x; then
8832       for ac_prog in make
8833 do
8834   # Extract the first word of "$ac_prog", so it can be a program name with args.
8835 set dummy $ac_prog; ac_word=$2
8836 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8837 $as_echo_n "checking for $ac_word... " >&6; }
8838 if ${ac_cv_path_CHECK_MAKE+:} false; then :
8839   $as_echo_n "(cached) " >&6
8840 else
8841   case $CHECK_MAKE in
8842   [\\/]* | ?:[\\/]*)
8843   ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
8844   ;;
8845   *)
8846   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8847 for as_dir in $PATH
8848 do
8849   IFS=$as_save_IFS
8850   test -z "$as_dir" && as_dir=.
8851     for ac_exec_ext in '' $ac_executable_extensions; do
8852   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8853     ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
8854     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8855     break 2
8856   fi
8857 done
8858   done
8859 IFS=$as_save_IFS
8860 
8861   ;;
8862 esac
8863 fi
8864 CHECK_MAKE=$ac_cv_path_CHECK_MAKE
8865 if test -n "$CHECK_MAKE"; then
8866   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
8867 $as_echo "$CHECK_MAKE" >&6; }
8868 else
8869   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8870 $as_echo "no" >&6; }
8871 fi
8872 
8873 
8874   test -n "$CHECK_MAKE" && break
8875 done
8876 
8877 
8878   MAKE_CANDIDATE=""$CHECK_MAKE""
8879   DESCRIPTION="make in PATH"
8880   if test "x$MAKE_CANDIDATE" != x; then
8881     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8882 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8883     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8884     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8885     if test "x$IS_GNU_MAKE" = x; then
8886       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8887 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8888     else
8889       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8890       if test "x$IS_MODERN_MAKE" = x; then
8891         { $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
8892 $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;}
8893       else
8894         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8895           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8896             MAKE_EXPECTED_ENV='cygwin'
8897           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8898             MAKE_EXPECTED_ENV='msys'
8899           else
8900             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8901           fi
8902           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8903           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8904         else
8905           # Not relevant for non-Windows
8906           IS_MAKE_CORRECT_ENV=true
8907         fi
8908         if test "x$IS_MAKE_CORRECT_ENV" = x; then
8909           { $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
8910 $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;}
8911         else
8912           FOUND_MAKE=$MAKE_CANDIDATE
8913 
8914   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8915 
8916   # First separate the path from the arguments. This will split at the first
8917   # space.
8918   complete="$FOUND_MAKE"
8919   path="${complete%% *}"
8920   tmp="$complete EOL"
8921   arguments="${tmp#* }"
8922 
8923   # Input might be given as Windows format, start by converting to
8924   # unix format.
8925   new_path=`$CYGPATH -u "$path"`
8926 
8927   # Now try to locate executable using which
8928   new_path=`$WHICH "$new_path" 2> /dev/null`
8929   # bat and cmd files are not always considered executable in cygwin causing which
8930   # to not find them
8931   if test "x$new_path" = x \
8932            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8933            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8934     new_path=`$CYGPATH -u "$path"`
8935   fi
8936   if test "x$new_path" = x; then
8937     # Oops. Which didn't find the executable.
8938     # The splitting of arguments from the executable at a space might have been incorrect,
8939     # since paths with space are more likely in Windows. Give it another try with the whole
8940     # argument.
8941     path="$complete"
8942     arguments="EOL"
8943     new_path=`$CYGPATH -u "$path"`
8944     new_path=`$WHICH "$new_path" 2> /dev/null`
8945     # bat and cmd files are not always considered executable in cygwin causing which
8946     # to not find them
8947     if test "x$new_path" = x \
8948              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8949              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8950       new_path=`$CYGPATH -u "$path"`
8951     fi
8952     if test "x$new_path" = x; then
8953       # It's still not found. Now this is an unrecoverable error.
8954       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8955 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8956       has_space=`$ECHO "$complete" | $GREP " "`
8957       if test "x$has_space" != x; then
8958         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8959 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8960       fi
8961       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8962     fi
8963   fi
8964 
8965   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8966   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8967   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8968   # "foo.exe" is OK but "foo" is an error.
8969   #
8970   # This test is therefore slightly more accurate than "test -f" to check for file precense.
8971   # It is also a way to make sure we got the proper file name for the real test later on.
8972   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8973   if test "x$test_shortpath" = x; then
8974     # Short path failed, file does not exist as specified.
8975     # Try adding .exe or .cmd
8976     if test -f "${new_path}.exe"; then
8977        input_to_shortpath="${new_path}.exe"
8978     elif test -f "${new_path}.cmd"; then
8979        input_to_shortpath="${new_path}.cmd"
8980     else
8981       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8982 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8983       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8984 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8985       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8986     fi
8987   else
8988     input_to_shortpath="$new_path"
8989   fi
8990 
8991   # Call helper function which possibly converts this using DOS-style short mode.
8992   # If so, the updated path is stored in $new_path.
8993   new_path="$input_to_shortpath"
8994 
8995   input_path="$input_to_shortpath"
8996   # Check if we need to convert this using DOS-style short mode. If the path
8997   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8998   # take no chances and rewrite it.
8999   # Note: m4 eats our [], so we need to use [ and ] instead.
9000   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9001   if test "x$has_forbidden_chars" != x; then
9002     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9003     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9004     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9005     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9006       # Going to short mode and back again did indeed matter. Since short mode is
9007       # case insensitive, let's make it lowercase to improve readability.
9008       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9009       # Now convert it back to Unix-stile (cygpath)
9010       input_path=`$CYGPATH -u "$shortmode_path"`
9011       new_path="$input_path"
9012     fi
9013   fi
9014 
9015   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9016   if test "x$test_cygdrive_prefix" = x; then
9017     # As a simple fix, exclude /usr/bin since it's not a real path.
9018     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9019       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9020       # a path prefixed by /cygdrive for fixpath to work.
9021       new_path="$CYGWIN_ROOT_PATH$input_path"
9022     fi
9023   fi
9024 
9025   # remove trailing .exe if any
9026   new_path="${new_path/%.exe/}"
9027 
9028   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9029 
9030   # First separate the path from the arguments. This will split at the first
9031   # space.
9032   complete="$FOUND_MAKE"
9033   path="${complete%% *}"
9034   tmp="$complete EOL"
9035   arguments="${tmp#* }"
9036 
9037   # Input might be given as Windows format, start by converting to
9038   # unix format.
9039   new_path="$path"
9040 
9041   windows_path="$new_path"
9042   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9043     unix_path=`$CYGPATH -u "$windows_path"`
9044     new_path="$unix_path"
9045   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9046     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9047     new_path="$unix_path"
9048   fi
9049 
9050 
9051   # Now try to locate executable using which
9052   new_path=`$WHICH "$new_path" 2> /dev/null`
9053 
9054   if test "x$new_path" = x; then
9055     # Oops. Which didn't find the executable.
9056     # The splitting of arguments from the executable at a space might have been incorrect,
9057     # since paths with space are more likely in Windows. Give it another try with the whole
9058     # argument.
9059     path="$complete"
9060     arguments="EOL"
9061     new_path="$path"
9062 
9063   windows_path="$new_path"
9064   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9065     unix_path=`$CYGPATH -u "$windows_path"`
9066     new_path="$unix_path"
9067   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9068     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9069     new_path="$unix_path"
9070   fi
9071 
9072 
9073     new_path=`$WHICH "$new_path" 2> /dev/null`
9074 
9075     if test "x$new_path" = x; then
9076       # It's still not found. Now this is an unrecoverable error.
9077       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9078 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9079       has_space=`$ECHO "$complete" | $GREP " "`
9080       if test "x$has_space" != x; then
9081         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9082 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9083       fi
9084       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9085     fi
9086   fi
9087 
9088   # Now new_path has a complete unix path to the binary
9089   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9090     # Keep paths in /bin as-is, but remove trailing .exe if any
9091     new_path="${new_path/%.exe/}"
9092     # Do not save /bin paths to all_fixpath_prefixes!
9093   else
9094     # Not in mixed or Windows style, start by that.
9095     new_path=`cmd //c echo $new_path`
9096 
9097   input_path="$new_path"
9098   # Check if we need to convert this using DOS-style short mode. If the path
9099   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9100   # take no chances and rewrite it.
9101   # Note: m4 eats our [], so we need to use [ and ] instead.
9102   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9103   if test "x$has_forbidden_chars" != x; then
9104     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9105     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9106   fi
9107 
9108     # Output is in $new_path
9109 
9110   windows_path="$new_path"
9111   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9112     unix_path=`$CYGPATH -u "$windows_path"`
9113     new_path="$unix_path"
9114   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9115     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9116     new_path="$unix_path"
9117   fi
9118 
9119     # remove trailing .exe if any
9120     new_path="${new_path/%.exe/}"
9121 
9122     # Save the first 10 bytes of this path to the storage, so fixpath can work.
9123     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9124   fi
9125 
9126   else
9127     # We're on a posix platform. Hooray! :)
9128     # First separate the path from the arguments. This will split at the first
9129     # space.
9130     complete="$FOUND_MAKE"
9131     path="${complete%% *}"
9132     tmp="$complete EOL"
9133     arguments="${tmp#* }"
9134 
9135     # Cannot rely on the command "which" here since it doesn't always work.
9136     is_absolute_path=`$ECHO "$path" | $GREP ^/`
9137     if test -z "$is_absolute_path"; then
9138       # Path to executable is not absolute. Find it.
9139       IFS_save="$IFS"
9140       IFS=:
9141       for p in $PATH; do
9142         if test -f "$p/$path" && test -x "$p/$path"; then
9143           new_path="$p/$path"
9144           break
9145         fi
9146       done
9147       IFS="$IFS_save"
9148     else
9149       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9150 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9151       new_path="$path"
9152     fi
9153 
9154     if test "x$new_path" = x; then
9155         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9156 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9157         has_space=`$ECHO "$complete" | $GREP " "`
9158         if test "x$has_space" != x; then
9159           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9160 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9161         fi
9162         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9163       fi
9164   fi
9165 
9166       # Now join together the path and the arguments once again
9167       if test "x$arguments" != xEOL; then
9168         new_complete="$new_path ${arguments% *}"
9169       else
9170         new_complete="$new_path"
9171       fi
9172 
9173   if test "x$complete" != "x$new_complete"; then
9174       FOUND_MAKE="$new_complete"
9175       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9176 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9177     fi
9178 
9179         fi
9180       fi
9181     fi
9182   fi
9183 
9184     fi
9185 
9186     if test "x$FOUND_MAKE" = x; then
9187       if test "x$TOOLS_DIR" != x; then
9188         # We have a tools-dir, check that as well before giving up.
9189         OLD_PATH=$PATH
9190         PATH=$TOOLS_DIR:$PATH
9191         for ac_prog in gmake
9192 do
9193   # Extract the first word of "$ac_prog", so it can be a program name with args.
9194 set dummy $ac_prog; ac_word=$2
9195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9196 $as_echo_n "checking for $ac_word... " >&6; }
9197 if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
9198   $as_echo_n "(cached) " >&6
9199 else
9200   case $CHECK_TOOLSDIR_GMAKE in
9201   [\\/]* | ?:[\\/]*)
9202   ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
9203   ;;
9204   *)
9205   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9206 for as_dir in $PATH
9207 do
9208   IFS=$as_save_IFS
9209   test -z "$as_dir" && as_dir=.
9210     for ac_exec_ext in '' $ac_executable_extensions; do
9211   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9212     ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
9213     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9214     break 2
9215   fi
9216 done
9217   done
9218 IFS=$as_save_IFS
9219 
9220   ;;
9221 esac
9222 fi
9223 CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
9224 if test -n "$CHECK_TOOLSDIR_GMAKE"; then
9225   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
9226 $as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
9227 else
9228   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9229 $as_echo "no" >&6; }
9230 fi
9231 
9232 
9233   test -n "$CHECK_TOOLSDIR_GMAKE" && break
9234 done
9235 
9236 
9237   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
9238   DESCRIPTION="gmake in tools-dir"
9239   if test "x$MAKE_CANDIDATE" != x; then
9240     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9241 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9242     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9243     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9244     if test "x$IS_GNU_MAKE" = x; then
9245       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9246 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9247     else
9248       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9249       if test "x$IS_MODERN_MAKE" = x; then
9250         { $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
9251 $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;}
9252       else
9253         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9254           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9255             MAKE_EXPECTED_ENV='cygwin'
9256           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9257             MAKE_EXPECTED_ENV='msys'
9258           else
9259             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9260           fi
9261           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9262           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9263         else
9264           # Not relevant for non-Windows
9265           IS_MAKE_CORRECT_ENV=true
9266         fi
9267         if test "x$IS_MAKE_CORRECT_ENV" = x; then
9268           { $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
9269 $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;}
9270         else
9271           FOUND_MAKE=$MAKE_CANDIDATE
9272 
9273   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9274 
9275   # First separate the path from the arguments. This will split at the first
9276   # space.
9277   complete="$FOUND_MAKE"
9278   path="${complete%% *}"
9279   tmp="$complete EOL"
9280   arguments="${tmp#* }"
9281 
9282   # Input might be given as Windows format, start by converting to
9283   # unix format.
9284   new_path=`$CYGPATH -u "$path"`
9285 
9286   # Now try to locate executable using which
9287   new_path=`$WHICH "$new_path" 2> /dev/null`
9288   # bat and cmd files are not always considered executable in cygwin causing which
9289   # to not find them
9290   if test "x$new_path" = x \
9291            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9292            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9293     new_path=`$CYGPATH -u "$path"`
9294   fi
9295   if test "x$new_path" = x; then
9296     # Oops. Which didn't find the executable.
9297     # The splitting of arguments from the executable at a space might have been incorrect,
9298     # since paths with space are more likely in Windows. Give it another try with the whole
9299     # argument.
9300     path="$complete"
9301     arguments="EOL"
9302     new_path=`$CYGPATH -u "$path"`
9303     new_path=`$WHICH "$new_path" 2> /dev/null`
9304     # bat and cmd files are not always considered executable in cygwin causing which
9305     # to not find them
9306     if test "x$new_path" = x \
9307              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9308              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9309       new_path=`$CYGPATH -u "$path"`
9310     fi
9311     if test "x$new_path" = x; then
9312       # It's still not found. Now this is an unrecoverable error.
9313       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9314 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9315       has_space=`$ECHO "$complete" | $GREP " "`
9316       if test "x$has_space" != x; then
9317         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9318 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9319       fi
9320       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9321     fi
9322   fi
9323 
9324   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9325   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9326   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9327   # "foo.exe" is OK but "foo" is an error.
9328   #
9329   # This test is therefore slightly more accurate than "test -f" to check for file precense.
9330   # It is also a way to make sure we got the proper file name for the real test later on.
9331   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9332   if test "x$test_shortpath" = x; then
9333     # Short path failed, file does not exist as specified.
9334     # Try adding .exe or .cmd
9335     if test -f "${new_path}.exe"; then
9336        input_to_shortpath="${new_path}.exe"
9337     elif test -f "${new_path}.cmd"; then
9338        input_to_shortpath="${new_path}.cmd"
9339     else
9340       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9341 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9342       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9343 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9344       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9345     fi
9346   else
9347     input_to_shortpath="$new_path"
9348   fi
9349 
9350   # Call helper function which possibly converts this using DOS-style short mode.
9351   # If so, the updated path is stored in $new_path.
9352   new_path="$input_to_shortpath"
9353 
9354   input_path="$input_to_shortpath"
9355   # Check if we need to convert this using DOS-style short mode. If the path
9356   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9357   # take no chances and rewrite it.
9358   # Note: m4 eats our [], so we need to use [ and ] instead.
9359   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9360   if test "x$has_forbidden_chars" != x; then
9361     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9362     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9363     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9364     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9365       # Going to short mode and back again did indeed matter. Since short mode is
9366       # case insensitive, let's make it lowercase to improve readability.
9367       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9368       # Now convert it back to Unix-stile (cygpath)
9369       input_path=`$CYGPATH -u "$shortmode_path"`
9370       new_path="$input_path"
9371     fi
9372   fi
9373 
9374   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9375   if test "x$test_cygdrive_prefix" = x; then
9376     # As a simple fix, exclude /usr/bin since it's not a real path.
9377     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9378       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9379       # a path prefixed by /cygdrive for fixpath to work.
9380       new_path="$CYGWIN_ROOT_PATH$input_path"
9381     fi
9382   fi
9383 
9384   # remove trailing .exe if any
9385   new_path="${new_path/%.exe/}"
9386 
9387   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9388 
9389   # First separate the path from the arguments. This will split at the first
9390   # space.
9391   complete="$FOUND_MAKE"
9392   path="${complete%% *}"
9393   tmp="$complete EOL"
9394   arguments="${tmp#* }"
9395 
9396   # Input might be given as Windows format, start by converting to
9397   # unix format.
9398   new_path="$path"
9399 
9400   windows_path="$new_path"
9401   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9402     unix_path=`$CYGPATH -u "$windows_path"`
9403     new_path="$unix_path"
9404   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9405     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9406     new_path="$unix_path"
9407   fi
9408 
9409 
9410   # Now try to locate executable using which
9411   new_path=`$WHICH "$new_path" 2> /dev/null`
9412 
9413   if test "x$new_path" = x; then
9414     # Oops. Which didn't find the executable.
9415     # The splitting of arguments from the executable at a space might have been incorrect,
9416     # since paths with space are more likely in Windows. Give it another try with the whole
9417     # argument.
9418     path="$complete"
9419     arguments="EOL"
9420     new_path="$path"
9421 
9422   windows_path="$new_path"
9423   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9424     unix_path=`$CYGPATH -u "$windows_path"`
9425     new_path="$unix_path"
9426   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9427     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9428     new_path="$unix_path"
9429   fi
9430 
9431 
9432     new_path=`$WHICH "$new_path" 2> /dev/null`
9433 
9434     if test "x$new_path" = x; then
9435       # It's still not found. Now this is an unrecoverable error.
9436       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9437 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9438       has_space=`$ECHO "$complete" | $GREP " "`
9439       if test "x$has_space" != x; then
9440         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9441 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9442       fi
9443       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9444     fi
9445   fi
9446 
9447   # Now new_path has a complete unix path to the binary
9448   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9449     # Keep paths in /bin as-is, but remove trailing .exe if any
9450     new_path="${new_path/%.exe/}"
9451     # Do not save /bin paths to all_fixpath_prefixes!
9452   else
9453     # Not in mixed or Windows style, start by that.
9454     new_path=`cmd //c echo $new_path`
9455 
9456   input_path="$new_path"
9457   # Check if we need to convert this using DOS-style short mode. If the path
9458   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9459   # take no chances and rewrite it.
9460   # Note: m4 eats our [], so we need to use [ and ] instead.
9461   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9462   if test "x$has_forbidden_chars" != x; then
9463     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9464     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9465   fi
9466 
9467     # Output is in $new_path
9468 
9469   windows_path="$new_path"
9470   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9471     unix_path=`$CYGPATH -u "$windows_path"`
9472     new_path="$unix_path"
9473   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9474     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9475     new_path="$unix_path"
9476   fi
9477 
9478     # remove trailing .exe if any
9479     new_path="${new_path/%.exe/}"
9480 
9481     # Save the first 10 bytes of this path to the storage, so fixpath can work.
9482     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9483   fi
9484 
9485   else
9486     # We're on a posix platform. Hooray! :)
9487     # First separate the path from the arguments. This will split at the first
9488     # space.
9489     complete="$FOUND_MAKE"
9490     path="${complete%% *}"
9491     tmp="$complete EOL"
9492     arguments="${tmp#* }"
9493 
9494     # Cannot rely on the command "which" here since it doesn't always work.
9495     is_absolute_path=`$ECHO "$path" | $GREP ^/`
9496     if test -z "$is_absolute_path"; then
9497       # Path to executable is not absolute. Find it.
9498       IFS_save="$IFS"
9499       IFS=:
9500       for p in $PATH; do
9501         if test -f "$p/$path" && test -x "$p/$path"; then
9502           new_path="$p/$path"
9503           break
9504         fi
9505       done
9506       IFS="$IFS_save"
9507     else
9508       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9509 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9510       new_path="$path"
9511     fi
9512 
9513     if test "x$new_path" = x; then
9514         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9515 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9516         has_space=`$ECHO "$complete" | $GREP " "`
9517         if test "x$has_space" != x; then
9518           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9519 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9520         fi
9521         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9522       fi
9523   fi
9524 
9525       # Now join together the path and the arguments once again
9526       if test "x$arguments" != xEOL; then
9527         new_complete="$new_path ${arguments% *}"
9528       else
9529         new_complete="$new_path"
9530       fi
9531 
9532   if test "x$complete" != "x$new_complete"; then
9533       FOUND_MAKE="$new_complete"
9534       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9535 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9536     fi
9537 
9538         fi
9539       fi
9540     fi
9541   fi
9542 
9543         if test "x$FOUND_MAKE" = x; then
9544           for ac_prog in make
9545 do
9546   # Extract the first word of "$ac_prog", so it can be a program name with args.
9547 set dummy $ac_prog; ac_word=$2
9548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9549 $as_echo_n "checking for $ac_word... " >&6; }
9550 if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
9551   $as_echo_n "(cached) " >&6
9552 else
9553   case $CHECK_TOOLSDIR_MAKE in
9554   [\\/]* | ?:[\\/]*)
9555   ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
9556   ;;
9557   *)
9558   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9559 for as_dir in $PATH
9560 do
9561   IFS=$as_save_IFS
9562   test -z "$as_dir" && as_dir=.
9563     for ac_exec_ext in '' $ac_executable_extensions; do
9564   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9565     ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
9566     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9567     break 2
9568   fi
9569 done
9570   done
9571 IFS=$as_save_IFS
9572 
9573   ;;
9574 esac
9575 fi
9576 CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
9577 if test -n "$CHECK_TOOLSDIR_MAKE"; then
9578   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
9579 $as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
9580 else
9581   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9582 $as_echo "no" >&6; }
9583 fi
9584 
9585 
9586   test -n "$CHECK_TOOLSDIR_MAKE" && break
9587 done
9588 
9589 
9590   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
9591   DESCRIPTION="make in tools-dir"
9592   if test "x$MAKE_CANDIDATE" != x; then
9593     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9594 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9595     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9596     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9597     if test "x$IS_GNU_MAKE" = x; then
9598       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9599 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9600     else
9601       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9602       if test "x$IS_MODERN_MAKE" = x; then
9603         { $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
9604 $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;}
9605       else
9606         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9607           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9608             MAKE_EXPECTED_ENV='cygwin'
9609           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9610             MAKE_EXPECTED_ENV='msys'
9611           else
9612             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9613           fi
9614           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9615           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9616         else
9617           # Not relevant for non-Windows
9618           IS_MAKE_CORRECT_ENV=true
9619         fi
9620         if test "x$IS_MAKE_CORRECT_ENV" = x; then
9621           { $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
9622 $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;}
9623         else
9624           FOUND_MAKE=$MAKE_CANDIDATE
9625 
9626   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9627 
9628   # First separate the path from the arguments. This will split at the first
9629   # space.
9630   complete="$FOUND_MAKE"
9631   path="${complete%% *}"
9632   tmp="$complete EOL"
9633   arguments="${tmp#* }"
9634 
9635   # Input might be given as Windows format, start by converting to
9636   # unix format.
9637   new_path=`$CYGPATH -u "$path"`
9638 
9639   # Now try to locate executable using which
9640   new_path=`$WHICH "$new_path" 2> /dev/null`
9641   # bat and cmd files are not always considered executable in cygwin causing which
9642   # to not find them
9643   if test "x$new_path" = x \
9644            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9645            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9646     new_path=`$CYGPATH -u "$path"`
9647   fi
9648   if test "x$new_path" = x; then
9649     # Oops. Which didn't find the executable.
9650     # The splitting of arguments from the executable at a space might have been incorrect,
9651     # since paths with space are more likely in Windows. Give it another try with the whole
9652     # argument.
9653     path="$complete"
9654     arguments="EOL"
9655     new_path=`$CYGPATH -u "$path"`
9656     new_path=`$WHICH "$new_path" 2> /dev/null`
9657     # bat and cmd files are not always considered executable in cygwin causing which
9658     # to not find them
9659     if test "x$new_path" = x \
9660              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9661              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9662       new_path=`$CYGPATH -u "$path"`
9663     fi
9664     if test "x$new_path" = x; then
9665       # It's still not found. Now this is an unrecoverable error.
9666       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9667 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9668       has_space=`$ECHO "$complete" | $GREP " "`
9669       if test "x$has_space" != x; then
9670         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9671 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9672       fi
9673       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9674     fi
9675   fi
9676 
9677   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9678   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9679   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9680   # "foo.exe" is OK but "foo" is an error.
9681   #
9682   # This test is therefore slightly more accurate than "test -f" to check for file precense.
9683   # It is also a way to make sure we got the proper file name for the real test later on.
9684   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9685   if test "x$test_shortpath" = x; then
9686     # Short path failed, file does not exist as specified.
9687     # Try adding .exe or .cmd
9688     if test -f "${new_path}.exe"; then
9689        input_to_shortpath="${new_path}.exe"
9690     elif test -f "${new_path}.cmd"; then
9691        input_to_shortpath="${new_path}.cmd"
9692     else
9693       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9694 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9695       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9696 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9697       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9698     fi
9699   else
9700     input_to_shortpath="$new_path"
9701   fi
9702 
9703   # Call helper function which possibly converts this using DOS-style short mode.
9704   # If so, the updated path is stored in $new_path.
9705   new_path="$input_to_shortpath"
9706 
9707   input_path="$input_to_shortpath"
9708   # Check if we need to convert this using DOS-style short mode. If the path
9709   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9710   # take no chances and rewrite it.
9711   # Note: m4 eats our [], so we need to use [ and ] instead.
9712   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9713   if test "x$has_forbidden_chars" != x; then
9714     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9715     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9716     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9717     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9718       # Going to short mode and back again did indeed matter. Since short mode is
9719       # case insensitive, let's make it lowercase to improve readability.
9720       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9721       # Now convert it back to Unix-stile (cygpath)
9722       input_path=`$CYGPATH -u "$shortmode_path"`
9723       new_path="$input_path"
9724     fi
9725   fi
9726 
9727   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9728   if test "x$test_cygdrive_prefix" = x; then
9729     # As a simple fix, exclude /usr/bin since it's not a real path.
9730     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9731       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9732       # a path prefixed by /cygdrive for fixpath to work.
9733       new_path="$CYGWIN_ROOT_PATH$input_path"
9734     fi
9735   fi
9736 
9737   # remove trailing .exe if any
9738   new_path="${new_path/%.exe/}"
9739 
9740   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9741 
9742   # First separate the path from the arguments. This will split at the first
9743   # space.
9744   complete="$FOUND_MAKE"
9745   path="${complete%% *}"
9746   tmp="$complete EOL"
9747   arguments="${tmp#* }"
9748 
9749   # Input might be given as Windows format, start by converting to
9750   # unix format.
9751   new_path="$path"
9752 
9753   windows_path="$new_path"
9754   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9755     unix_path=`$CYGPATH -u "$windows_path"`
9756     new_path="$unix_path"
9757   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9758     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9759     new_path="$unix_path"
9760   fi
9761 
9762 
9763   # Now try to locate executable using which
9764   new_path=`$WHICH "$new_path" 2> /dev/null`
9765 
9766   if test "x$new_path" = x; then
9767     # Oops. Which didn't find the executable.
9768     # The splitting of arguments from the executable at a space might have been incorrect,
9769     # since paths with space are more likely in Windows. Give it another try with the whole
9770     # argument.
9771     path="$complete"
9772     arguments="EOL"
9773     new_path="$path"
9774 
9775   windows_path="$new_path"
9776   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9777     unix_path=`$CYGPATH -u "$windows_path"`
9778     new_path="$unix_path"
9779   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9780     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9781     new_path="$unix_path"
9782   fi
9783 
9784 
9785     new_path=`$WHICH "$new_path" 2> /dev/null`
9786 
9787     if test "x$new_path" = x; then
9788       # It's still not found. Now this is an unrecoverable error.
9789       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9790 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9791       has_space=`$ECHO "$complete" | $GREP " "`
9792       if test "x$has_space" != x; then
9793         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9794 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9795       fi
9796       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9797     fi
9798   fi
9799 
9800   # Now new_path has a complete unix path to the binary
9801   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9802     # Keep paths in /bin as-is, but remove trailing .exe if any
9803     new_path="${new_path/%.exe/}"
9804     # Do not save /bin paths to all_fixpath_prefixes!
9805   else
9806     # Not in mixed or Windows style, start by that.
9807     new_path=`cmd //c echo $new_path`
9808 
9809   input_path="$new_path"
9810   # Check if we need to convert this using DOS-style short mode. If the path
9811   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9812   # take no chances and rewrite it.
9813   # Note: m4 eats our [], so we need to use [ and ] instead.
9814   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9815   if test "x$has_forbidden_chars" != x; then
9816     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9817     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9818   fi
9819 
9820     # Output is in $new_path
9821 
9822   windows_path="$new_path"
9823   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9824     unix_path=`$CYGPATH -u "$windows_path"`
9825     new_path="$unix_path"
9826   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9827     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9828     new_path="$unix_path"
9829   fi
9830 
9831     # remove trailing .exe if any
9832     new_path="${new_path/%.exe/}"
9833 
9834     # Save the first 10 bytes of this path to the storage, so fixpath can work.
9835     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9836   fi
9837 
9838   else
9839     # We're on a posix platform. Hooray! :)
9840     # First separate the path from the arguments. This will split at the first
9841     # space.
9842     complete="$FOUND_MAKE"
9843     path="${complete%% *}"
9844     tmp="$complete EOL"
9845     arguments="${tmp#* }"
9846 
9847     # Cannot rely on the command "which" here since it doesn't always work.
9848     is_absolute_path=`$ECHO "$path" | $GREP ^/`
9849     if test -z "$is_absolute_path"; then
9850       # Path to executable is not absolute. Find it.
9851       IFS_save="$IFS"
9852       IFS=:
9853       for p in $PATH; do
9854         if test -f "$p/$path" && test -x "$p/$path"; then
9855           new_path="$p/$path"
9856           break
9857         fi
9858       done
9859       IFS="$IFS_save"
9860     else
9861       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9862 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9863       new_path="$path"
9864     fi
9865 
9866     if test "x$new_path" = x; then
9867         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9868 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9869         has_space=`$ECHO "$complete" | $GREP " "`
9870         if test "x$has_space" != x; then
9871           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9872 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9873         fi
9874         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9875       fi
9876   fi
9877 
9878       # Now join together the path and the arguments once again
9879       if test "x$arguments" != xEOL; then
9880         new_complete="$new_path ${arguments% *}"
9881       else
9882         new_complete="$new_path"
9883       fi
9884 
9885   if test "x$complete" != "x$new_complete"; then
9886       FOUND_MAKE="$new_complete"
9887       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9888 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9889     fi
9890 
9891         fi
9892       fi
9893     fi
9894   fi
9895 
9896         fi
9897         PATH=$OLD_PATH
9898       fi
9899     fi
9900 
9901     if test "x$FOUND_MAKE" = x; then
9902       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
9903     fi
9904   fi
9905 
9906   MAKE=$FOUND_MAKE
9907 
9908   { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
9909 $as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
9910 
9911 
9912 
9913     # Test if find supports -delete
9914     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
9915 $as_echo_n "checking if find supports -delete... " >&6; }
9916     FIND_DELETE="-delete"
9917 
9918     DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
9919 
9920     echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
9921 
9922     TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
9923     if test -f $DELETEDIR/TestIfFindSupportsDelete; then
9924         # No, it does not.
9925         rm $DELETEDIR/TestIfFindSupportsDelete
9926         FIND_DELETE="-exec rm \{\} \+"
9927         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9928 $as_echo "no" >&6; }
9929     else
9930         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9931 $as_echo "yes" >&6; }
9932     fi
9933     rmdir $DELETEDIR
9934 
9935 
9936 
9937 # These tools might not be installed by default,
9938 # need hint on how to install them.
9939 
9940     for ac_prog in unzip
9941 do
9942   # Extract the first word of "$ac_prog", so it can be a program name with args.
9943 set dummy $ac_prog; ac_word=$2
9944 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9945 $as_echo_n "checking for $ac_word... " >&6; }
9946 if ${ac_cv_path_UNZIP+:} false; then :
9947   $as_echo_n "(cached) " >&6
9948 else
9949   case $UNZIP in
9950   [\\/]* | ?:[\\/]*)
9951   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
9952   ;;
9953   *)
9954   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9955 for as_dir in $PATH
9956 do
9957   IFS=$as_save_IFS
9958   test -z "$as_dir" && as_dir=.
9959     for ac_exec_ext in '' $ac_executable_extensions; do
9960   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9961     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
9962     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9963     break 2
9964   fi
9965 done
9966   done
9967 IFS=$as_save_IFS
9968 
9969   ;;
9970 esac
9971 fi
9972 UNZIP=$ac_cv_path_UNZIP
9973 if test -n "$UNZIP"; then
9974   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
9975 $as_echo "$UNZIP" >&6; }
9976 else
9977   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9978 $as_echo "no" >&6; }
9979 fi
9980 
9981 
9982   test -n "$UNZIP" && break
9983 done
9984 
9985 
9986     if test "x$UNZIP" = x; then
9987         if test "xunzip" = x; then
9988           PROG_NAME=unzip
9989         else
9990           PROG_NAME=unzip
9991         fi
9992         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
9993 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
9994         as_fn_error $? "Cannot continue" "$LINENO" 5
9995     fi
9996 
9997 
9998 
9999     for ac_prog in zip
10000 do
10001   # Extract the first word of "$ac_prog", so it can be a program name with args.
10002 set dummy $ac_prog; ac_word=$2
10003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10004 $as_echo_n "checking for $ac_word... " >&6; }
10005 if ${ac_cv_path_ZIP+:} false; then :
10006   $as_echo_n "(cached) " >&6
10007 else
10008   case $ZIP in
10009   [\\/]* | ?:[\\/]*)
10010   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
10011   ;;
10012   *)
10013   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10014 for as_dir in $PATH
10015 do
10016   IFS=$as_save_IFS
10017   test -z "$as_dir" && as_dir=.
10018     for ac_exec_ext in '' $ac_executable_extensions; do
10019   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10020     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
10021     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10022     break 2
10023   fi
10024 done
10025   done
10026 IFS=$as_save_IFS
10027 
10028   ;;
10029 esac
10030 fi
10031 ZIP=$ac_cv_path_ZIP
10032 if test -n "$ZIP"; then
10033   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
10034 $as_echo "$ZIP" >&6; }
10035 else
10036   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10037 $as_echo "no" >&6; }
10038 fi
10039 
10040 
10041   test -n "$ZIP" && break
10042 done
10043 
10044 
10045     if test "x$ZIP" = x; then
10046         if test "xzip" = x; then
10047           PROG_NAME=zip
10048         else
10049           PROG_NAME=zip
10050         fi
10051         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10052 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10053         as_fn_error $? "Cannot continue" "$LINENO" 5
10054     fi
10055 
10056 
10057 
10058 # Non-required basic tools
10059 
10060 # Extract the first word of "ldd", so it can be a program name with args.
10061 set dummy ldd; ac_word=$2
10062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10063 $as_echo_n "checking for $ac_word... " >&6; }
10064 if ${ac_cv_path_LDD+:} false; then :
10065   $as_echo_n "(cached) " >&6
10066 else
10067   case $LDD in
10068   [\\/]* | ?:[\\/]*)
10069   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
10070   ;;
10071   *)
10072   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10073 for as_dir in $PATH
10074 do
10075   IFS=$as_save_IFS
10076   test -z "$as_dir" && as_dir=.
10077     for ac_exec_ext in '' $ac_executable_extensions; do
10078   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10079     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
10080     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10081     break 2
10082   fi
10083 done
10084   done
10085 IFS=$as_save_IFS
10086 
10087   ;;
10088 esac
10089 fi
10090 LDD=$ac_cv_path_LDD
10091 if test -n "$LDD"; then
10092   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
10093 $as_echo "$LDD" >&6; }
10094 else
10095   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10096 $as_echo "no" >&6; }
10097 fi
10098 
10099 
10100 if test "x$LDD" = "x"; then
10101     # List shared lib dependencies is used for
10102     # debug output and checking for forbidden dependencies.
10103     # We can build without it.
10104     LDD="true"
10105 fi
10106 # Extract the first word of "otool", so it can be a program name with args.
10107 set dummy otool; ac_word=$2
10108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10109 $as_echo_n "checking for $ac_word... " >&6; }
10110 if ${ac_cv_path_OTOOL+:} false; then :
10111   $as_echo_n "(cached) " >&6
10112 else
10113   case $OTOOL in
10114   [\\/]* | ?:[\\/]*)
10115   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
10116   ;;
10117   *)
10118   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10119 for as_dir in $PATH
10120 do
10121   IFS=$as_save_IFS
10122   test -z "$as_dir" && as_dir=.
10123     for ac_exec_ext in '' $ac_executable_extensions; do
10124   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10125     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
10126     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10127     break 2
10128   fi
10129 done
10130   done
10131 IFS=$as_save_IFS
10132 
10133   ;;
10134 esac
10135 fi
10136 OTOOL=$ac_cv_path_OTOOL
10137 if test -n "$OTOOL"; then
10138   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
10139 $as_echo "$OTOOL" >&6; }
10140 else
10141   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10142 $as_echo "no" >&6; }
10143 fi
10144 
10145 
10146 if test "x$OTOOL" = "x"; then
10147    OTOOL="true"
10148 fi
10149 for ac_prog in readelf greadelf
10150 do
10151   # Extract the first word of "$ac_prog", so it can be a program name with args.
10152 set dummy $ac_prog; ac_word=$2
10153 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10154 $as_echo_n "checking for $ac_word... " >&6; }
10155 if ${ac_cv_path_READELF+:} false; then :
10156   $as_echo_n "(cached) " >&6
10157 else
10158   case $READELF in
10159   [\\/]* | ?:[\\/]*)
10160   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
10161   ;;
10162   *)
10163   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10164 for as_dir in $PATH
10165 do
10166   IFS=$as_save_IFS
10167   test -z "$as_dir" && as_dir=.
10168     for ac_exec_ext in '' $ac_executable_extensions; do
10169   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10170     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
10171     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10172     break 2
10173   fi
10174 done
10175   done
10176 IFS=$as_save_IFS
10177 
10178   ;;
10179 esac
10180 fi
10181 READELF=$ac_cv_path_READELF
10182 if test -n "$READELF"; then
10183   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
10184 $as_echo "$READELF" >&6; }
10185 else
10186   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10187 $as_echo "no" >&6; }
10188 fi
10189 
10190 
10191   test -n "$READELF" && break
10192 done
10193 
10194 # Extract the first word of "hg", so it can be a program name with args.
10195 set dummy hg; ac_word=$2
10196 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10197 $as_echo_n "checking for $ac_word... " >&6; }
10198 if ${ac_cv_path_HG+:} false; then :
10199   $as_echo_n "(cached) " >&6
10200 else
10201   case $HG in
10202   [\\/]* | ?:[\\/]*)
10203   ac_cv_path_HG="$HG" # Let the user override the test with a path.
10204   ;;
10205   *)
10206   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10207 for as_dir in $PATH
10208 do
10209   IFS=$as_save_IFS
10210   test -z "$as_dir" && as_dir=.
10211     for ac_exec_ext in '' $ac_executable_extensions; do
10212   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10213     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
10214     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10215     break 2
10216   fi
10217 done
10218   done
10219 IFS=$as_save_IFS
10220 
10221   ;;
10222 esac
10223 fi
10224 HG=$ac_cv_path_HG
10225 if test -n "$HG"; then
10226   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
10227 $as_echo "$HG" >&6; }
10228 else
10229   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10230 $as_echo "no" >&6; }
10231 fi
10232 
10233 
10234 # Extract the first word of "stat", so it can be a program name with args.
10235 set dummy stat; ac_word=$2
10236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10237 $as_echo_n "checking for $ac_word... " >&6; }
10238 if ${ac_cv_path_STAT+:} false; then :
10239   $as_echo_n "(cached) " >&6
10240 else
10241   case $STAT in
10242   [\\/]* | ?:[\\/]*)
10243   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
10244   ;;
10245   *)
10246   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10247 for as_dir in $PATH
10248 do
10249   IFS=$as_save_IFS
10250   test -z "$as_dir" && as_dir=.
10251     for ac_exec_ext in '' $ac_executable_extensions; do
10252   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10253     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
10254     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10255     break 2
10256   fi
10257 done
10258   done
10259 IFS=$as_save_IFS
10260 
10261   ;;
10262 esac
10263 fi
10264 STAT=$ac_cv_path_STAT
10265 if test -n "$STAT"; then
10266   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
10267 $as_echo "$STAT" >&6; }
10268 else
10269   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10270 $as_echo "no" >&6; }
10271 fi
10272 
10273 
10274 # Extract the first word of "time", so it can be a program name with args.
10275 set dummy time; ac_word=$2
10276 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10277 $as_echo_n "checking for $ac_word... " >&6; }
10278 if ${ac_cv_path_TIME+:} false; then :
10279   $as_echo_n "(cached) " >&6
10280 else
10281   case $TIME in
10282   [\\/]* | ?:[\\/]*)
10283   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
10284   ;;
10285   *)
10286   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10287 for as_dir in $PATH
10288 do
10289   IFS=$as_save_IFS
10290   test -z "$as_dir" && as_dir=.
10291     for ac_exec_ext in '' $ac_executable_extensions; do
10292   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10293     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
10294     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10295     break 2
10296   fi
10297 done
10298   done
10299 IFS=$as_save_IFS
10300 
10301   ;;
10302 esac
10303 fi
10304 TIME=$ac_cv_path_TIME
10305 if test -n "$TIME"; then
10306   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
10307 $as_echo "$TIME" >&6; }
10308 else
10309   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10310 $as_echo "no" >&6; }
10311 fi
10312 
10313 
10314 
10315 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
10316 
10317     for ac_prog in comm
10318 do
10319   # Extract the first word of "$ac_prog", so it can be a program name with args.
10320 set dummy $ac_prog; ac_word=$2
10321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10322 $as_echo_n "checking for $ac_word... " >&6; }
10323 if ${ac_cv_path_COMM+:} false; then :
10324   $as_echo_n "(cached) " >&6
10325 else
10326   case $COMM in
10327   [\\/]* | ?:[\\/]*)
10328   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
10329   ;;
10330   *)
10331   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10332 for as_dir in $PATH
10333 do
10334   IFS=$as_save_IFS
10335   test -z "$as_dir" && as_dir=.
10336     for ac_exec_ext in '' $ac_executable_extensions; do
10337   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10338     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
10339     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10340     break 2
10341   fi
10342 done
10343   done
10344 IFS=$as_save_IFS
10345 
10346   ;;
10347 esac
10348 fi
10349 COMM=$ac_cv_path_COMM
10350 if test -n "$COMM"; then
10351   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
10352 $as_echo "$COMM" >&6; }
10353 else
10354   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10355 $as_echo "no" >&6; }
10356 fi
10357 
10358 
10359   test -n "$COMM" && break
10360 done
10361 
10362 
10363     if test "x$COMM" = x; then
10364         if test "xcomm" = x; then
10365           PROG_NAME=comm
10366         else
10367           PROG_NAME=comm
10368         fi
10369         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10370 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10371         as_fn_error $? "Cannot continue" "$LINENO" 5
10372     fi
10373 
10374 
10375 fi
10376 
10377 
10378 # Check if pkg-config is available.
10379 
10380 
10381 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10382         if test -n "$ac_tool_prefix"; then
10383   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10384 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10386 $as_echo_n "checking for $ac_word... " >&6; }
10387 if ${ac_cv_path_PKG_CONFIG+:} false; then :
10388   $as_echo_n "(cached) " >&6
10389 else
10390   case $PKG_CONFIG in
10391   [\\/]* | ?:[\\/]*)
10392   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10393   ;;
10394   *)
10395   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10396 for as_dir in $PATH
10397 do
10398   IFS=$as_save_IFS
10399   test -z "$as_dir" && as_dir=.
10400     for ac_exec_ext in '' $ac_executable_extensions; do
10401   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10402     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10403     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10404     break 2
10405   fi
10406 done
10407   done
10408 IFS=$as_save_IFS
10409 
10410   ;;
10411 esac
10412 fi
10413 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10414 if test -n "$PKG_CONFIG"; then
10415   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10416 $as_echo "$PKG_CONFIG" >&6; }
10417 else
10418   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10419 $as_echo "no" >&6; }
10420 fi
10421 
10422 
10423 fi
10424 if test -z "$ac_cv_path_PKG_CONFIG"; then
10425   ac_pt_PKG_CONFIG=$PKG_CONFIG
10426   # Extract the first word of "pkg-config", so it can be a program name with args.
10427 set dummy pkg-config; ac_word=$2
10428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10429 $as_echo_n "checking for $ac_word... " >&6; }
10430 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10431   $as_echo_n "(cached) " >&6
10432 else
10433   case $ac_pt_PKG_CONFIG in
10434   [\\/]* | ?:[\\/]*)
10435   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10436   ;;
10437   *)
10438   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10439 for as_dir in $PATH
10440 do
10441   IFS=$as_save_IFS
10442   test -z "$as_dir" && as_dir=.
10443     for ac_exec_ext in '' $ac_executable_extensions; do
10444   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10445     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10446     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10447     break 2
10448   fi
10449 done
10450   done
10451 IFS=$as_save_IFS
10452 
10453   ;;
10454 esac
10455 fi
10456 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10457 if test -n "$ac_pt_PKG_CONFIG"; then
10458   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10459 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
10460 else
10461   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10462 $as_echo "no" >&6; }
10463 fi
10464 
10465   if test "x$ac_pt_PKG_CONFIG" = x; then
10466     PKG_CONFIG=""
10467   else
10468     case $cross_compiling:$ac_tool_warned in
10469 yes:)
10470 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10471 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10472 ac_tool_warned=yes ;;
10473 esac
10474     PKG_CONFIG=$ac_pt_PKG_CONFIG
10475   fi
10476 else
10477   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10478 fi
10479 
10480 fi
10481 if test -n "$PKG_CONFIG"; then
10482         _pkg_min_version=0.9.0
10483         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10484 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10485         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10486                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10487 $as_echo "yes" >&6; }
10488         else
10489                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10490 $as_echo "no" >&6; }
10491                 PKG_CONFIG=""
10492         fi
10493 
10494 fi
10495 
10496 # After basic tools have been setup, we can check build os specific details.
10497 
10498 ###############################################################################
10499 
10500 # Note that this is the build platform OS version!
10501 
10502 OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
10503 OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
10504 OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
10505 OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
10506 
10507 
10508 
10509 
10510 
10511 # Setup builddeps, for automatic downloading of tools we need.
10512 # This is needed before we can call BDEPS_CHECK_MODULE, which is done in
10513 # boot-jdk setup, but we need to have basic tools setup first.
10514 
10515 
10516 # Check whether --with-builddeps-conf was given.
10517 if test "${with_builddeps_conf+set}" = set; then :
10518   withval=$with_builddeps_conf;
10519 fi
10520 
10521 
10522 
10523 # Check whether --with-builddeps-server was given.
10524 if test "${with_builddeps_server+set}" = set; then :
10525   withval=$with_builddeps_server;
10526 fi
10527 
10528 
10529 
10530 # Check whether --with-builddeps-dir was given.
10531 if test "${with_builddeps_dir+set}" = set; then :
10532   withval=$with_builddeps_dir;
10533 else
10534   with_builddeps_dir=/localhome/builddeps
10535 fi
10536 
10537 
10538 
10539 # Check whether --with-builddeps-group was given.
10540 if test "${with_builddeps_group+set}" = set; then :
10541   withval=$with_builddeps_group;
10542 fi
10543 
10544 
10545 
10546 
10547     if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10548         if test "x$with_builddeps_conf" != x; then
10549             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
10550 $as_echo_n "checking for supplied builddeps configuration file... " >&6; }
10551             builddepsfile=$with_builddeps_conf
10552             if test -s $builddepsfile; then
10553                 . $builddepsfile
10554                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
10555 $as_echo "loaded!" >&6; }
10556             else
10557                as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
10558            fi
10559         else
10560             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
10561 $as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
10562             builddepsfile=`mktemp`
10563             touch $builddepsfile
10564             # Put all found confs into a single file.
10565             find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
10566             # Source the file to acquire the variables
10567             if test -s $builddepsfile; then
10568                 . $builddepsfile
10569                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
10570 $as_echo "found at least one!" >&6; }
10571             else
10572                as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
10573            fi
10574         fi
10575         # Create build and target names that use _ instead of "-" and ".".
10576         # This is necessary to use them in variable names.
10577         build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10578         target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10579         # Extract rewrite information for build and target
10580         eval rewritten_build=\${REWRITE_${build_var}}
10581         if test "x$rewritten_build" = x; then
10582             rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
10583             echo Build stays the same $rewritten_build
10584         else
10585             echo Rewriting build for builddeps into $rewritten_build
10586         fi
10587         eval rewritten_target=\${REWRITE_${target_var}}
10588         if test "x$rewritten_target" = x; then
10589             rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
10590             echo Target stays the same $rewritten_target
10591         else
10592             echo Rewriting target for builddeps into $rewritten_target
10593         fi
10594         rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
10595         rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
10596     fi
10597     for ac_prog in 7z unzip
10598 do
10599   # Extract the first word of "$ac_prog", so it can be a program name with args.
10600 set dummy $ac_prog; ac_word=$2
10601 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10602 $as_echo_n "checking for $ac_word... " >&6; }
10603 if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
10604   $as_echo_n "(cached) " >&6
10605 else
10606   if test -n "$BDEPS_UNZIP"; then
10607   ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
10608 else
10609 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10610 for as_dir in $PATH
10611 do
10612   IFS=$as_save_IFS
10613   test -z "$as_dir" && as_dir=.
10614     for ac_exec_ext in '' $ac_executable_extensions; do
10615   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10616     ac_cv_prog_BDEPS_UNZIP="$ac_prog"
10617     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10618     break 2
10619   fi
10620 done
10621   done
10622 IFS=$as_save_IFS
10623 
10624 fi
10625 fi
10626 BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
10627 if test -n "$BDEPS_UNZIP"; then
10628   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
10629 $as_echo "$BDEPS_UNZIP" >&6; }
10630 else
10631   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10632 $as_echo "no" >&6; }
10633 fi
10634 
10635 
10636   test -n "$BDEPS_UNZIP" && break
10637 done
10638 
10639     if test "x$BDEPS_UNZIP" = x7z; then
10640         BDEPS_UNZIP="7z x"
10641     fi
10642 
10643     for ac_prog in wget lftp ftp
10644 do
10645   # Extract the first word of "$ac_prog", so it can be a program name with args.
10646 set dummy $ac_prog; ac_word=$2
10647 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10648 $as_echo_n "checking for $ac_word... " >&6; }
10649 if ${ac_cv_prog_BDEPS_FTP+:} false; then :
10650   $as_echo_n "(cached) " >&6
10651 else
10652   if test -n "$BDEPS_FTP"; then
10653   ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
10654 else
10655 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10656 for as_dir in $PATH
10657 do
10658   IFS=$as_save_IFS
10659   test -z "$as_dir" && as_dir=.
10660     for ac_exec_ext in '' $ac_executable_extensions; do
10661   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10662     ac_cv_prog_BDEPS_FTP="$ac_prog"
10663     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10664     break 2
10665   fi
10666 done
10667   done
10668 IFS=$as_save_IFS
10669 
10670 fi
10671 fi
10672 BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
10673 if test -n "$BDEPS_FTP"; then
10674   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
10675 $as_echo "$BDEPS_FTP" >&6; }
10676 else
10677   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10678 $as_echo "no" >&6; }
10679 fi
10680 
10681 
10682   test -n "$BDEPS_FTP" && break
10683 done
10684 
10685 
10686 
10687 ###############################################################################
10688 #
10689 # Determine OpenJDK variants, options and version numbers.
10690 #
10691 ###############################################################################
10692 
10693 # We need build & target for this.
10694 
10695 
10696 ###############################################################################
10697 #
10698 # Should we build a JDK/JVM with headful support (ie a graphical ui)?
10699 # We always build headless support.
10700 #
10701 { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
10702 $as_echo_n "checking headful support... " >&6; }
10703 # Check whether --enable-headful was given.
10704 if test "${enable_headful+set}" = set; then :
10705   enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
10706 else
10707   SUPPORT_HEADFUL=yes
10708 fi
10709 
10710 
10711 SUPPORT_HEADLESS=yes
10712 BUILD_HEADLESS="BUILD_HEADLESS:=true"
10713 
10714 if test "x$SUPPORT_HEADFUL" = xyes; then
10715     # We are building both headful and headless.
10716     headful_msg="inlude support for both headful and headless"
10717 fi
10718 
10719 if test "x$SUPPORT_HEADFUL" = xno; then
10720     # Thus we are building headless only.
10721     BUILD_HEADLESS="BUILD_HEADLESS:=true"
10722     headful_msg="headless only"
10723 fi
10724 
10725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
10726 $as_echo "$headful_msg" >&6; }
10727 
10728 
10729 
10730 
10731 
10732 # Control wether Hotspot runs Queens test after build.
10733 # Check whether --enable-hotspot-test-in-build was given.
10734 if test "${enable_hotspot_test_in_build+set}" = set; then :
10735   enableval=$enable_hotspot_test_in_build;
10736 else
10737   enable_hotspot_test_in_build=no
10738 fi
10739 
10740 if test "x$enable_hotspot_test_in_build" = "xyes"; then
10741     TEST_IN_BUILD=true
10742 else
10743     TEST_IN_BUILD=false
10744 fi
10745 
10746 
10747 ###############################################################################
10748 #
10749 # Choose cacerts source file
10750 #
10751 
10752 # Check whether --with-cacerts-file was given.
10753 if test "${with_cacerts_file+set}" = set; then :
10754   withval=$with_cacerts_file;
10755 fi
10756 
10757 if test "x$with_cacerts_file" != x; then
10758     CACERTS_FILE=$with_cacerts_file
10759 else
10760     if test "x$OPENJDK" = "xtrue"; then
10761         CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
10762     else
10763         CACERTS_FILE=${SRC_ROOT}/jdk/src/closed/share/lib/security/cacerts.internal
10764     fi
10765 fi
10766 
10767 
10768 ###############################################################################
10769 #
10770 # Enable or disable unlimited crypto
10771 #
10772 # Check whether --enable-unlimited-crypto was given.
10773 if test "${enable_unlimited_crypto+set}" = set; then :
10774   enableval=$enable_unlimited_crypto;
10775 else
10776   enable_unlimited_crypto=no
10777 fi
10778 
10779 if test "x$enable_unlimited_crypto" = "xyes"; then
10780     UNLIMITED_CRYPTO=true
10781 else
10782     UNLIMITED_CRYPTO=false
10783 fi
10784 
10785 
10786 ###############################################################################
10787 #
10788 # Compress jars
10789 #
10790 COMPRESS_JARS=false
10791 
10792 
10793 
10794 
10795 # Source the version numbers
10796 . $AUTOCONF_DIR/version-numbers
10797 
10798 # Get the settings from parameters
10799 
10800 # Check whether --with-milestone was given.
10801 if test "${with_milestone+set}" = set; then :
10802   withval=$with_milestone;
10803 fi
10804 
10805 if test "x$with_milestone" = xyes; then
10806   as_fn_error $? "Milestone must have a value" "$LINENO" 5
10807 elif test "x$with_milestone" != x; then
10808     MILESTONE="$with_milestone"
10809 fi
10810 if test "x$MILESTONE" = x; then
10811   MILESTONE=internal
10812 fi
10813 
10814 
10815 # Check whether --with-build-number was given.
10816 if test "${with_build_number+set}" = set; then :
10817   withval=$with_build_number;
10818 fi
10819 
10820 if test "x$with_build_number" = xyes; then
10821   as_fn_error $? "Build number must have a value" "$LINENO" 5
10822 elif test "x$with_build_number" != x; then
10823   JDK_BUILD_NUMBER="$with_build_number"
10824 fi
10825 if test "x$JDK_BUILD_NUMBER" = x; then
10826   JDK_BUILD_NUMBER=b00
10827 fi
10828 
10829 
10830 # Check whether --with-user-release-suffix was given.
10831 if test "${with_user_release_suffix+set}" = set; then :
10832   withval=$with_user_release_suffix;
10833 fi
10834 
10835 if test "x$with_user_release_suffix" = xyes; then
10836   as_fn_error $? "Release suffix must have a value" "$LINENO" 5
10837 elif test "x$with_user_release_suffix" != x; then
10838   USER_RELEASE_SUFFIX="$with_user_release_suffix"
10839 else
10840   BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
10841   # Avoid [:alnum:] since it depends on the locale.
10842   CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
10843   USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10844 fi
10845 
10846 
10847 # Now set the JDK version, milestone, build number etc.
10848 
10849 
10850 
10851 
10852 
10853 
10854 
10855 
10856 
10857 
10858 
10859 
10860 
10861 
10862 COPYRIGHT_YEAR=`date +'%Y'`
10863 
10864 
10865 if test "x$JDK_UPDATE_VERSION" != x; then
10866   JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
10867 else
10868   JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
10869 fi
10870 
10871 
10872 COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
10873 
10874 
10875 
10876 ###############################################################################
10877 #
10878 # Setup BootJDK, used to bootstrap the build.
10879 #
10880 ###############################################################################
10881 
10882 
10883 BOOT_JDK_FOUND=no
10884 
10885 # Check whether --with-boot-jdk was given.
10886 if test "${with_boot_jdk+set}" = set; then :
10887   withval=$with_boot_jdk;
10888 fi
10889 
10890 
10891 # We look for the Boot JDK through various means, going from more certain to
10892 # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
10893 # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
10894 # must check if this is indeed valid; otherwise we'll continue looking.
10895 
10896 # Test: Is bootjdk explicitely set by command line arguments?
10897 
10898   if test "x$BOOT_JDK_FOUND" = xno; then
10899     # Now execute the test
10900 
10901 if test "x$with_boot_jdk" != x; then
10902     BOOT_JDK=$with_boot_jdk
10903     BOOT_JDK_FOUND=maybe
10904     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
10905 $as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
10906 fi
10907 
10908 
10909     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
10910     if test "x$BOOT_JDK_FOUND" = xmaybe; then
10911       # Do we have a bin/java?
10912       if test ! -x "$BOOT_JDK/bin/java"; then
10913         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
10914 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
10915         BOOT_JDK_FOUND=no
10916       else
10917         # Do we have a bin/javac?
10918         if test ! -x "$BOOT_JDK/bin/javac"; then
10919           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
10920 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
10921           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
10922 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
10923           BOOT_JDK_FOUND=no
10924         else
10925           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
10926           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
10927             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
10928 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
10929             BOOT_JDK_FOUND=no
10930           else
10931             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
10932             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
10933 
10934             # Extra M4 quote needed to protect [] in grep expression.
10935             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
10936             if test "x$FOUND_VERSION_78" = x; then
10937               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
10938 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
10939               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
10940 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
10941               BOOT_JDK_FOUND=no
10942             else
10943               # We're done! :-)
10944               BOOT_JDK_FOUND=yes
10945 
10946   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10947 
10948   # Input might be given as Windows format, start by converting to
10949   # unix format.
10950   path="$BOOT_JDK"
10951   new_path=`$CYGPATH -u "$path"`
10952 
10953   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
10954   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
10955   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
10956   # "foo.exe" is OK but "foo" is an error.
10957   #
10958   # This test is therefore slightly more accurate than "test -f" to check for file precense.
10959   # It is also a way to make sure we got the proper file name for the real test later on.
10960   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
10961   if test "x$test_shortpath" = x; then
10962     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
10963 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
10964     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
10965   fi
10966 
10967   # Call helper function which possibly converts this using DOS-style short mode.
10968   # If so, the updated path is stored in $new_path.
10969 
10970   input_path="$new_path"
10971   # Check if we need to convert this using DOS-style short mode. If the path
10972   # contains just simple characters, use it. Otherwise (spaces, weird characters),
10973   # take no chances and rewrite it.
10974   # Note: m4 eats our [], so we need to use [ and ] instead.
10975   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
10976   if test "x$has_forbidden_chars" != x; then
10977     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10978     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
10979     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
10980     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
10981       # Going to short mode and back again did indeed matter. Since short mode is
10982       # case insensitive, let's make it lowercase to improve readability.
10983       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10984       # Now convert it back to Unix-stile (cygpath)
10985       input_path=`$CYGPATH -u "$shortmode_path"`
10986       new_path="$input_path"
10987     fi
10988   fi
10989 
10990   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
10991   if test "x$test_cygdrive_prefix" = x; then
10992     # As a simple fix, exclude /usr/bin since it's not a real path.
10993     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
10994       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
10995       # a path prefixed by /cygdrive for fixpath to work.
10996       new_path="$CYGWIN_ROOT_PATH$input_path"
10997     fi
10998   fi
10999 
11000 
11001   if test "x$path" != "x$new_path"; then
11002     BOOT_JDK="$new_path"
11003     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11004 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11005   fi
11006 
11007   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11008 
11009   path="$BOOT_JDK"
11010   has_colon=`$ECHO $path | $GREP ^.:`
11011   new_path="$path"
11012   if test "x$has_colon" = x; then
11013     # Not in mixed or Windows style, start by that.
11014     new_path=`cmd //c echo $path`
11015   fi
11016 
11017 
11018   input_path="$new_path"
11019   # Check if we need to convert this using DOS-style short mode. If the path
11020   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11021   # take no chances and rewrite it.
11022   # Note: m4 eats our [], so we need to use [ and ] instead.
11023   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11024   if test "x$has_forbidden_chars" != x; then
11025     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11026     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11027   fi
11028 
11029 
11030   windows_path="$new_path"
11031   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11032     unix_path=`$CYGPATH -u "$windows_path"`
11033     new_path="$unix_path"
11034   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11035     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11036     new_path="$unix_path"
11037   fi
11038 
11039   if test "x$path" != "x$new_path"; then
11040     BOOT_JDK="$new_path"
11041     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11042 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11043   fi
11044 
11045   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11046   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11047 
11048   else
11049     # We're on a posix platform. Hooray! :)
11050     path="$BOOT_JDK"
11051 
11052     if test ! -f "$path" && test ! -d "$path"; then
11053       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11054     fi
11055 
11056     has_space=`$ECHO "$path" | $GREP " "`
11057     if test "x$has_space" != x; then
11058       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11059 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11060       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11061     fi
11062   fi
11063 
11064               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11065 $as_echo_n "checking for Boot JDK... " >&6; }
11066               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11067 $as_echo "$BOOT_JDK" >&6; }
11068               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11069 $as_echo_n "checking Boot JDK version... " >&6; }
11070               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11071               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11072 $as_echo "$BOOT_JDK_VERSION" >&6; }
11073             fi # end check jdk version
11074           fi # end check rt.jar
11075         fi # end check javac
11076       fi # end check java
11077     fi # end check boot jdk found
11078   fi
11079 
11080 if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
11081   # Having specified an argument which is incorrect will produce an instant failure;
11082   # we should not go on looking
11083   as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
11084 fi
11085 
11086 # Test: Is bootjdk available from builddeps?
11087 
11088   if test "x$BOOT_JDK_FOUND" = xno; then
11089     # Now execute the test
11090 
11091 
11092 
11093     if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
11094         # Source the builddeps file again, to make sure it uses the latest variables!
11095         . $builddepsfile
11096         # Look for a target and build machine specific resource!
11097         eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
11098         if test "x$resource" = x; then
11099             # Ok, lets instead look for a target specific resource
11100             eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
11101         fi
11102         if test "x$resource" = x; then
11103             # Ok, lets instead look for a build specific resource
11104             eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
11105         fi
11106         if test "x$resource" = x; then
11107             # Ok, lets instead look for a generic resource
11108             # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
11109             resource=${builddep_bootjdk}
11110         fi
11111         if test "x$resource" != x; then
11112             { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
11113 $as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
11114             # If the resource in the builddeps.conf file is an existing directory,
11115             # for example /java/linux/cups
11116             if test -d ${resource}; then
11117                depdir=${resource}
11118             else
11119 
11120 # bootjdk is for example mymodule
11121 # $resource is for example libs/general/libmymod_1_2_3.zip
11122 # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
11123 # $with_builddeps_dir is for example /localhome/builddeps
11124 # depdir is the name of the variable into which we store the depdir, eg MYMOD
11125 # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
11126 # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
11127     filename=`basename $resource`
11128     filebase=`echo $filename | sed 's/\.[^\.]*$//'`
11129     filebase=${filename%%.*}
11130     extension=${filename#*.}
11131     installdir=$with_builddeps_dir/$filebase
11132     if test ! -f $installdir/$filename.unpacked; then
11133         { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
11134 $as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
11135         if test ! -d $installdir; then
11136             mkdir -p $installdir
11137         fi
11138         if test ! -d $installdir; then
11139             as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
11140         fi
11141         tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
11142         touch $tmpfile
11143         if test ! -f $tmpfile; then
11144             as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
11145         fi
11146 
11147     # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
11148     # $tmpfile is the local file name for the downloaded file.
11149     VALID_TOOL=no
11150     if test "x$BDEPS_FTP" = xwget; then
11151        VALID_TOOL=yes
11152        wget -O $tmpfile $with_builddeps_server/$resource
11153     fi
11154     if test "x$BDEPS_FTP" = xlftp; then
11155        VALID_TOOL=yes
11156        lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
11157     fi
11158     if test "x$BDEPS_FTP" = xftp; then
11159         VALID_TOOL=yes
11160         FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
11161         FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
11162         FTPUSERPWD=${FTPSERVER%%@*}
11163         if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
11164             FTPUSER=${userpwd%%:*}
11165             FTPPWD=${userpwd#*@}
11166             FTPSERVER=${FTPSERVER#*@}
11167         else
11168             FTPUSER=ftp
11169             FTPPWD=ftp
11170         fi
11171         # the "pass" command does not work on some
11172         # ftp clients (read ftp.exe) but if it works,
11173         # passive mode is better!
11174         (\
11175             echo "user $FTPUSER $FTPPWD"        ;\
11176             echo "pass"                         ;\
11177             echo "bin"                          ;\
11178             echo "get $FTPPATH $tmpfile"              ;\
11179         ) | ftp -in $FTPSERVER
11180     fi
11181     if test "x$VALID_TOOL" != xyes; then
11182        as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
11183     fi
11184 
11185         mv $tmpfile $installdir/$filename
11186         if test ! -s $installdir/$filename; then
11187             as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
11188         fi
11189         case "$extension" in
11190             zip)  echo "Unzipping $installdir/$filename..."
11191                (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
11192             ;;
11193             tar.gz) echo "Untaring $installdir/$filename..."
11194                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11195             ;;
11196             tgz) echo "Untaring $installdir/$filename..."
11197                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11198             ;;
11199             *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
11200             ;;
11201         esac
11202     fi
11203     if test -f $installdir/$filename.unpacked; then
11204         depdir=$installdir
11205     fi
11206 
11207             fi
11208             # Source the builddeps file again, because in the previous command, the depdir
11209             # was updated to point at the current build dependency install directory.
11210             . $builddepsfile
11211             # Now extract variables from the builddeps.conf files.
11212             theroot=${builddep_bootjdk_ROOT}
11213             thecflags=${builddep_bootjdk_CFLAGS}
11214             thelibs=${builddep_bootjdk_LIBS}
11215             if test "x$depdir" = x; then
11216                 as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
11217             fi
11218             BOOT_JDK=$depdir
11219             if test "x$theroot" != x; then
11220                BOOT_JDK="$theroot"
11221             fi
11222             if test "x$thecflags" != x; then
11223                BOOT_JDK_CFLAGS="$thecflags"
11224             fi
11225             if test "x$thelibs" != x; then
11226                BOOT_JDK_LIBS="$thelibs"
11227             fi
11228             BOOT_JDK_FOUND=maybe
11229             else BOOT_JDK_FOUND=no
11230 
11231         fi
11232         else BOOT_JDK_FOUND=no
11233 
11234     fi
11235 
11236 
11237 
11238     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11239     if test "x$BOOT_JDK_FOUND" = xmaybe; then
11240       # Do we have a bin/java?
11241       if test ! -x "$BOOT_JDK/bin/java"; then
11242         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11243 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11244         BOOT_JDK_FOUND=no
11245       else
11246         # Do we have a bin/javac?
11247         if test ! -x "$BOOT_JDK/bin/javac"; then
11248           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11249 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11250           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11251 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11252           BOOT_JDK_FOUND=no
11253         else
11254           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11255           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11256             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11257 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11258             BOOT_JDK_FOUND=no
11259           else
11260             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11261             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11262 
11263             # Extra M4 quote needed to protect [] in grep expression.
11264             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11265             if test "x$FOUND_VERSION_78" = x; then
11266               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11267 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11268               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11269 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11270               BOOT_JDK_FOUND=no
11271             else
11272               # We're done! :-)
11273               BOOT_JDK_FOUND=yes
11274 
11275   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11276 
11277   # Input might be given as Windows format, start by converting to
11278   # unix format.
11279   path="$BOOT_JDK"
11280   new_path=`$CYGPATH -u "$path"`
11281 
11282   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11283   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11284   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11285   # "foo.exe" is OK but "foo" is an error.
11286   #
11287   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11288   # It is also a way to make sure we got the proper file name for the real test later on.
11289   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11290   if test "x$test_shortpath" = x; then
11291     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11292 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11293     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11294   fi
11295 
11296   # Call helper function which possibly converts this using DOS-style short mode.
11297   # If so, the updated path is stored in $new_path.
11298 
11299   input_path="$new_path"
11300   # Check if we need to convert this using DOS-style short mode. If the path
11301   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11302   # take no chances and rewrite it.
11303   # Note: m4 eats our [], so we need to use [ and ] instead.
11304   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11305   if test "x$has_forbidden_chars" != x; then
11306     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11307     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11308     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11309     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11310       # Going to short mode and back again did indeed matter. Since short mode is
11311       # case insensitive, let's make it lowercase to improve readability.
11312       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11313       # Now convert it back to Unix-stile (cygpath)
11314       input_path=`$CYGPATH -u "$shortmode_path"`
11315       new_path="$input_path"
11316     fi
11317   fi
11318 
11319   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11320   if test "x$test_cygdrive_prefix" = x; then
11321     # As a simple fix, exclude /usr/bin since it's not a real path.
11322     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11323       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11324       # a path prefixed by /cygdrive for fixpath to work.
11325       new_path="$CYGWIN_ROOT_PATH$input_path"
11326     fi
11327   fi
11328 
11329 
11330   if test "x$path" != "x$new_path"; then
11331     BOOT_JDK="$new_path"
11332     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11333 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11334   fi
11335 
11336   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11337 
11338   path="$BOOT_JDK"
11339   has_colon=`$ECHO $path | $GREP ^.:`
11340   new_path="$path"
11341   if test "x$has_colon" = x; then
11342     # Not in mixed or Windows style, start by that.
11343     new_path=`cmd //c echo $path`
11344   fi
11345 
11346 
11347   input_path="$new_path"
11348   # Check if we need to convert this using DOS-style short mode. If the path
11349   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11350   # take no chances and rewrite it.
11351   # Note: m4 eats our [], so we need to use [ and ] instead.
11352   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11353   if test "x$has_forbidden_chars" != x; then
11354     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11355     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11356   fi
11357 
11358 
11359   windows_path="$new_path"
11360   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11361     unix_path=`$CYGPATH -u "$windows_path"`
11362     new_path="$unix_path"
11363   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11364     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11365     new_path="$unix_path"
11366   fi
11367 
11368   if test "x$path" != "x$new_path"; then
11369     BOOT_JDK="$new_path"
11370     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11371 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11372   fi
11373 
11374   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11375   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11376 
11377   else
11378     # We're on a posix platform. Hooray! :)
11379     path="$BOOT_JDK"
11380 
11381     if test ! -f "$path" && test ! -d "$path"; then
11382       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11383     fi
11384 
11385     has_space=`$ECHO "$path" | $GREP " "`
11386     if test "x$has_space" != x; then
11387       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11388 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11389       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11390     fi
11391   fi
11392 
11393               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11394 $as_echo_n "checking for Boot JDK... " >&6; }
11395               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11396 $as_echo "$BOOT_JDK" >&6; }
11397               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11398 $as_echo_n "checking Boot JDK version... " >&6; }
11399               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11400               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11401 $as_echo "$BOOT_JDK_VERSION" >&6; }
11402             fi # end check jdk version
11403           fi # end check rt.jar
11404         fi # end check javac
11405       fi # end check java
11406     fi # end check boot jdk found
11407   fi
11408 
11409 
11410 # Test: Is $JAVA_HOME set?
11411 
11412   if test "x$BOOT_JDK_FOUND" = xno; then
11413     # Now execute the test
11414 
11415     if test "x$JAVA_HOME" != x; then
11416         JAVA_HOME_PROCESSED="$JAVA_HOME"
11417 
11418   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11419 
11420   # Input might be given as Windows format, start by converting to
11421   # unix format.
11422   path="$JAVA_HOME_PROCESSED"
11423   new_path=`$CYGPATH -u "$path"`
11424 
11425   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11426   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11427   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11428   # "foo.exe" is OK but "foo" is an error.
11429   #
11430   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11431   # It is also a way to make sure we got the proper file name for the real test later on.
11432   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11433   if test "x$test_shortpath" = x; then
11434     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11435 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11436     as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
11437   fi
11438 
11439   # Call helper function which possibly converts this using DOS-style short mode.
11440   # If so, the updated path is stored in $new_path.
11441 
11442   input_path="$new_path"
11443   # Check if we need to convert this using DOS-style short mode. If the path
11444   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11445   # take no chances and rewrite it.
11446   # Note: m4 eats our [], so we need to use [ and ] instead.
11447   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11448   if test "x$has_forbidden_chars" != x; then
11449     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11450     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11451     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11452     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11453       # Going to short mode and back again did indeed matter. Since short mode is
11454       # case insensitive, let's make it lowercase to improve readability.
11455       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11456       # Now convert it back to Unix-stile (cygpath)
11457       input_path=`$CYGPATH -u "$shortmode_path"`
11458       new_path="$input_path"
11459     fi
11460   fi
11461 
11462   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11463   if test "x$test_cygdrive_prefix" = x; then
11464     # As a simple fix, exclude /usr/bin since it's not a real path.
11465     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11466       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11467       # a path prefixed by /cygdrive for fixpath to work.
11468       new_path="$CYGWIN_ROOT_PATH$input_path"
11469     fi
11470   fi
11471 
11472 
11473   if test "x$path" != "x$new_path"; then
11474     JAVA_HOME_PROCESSED="$new_path"
11475     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11476 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11477   fi
11478 
11479   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11480 
11481   path="$JAVA_HOME_PROCESSED"
11482   has_colon=`$ECHO $path | $GREP ^.:`
11483   new_path="$path"
11484   if test "x$has_colon" = x; then
11485     # Not in mixed or Windows style, start by that.
11486     new_path=`cmd //c echo $path`
11487   fi
11488 
11489 
11490   input_path="$new_path"
11491   # Check if we need to convert this using DOS-style short mode. If the path
11492   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11493   # take no chances and rewrite it.
11494   # Note: m4 eats our [], so we need to use [ and ] instead.
11495   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11496   if test "x$has_forbidden_chars" != x; then
11497     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11498     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11499   fi
11500 
11501 
11502   windows_path="$new_path"
11503   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11504     unix_path=`$CYGPATH -u "$windows_path"`
11505     new_path="$unix_path"
11506   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11507     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11508     new_path="$unix_path"
11509   fi
11510 
11511   if test "x$path" != "x$new_path"; then
11512     JAVA_HOME_PROCESSED="$new_path"
11513     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11514 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11515   fi
11516 
11517   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11518   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11519 
11520   else
11521     # We're on a posix platform. Hooray! :)
11522     path="$JAVA_HOME_PROCESSED"
11523 
11524     if test ! -f "$path" && test ! -d "$path"; then
11525       as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
11526     fi
11527 
11528     has_space=`$ECHO "$path" | $GREP " "`
11529     if test "x$has_space" != x; then
11530       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11531 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11532       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11533     fi
11534   fi
11535 
11536         if test ! -d "$JAVA_HOME_PROCESSED"; then
11537             { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
11538 $as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
11539         else
11540           # Aha, the user has set a JAVA_HOME
11541           # let us use that as the Boot JDK.
11542           BOOT_JDK="$JAVA_HOME_PROCESSED"
11543           BOOT_JDK_FOUND=maybe
11544           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
11545 $as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
11546         fi
11547     fi
11548 
11549 
11550     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11551     if test "x$BOOT_JDK_FOUND" = xmaybe; then
11552       # Do we have a bin/java?
11553       if test ! -x "$BOOT_JDK/bin/java"; then
11554         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11555 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11556         BOOT_JDK_FOUND=no
11557       else
11558         # Do we have a bin/javac?
11559         if test ! -x "$BOOT_JDK/bin/javac"; then
11560           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11561 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11562           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11563 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11564           BOOT_JDK_FOUND=no
11565         else
11566           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11567           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11568             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11569 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11570             BOOT_JDK_FOUND=no
11571           else
11572             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11573             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11574 
11575             # Extra M4 quote needed to protect [] in grep expression.
11576             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11577             if test "x$FOUND_VERSION_78" = x; then
11578               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11579 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11580               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11581 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11582               BOOT_JDK_FOUND=no
11583             else
11584               # We're done! :-)
11585               BOOT_JDK_FOUND=yes
11586 
11587   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11588 
11589   # Input might be given as Windows format, start by converting to
11590   # unix format.
11591   path="$BOOT_JDK"
11592   new_path=`$CYGPATH -u "$path"`
11593 
11594   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11595   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11596   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11597   # "foo.exe" is OK but "foo" is an error.
11598   #
11599   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11600   # It is also a way to make sure we got the proper file name for the real test later on.
11601   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11602   if test "x$test_shortpath" = x; then
11603     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11604 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11605     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11606   fi
11607 
11608   # Call helper function which possibly converts this using DOS-style short mode.
11609   # If so, the updated path is stored in $new_path.
11610 
11611   input_path="$new_path"
11612   # Check if we need to convert this using DOS-style short mode. If the path
11613   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11614   # take no chances and rewrite it.
11615   # Note: m4 eats our [], so we need to use [ and ] instead.
11616   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11617   if test "x$has_forbidden_chars" != x; then
11618     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11619     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11620     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11621     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11622       # Going to short mode and back again did indeed matter. Since short mode is
11623       # case insensitive, let's make it lowercase to improve readability.
11624       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11625       # Now convert it back to Unix-stile (cygpath)
11626       input_path=`$CYGPATH -u "$shortmode_path"`
11627       new_path="$input_path"
11628     fi
11629   fi
11630 
11631   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11632   if test "x$test_cygdrive_prefix" = x; then
11633     # As a simple fix, exclude /usr/bin since it's not a real path.
11634     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11635       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11636       # a path prefixed by /cygdrive for fixpath to work.
11637       new_path="$CYGWIN_ROOT_PATH$input_path"
11638     fi
11639   fi
11640 
11641 
11642   if test "x$path" != "x$new_path"; then
11643     BOOT_JDK="$new_path"
11644     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11645 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11646   fi
11647 
11648   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11649 
11650   path="$BOOT_JDK"
11651   has_colon=`$ECHO $path | $GREP ^.:`
11652   new_path="$path"
11653   if test "x$has_colon" = x; then
11654     # Not in mixed or Windows style, start by that.
11655     new_path=`cmd //c echo $path`
11656   fi
11657 
11658 
11659   input_path="$new_path"
11660   # Check if we need to convert this using DOS-style short mode. If the path
11661   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11662   # take no chances and rewrite it.
11663   # Note: m4 eats our [], so we need to use [ and ] instead.
11664   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11665   if test "x$has_forbidden_chars" != x; then
11666     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11667     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11668   fi
11669 
11670 
11671   windows_path="$new_path"
11672   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11673     unix_path=`$CYGPATH -u "$windows_path"`
11674     new_path="$unix_path"
11675   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11676     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11677     new_path="$unix_path"
11678   fi
11679 
11680   if test "x$path" != "x$new_path"; then
11681     BOOT_JDK="$new_path"
11682     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11683 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11684   fi
11685 
11686   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11687   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11688 
11689   else
11690     # We're on a posix platform. Hooray! :)
11691     path="$BOOT_JDK"
11692 
11693     if test ! -f "$path" && test ! -d "$path"; then
11694       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11695     fi
11696 
11697     has_space=`$ECHO "$path" | $GREP " "`
11698     if test "x$has_space" != x; then
11699       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11700 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11701       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11702     fi
11703   fi
11704 
11705               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11706 $as_echo_n "checking for Boot JDK... " >&6; }
11707               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11708 $as_echo "$BOOT_JDK" >&6; }
11709               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11710 $as_echo_n "checking Boot JDK version... " >&6; }
11711               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11712               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11713 $as_echo "$BOOT_JDK_VERSION" >&6; }
11714             fi # end check jdk version
11715           fi # end check rt.jar
11716         fi # end check javac
11717       fi # end check java
11718     fi # end check boot jdk found
11719   fi
11720 
11721 
11722 # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
11723 
11724   if test "x$BOOT_JDK_FOUND" = xno; then
11725     # Now execute the test
11726 
11727     if test -x /usr/libexec/java_home; then
11728         BOOT_JDK=`/usr/libexec/java_home`
11729         BOOT_JDK_FOUND=maybe
11730         { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
11731 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
11732     fi
11733 
11734 
11735     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11736     if test "x$BOOT_JDK_FOUND" = xmaybe; then
11737       # Do we have a bin/java?
11738       if test ! -x "$BOOT_JDK/bin/java"; then
11739         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11740 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11741         BOOT_JDK_FOUND=no
11742       else
11743         # Do we have a bin/javac?
11744         if test ! -x "$BOOT_JDK/bin/javac"; then
11745           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11746 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11747           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11748 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11749           BOOT_JDK_FOUND=no
11750         else
11751           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11752           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11753             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11754 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11755             BOOT_JDK_FOUND=no
11756           else
11757             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11758             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11759 
11760             # Extra M4 quote needed to protect [] in grep expression.
11761             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11762             if test "x$FOUND_VERSION_78" = x; then
11763               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11764 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11765               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11766 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11767               BOOT_JDK_FOUND=no
11768             else
11769               # We're done! :-)
11770               BOOT_JDK_FOUND=yes
11771 
11772   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11773 
11774   # Input might be given as Windows format, start by converting to
11775   # unix format.
11776   path="$BOOT_JDK"
11777   new_path=`$CYGPATH -u "$path"`
11778 
11779   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11780   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11781   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11782   # "foo.exe" is OK but "foo" is an error.
11783   #
11784   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11785   # It is also a way to make sure we got the proper file name for the real test later on.
11786   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11787   if test "x$test_shortpath" = x; then
11788     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11789 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11790     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11791   fi
11792 
11793   # Call helper function which possibly converts this using DOS-style short mode.
11794   # If so, the updated path is stored in $new_path.
11795 
11796   input_path="$new_path"
11797   # Check if we need to convert this using DOS-style short mode. If the path
11798   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11799   # take no chances and rewrite it.
11800   # Note: m4 eats our [], so we need to use [ and ] instead.
11801   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11802   if test "x$has_forbidden_chars" != x; then
11803     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11804     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11805     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11806     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11807       # Going to short mode and back again did indeed matter. Since short mode is
11808       # case insensitive, let's make it lowercase to improve readability.
11809       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11810       # Now convert it back to Unix-stile (cygpath)
11811       input_path=`$CYGPATH -u "$shortmode_path"`
11812       new_path="$input_path"
11813     fi
11814   fi
11815 
11816   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11817   if test "x$test_cygdrive_prefix" = x; then
11818     # As a simple fix, exclude /usr/bin since it's not a real path.
11819     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11820       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11821       # a path prefixed by /cygdrive for fixpath to work.
11822       new_path="$CYGWIN_ROOT_PATH$input_path"
11823     fi
11824   fi
11825 
11826 
11827   if test "x$path" != "x$new_path"; then
11828     BOOT_JDK="$new_path"
11829     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11830 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11831   fi
11832 
11833   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11834 
11835   path="$BOOT_JDK"
11836   has_colon=`$ECHO $path | $GREP ^.:`
11837   new_path="$path"
11838   if test "x$has_colon" = x; then
11839     # Not in mixed or Windows style, start by that.
11840     new_path=`cmd //c echo $path`
11841   fi
11842 
11843 
11844   input_path="$new_path"
11845   # Check if we need to convert this using DOS-style short mode. If the path
11846   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11847   # take no chances and rewrite it.
11848   # Note: m4 eats our [], so we need to use [ and ] instead.
11849   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11850   if test "x$has_forbidden_chars" != x; then
11851     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11852     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11853   fi
11854 
11855 
11856   windows_path="$new_path"
11857   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11858     unix_path=`$CYGPATH -u "$windows_path"`
11859     new_path="$unix_path"
11860   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11861     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11862     new_path="$unix_path"
11863   fi
11864 
11865   if test "x$path" != "x$new_path"; then
11866     BOOT_JDK="$new_path"
11867     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11868 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11869   fi
11870 
11871   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11872   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11873 
11874   else
11875     # We're on a posix platform. Hooray! :)
11876     path="$BOOT_JDK"
11877 
11878     if test ! -f "$path" && test ! -d "$path"; then
11879       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11880     fi
11881 
11882     has_space=`$ECHO "$path" | $GREP " "`
11883     if test "x$has_space" != x; then
11884       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11885 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11886       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11887     fi
11888   fi
11889 
11890               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11891 $as_echo_n "checking for Boot JDK... " >&6; }
11892               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11893 $as_echo "$BOOT_JDK" >&6; }
11894               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11895 $as_echo_n "checking Boot JDK version... " >&6; }
11896               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11897               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11898 $as_echo "$BOOT_JDK_VERSION" >&6; }
11899             fi # end check jdk version
11900           fi # end check rt.jar
11901         fi # end check javac
11902       fi # end check java
11903     fi # end check boot jdk found
11904   fi
11905 
11906 
11907 # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
11908 
11909   if test "x$BOOT_JDK_FOUND" = xno; then
11910     # Now execute the test
11911 
11912     # Extract the first word of "javac", so it can be a program name with args.
11913 set dummy javac; ac_word=$2
11914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11915 $as_echo_n "checking for $ac_word... " >&6; }
11916 if ${ac_cv_path_JAVAC_CHECK+:} false; then :
11917   $as_echo_n "(cached) " >&6
11918 else
11919   case $JAVAC_CHECK in
11920   [\\/]* | ?:[\\/]*)
11921   ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
11922   ;;
11923   *)
11924   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11925 for as_dir in $PATH
11926 do
11927   IFS=$as_save_IFS
11928   test -z "$as_dir" && as_dir=.
11929     for ac_exec_ext in '' $ac_executable_extensions; do
11930   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11931     ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
11932     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11933     break 2
11934   fi
11935 done
11936   done
11937 IFS=$as_save_IFS
11938 
11939   ;;
11940 esac
11941 fi
11942 JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
11943 if test -n "$JAVAC_CHECK"; then
11944   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
11945 $as_echo "$JAVAC_CHECK" >&6; }
11946 else
11947   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11948 $as_echo "no" >&6; }
11949 fi
11950 
11951 
11952     # Extract the first word of "java", so it can be a program name with args.
11953 set dummy java; ac_word=$2
11954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11955 $as_echo_n "checking for $ac_word... " >&6; }
11956 if ${ac_cv_path_JAVA_CHECK+:} false; then :
11957   $as_echo_n "(cached) " >&6
11958 else
11959   case $JAVA_CHECK in
11960   [\\/]* | ?:[\\/]*)
11961   ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
11962   ;;
11963   *)
11964   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11965 for as_dir in $PATH
11966 do
11967   IFS=$as_save_IFS
11968   test -z "$as_dir" && as_dir=.
11969     for ac_exec_ext in '' $ac_executable_extensions; do
11970   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11971     ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
11972     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11973     break 2
11974   fi
11975 done
11976   done
11977 IFS=$as_save_IFS
11978 
11979   ;;
11980 esac
11981 fi
11982 JAVA_CHECK=$ac_cv_path_JAVA_CHECK
11983 if test -n "$JAVA_CHECK"; then
11984   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
11985 $as_echo "$JAVA_CHECK" >&6; }
11986 else
11987   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11988 $as_echo "no" >&6; }
11989 fi
11990 
11991 
11992     BINARY="$JAVAC_CHECK"
11993     if test "x$JAVAC_CHECK" = x; then
11994         BINARY="$JAVA_CHECK"
11995     fi
11996     if test "x$BINARY" != x; then
11997         # So there is a java(c) binary, it might be part of a JDK.
11998         # Lets find the JDK/JRE directory by following symbolic links.
11999         # Linux/GNU systems often have links from /usr/bin/java to
12000         # /etc/alternatives/java to the real JDK binary.
12001 
12002     if test "x$OPENJDK_BUILD_OS" != xwindows; then
12003         # Follow a chain of symbolic links. Use readlink
12004         # where it exists, else fall back to horribly
12005         # complicated shell code.
12006         if test "x$READLINK_TESTED" != yes; then
12007             # On MacOSX there is a readlink tool with a different
12008             # purpose than the GNU readlink tool. Check the found readlink.
12009             ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
12010             if test "x$ISGNU" = x; then
12011                  # A readlink that we do not know how to use.
12012                  # Are there other non-GNU readlinks out there?
12013                  READLINK_TESTED=yes
12014                  READLINK=
12015             fi
12016         fi
12017 
12018         if test "x$READLINK" != x; then
12019             BINARY=`$READLINK -f $BINARY`
12020         else
12021             # Save the current directory for restoring afterwards
12022             STARTDIR=$PWD
12023             COUNTER=0
12024             sym_link_dir=`$DIRNAME $BINARY`
12025             sym_link_file=`$BASENAME $BINARY`
12026             # Use the system pwd and not the shell builtin to resolve directory symlinks
12027             cd $sym_link_dir
12028             cd `$THEPWDCMD`
12029             sym_link_dir=`$THEPWDCMD`
12030             # Resolve file symlinks
12031             while test $COUNTER -lt 20; do
12032                 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
12033                 if test "x$ISLINK" == x; then
12034                     # This is not a symbolic link! We are done!
12035                     break
12036                 fi
12037                 # Again resolve directory symlinks since the target of the just found
12038                 # link could be in a different directory
12039                 cd `$DIRNAME $ISLINK`
12040                 sym_link_dir=`$THEPWDCMD`
12041                 sym_link_file=`$BASENAME $ISLINK`
12042                 let COUNTER=COUNTER+1
12043             done
12044             cd $STARTDIR
12045             BINARY=$sym_link_dir/$sym_link_file
12046         fi
12047     fi
12048 
12049         BOOT_JDK=`dirname "$BINARY"`
12050         BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
12051         if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
12052             # Looks like we found ourselves an JDK
12053             BOOT_JDK_FOUND=maybe
12054             { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
12055 $as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
12056         fi
12057     fi
12058 
12059 
12060     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12061     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12062       # Do we have a bin/java?
12063       if test ! -x "$BOOT_JDK/bin/java"; then
12064         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12065 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12066         BOOT_JDK_FOUND=no
12067       else
12068         # Do we have a bin/javac?
12069         if test ! -x "$BOOT_JDK/bin/javac"; then
12070           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12071 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12072           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12073 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12074           BOOT_JDK_FOUND=no
12075         else
12076           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12077           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12078             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12079 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12080             BOOT_JDK_FOUND=no
12081           else
12082             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12083             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12084 
12085             # Extra M4 quote needed to protect [] in grep expression.
12086             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12087             if test "x$FOUND_VERSION_78" = x; then
12088               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12089 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12090               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12091 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12092               BOOT_JDK_FOUND=no
12093             else
12094               # We're done! :-)
12095               BOOT_JDK_FOUND=yes
12096 
12097   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12098 
12099   # Input might be given as Windows format, start by converting to
12100   # unix format.
12101   path="$BOOT_JDK"
12102   new_path=`$CYGPATH -u "$path"`
12103 
12104   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12105   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12106   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12107   # "foo.exe" is OK but "foo" is an error.
12108   #
12109   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12110   # It is also a way to make sure we got the proper file name for the real test later on.
12111   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12112   if test "x$test_shortpath" = x; then
12113     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12114 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12115     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12116   fi
12117 
12118   # Call helper function which possibly converts this using DOS-style short mode.
12119   # If so, the updated path is stored in $new_path.
12120 
12121   input_path="$new_path"
12122   # Check if we need to convert this using DOS-style short mode. If the path
12123   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12124   # take no chances and rewrite it.
12125   # Note: m4 eats our [], so we need to use [ and ] instead.
12126   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12127   if test "x$has_forbidden_chars" != x; then
12128     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12129     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12130     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12131     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12132       # Going to short mode and back again did indeed matter. Since short mode is
12133       # case insensitive, let's make it lowercase to improve readability.
12134       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12135       # Now convert it back to Unix-stile (cygpath)
12136       input_path=`$CYGPATH -u "$shortmode_path"`
12137       new_path="$input_path"
12138     fi
12139   fi
12140 
12141   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12142   if test "x$test_cygdrive_prefix" = x; then
12143     # As a simple fix, exclude /usr/bin since it's not a real path.
12144     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12145       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12146       # a path prefixed by /cygdrive for fixpath to work.
12147       new_path="$CYGWIN_ROOT_PATH$input_path"
12148     fi
12149   fi
12150 
12151 
12152   if test "x$path" != "x$new_path"; then
12153     BOOT_JDK="$new_path"
12154     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12155 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12156   fi
12157 
12158   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12159 
12160   path="$BOOT_JDK"
12161   has_colon=`$ECHO $path | $GREP ^.:`
12162   new_path="$path"
12163   if test "x$has_colon" = x; then
12164     # Not in mixed or Windows style, start by that.
12165     new_path=`cmd //c echo $path`
12166   fi
12167 
12168 
12169   input_path="$new_path"
12170   # Check if we need to convert this using DOS-style short mode. If the path
12171   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12172   # take no chances and rewrite it.
12173   # Note: m4 eats our [], so we need to use [ and ] instead.
12174   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12175   if test "x$has_forbidden_chars" != x; then
12176     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12177     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12178   fi
12179 
12180 
12181   windows_path="$new_path"
12182   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12183     unix_path=`$CYGPATH -u "$windows_path"`
12184     new_path="$unix_path"
12185   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12186     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12187     new_path="$unix_path"
12188   fi
12189 
12190   if test "x$path" != "x$new_path"; then
12191     BOOT_JDK="$new_path"
12192     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12193 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12194   fi
12195 
12196   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12197   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12198 
12199   else
12200     # We're on a posix platform. Hooray! :)
12201     path="$BOOT_JDK"
12202 
12203     if test ! -f "$path" && test ! -d "$path"; then
12204       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12205     fi
12206 
12207     has_space=`$ECHO "$path" | $GREP " "`
12208     if test "x$has_space" != x; then
12209       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12210 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12211       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12212     fi
12213   fi
12214 
12215               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12216 $as_echo_n "checking for Boot JDK... " >&6; }
12217               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12218 $as_echo "$BOOT_JDK" >&6; }
12219               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12220 $as_echo_n "checking Boot JDK version... " >&6; }
12221               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12222               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12223 $as_echo "$BOOT_JDK_VERSION" >&6; }
12224             fi # end check jdk version
12225           fi # end check rt.jar
12226         fi # end check javac
12227       fi # end check java
12228     fi # end check boot jdk found
12229   fi
12230 
12231 
12232 # Test: Is there a JDK installed in default, well-known locations?
12233 
12234   if test "x$BOOT_JDK_FOUND" = xno; then
12235     # Now execute the test
12236 
12237   if test "x$OPENJDK_TARGET_OS" = xwindows; then
12238 
12239   if test "x$BOOT_JDK_FOUND" = xno; then
12240     # Now execute the test
12241 
12242   if test "x$ProgramW6432" != x; then
12243     VIRTUAL_DIR="$ProgramW6432/Java"
12244 
12245   windows_path="$VIRTUAL_DIR"
12246   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12247     unix_path=`$CYGPATH -u "$windows_path"`
12248     VIRTUAL_DIR="$unix_path"
12249   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12250     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12251     VIRTUAL_DIR="$unix_path"
12252   fi
12253 
12254 
12255   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12256   BOOT_JDK_SUFFIX=""
12257   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12258   if test "x$ALL_JDKS_FOUND" != x; then
12259     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12260 
12261   if test "x$BOOT_JDK_FOUND" = xno; then
12262     # Now execute the test
12263 
12264         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12265         if test -d "$BOOT_JDK"; then
12266           BOOT_JDK_FOUND=maybe
12267           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12268 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12269         fi
12270 
12271 
12272     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12273     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12274       # Do we have a bin/java?
12275       if test ! -x "$BOOT_JDK/bin/java"; then
12276         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12277 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12278         BOOT_JDK_FOUND=no
12279       else
12280         # Do we have a bin/javac?
12281         if test ! -x "$BOOT_JDK/bin/javac"; then
12282           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12283 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12284           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12285 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12286           BOOT_JDK_FOUND=no
12287         else
12288           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12289           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12290             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12291 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12292             BOOT_JDK_FOUND=no
12293           else
12294             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12295             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12296 
12297             # Extra M4 quote needed to protect [] in grep expression.
12298             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12299             if test "x$FOUND_VERSION_78" = x; then
12300               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12301 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12302               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12303 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12304               BOOT_JDK_FOUND=no
12305             else
12306               # We're done! :-)
12307               BOOT_JDK_FOUND=yes
12308 
12309   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12310 
12311   # Input might be given as Windows format, start by converting to
12312   # unix format.
12313   path="$BOOT_JDK"
12314   new_path=`$CYGPATH -u "$path"`
12315 
12316   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12317   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12318   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12319   # "foo.exe" is OK but "foo" is an error.
12320   #
12321   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12322   # It is also a way to make sure we got the proper file name for the real test later on.
12323   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12324   if test "x$test_shortpath" = x; then
12325     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12326 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12327     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12328   fi
12329 
12330   # Call helper function which possibly converts this using DOS-style short mode.
12331   # If so, the updated path is stored in $new_path.
12332 
12333   input_path="$new_path"
12334   # Check if we need to convert this using DOS-style short mode. If the path
12335   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12336   # take no chances and rewrite it.
12337   # Note: m4 eats our [], so we need to use [ and ] instead.
12338   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12339   if test "x$has_forbidden_chars" != x; then
12340     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12341     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12342     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12343     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12344       # Going to short mode and back again did indeed matter. Since short mode is
12345       # case insensitive, let's make it lowercase to improve readability.
12346       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12347       # Now convert it back to Unix-stile (cygpath)
12348       input_path=`$CYGPATH -u "$shortmode_path"`
12349       new_path="$input_path"
12350     fi
12351   fi
12352 
12353   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12354   if test "x$test_cygdrive_prefix" = x; then
12355     # As a simple fix, exclude /usr/bin since it's not a real path.
12356     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12357       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12358       # a path prefixed by /cygdrive for fixpath to work.
12359       new_path="$CYGWIN_ROOT_PATH$input_path"
12360     fi
12361   fi
12362 
12363 
12364   if test "x$path" != "x$new_path"; then
12365     BOOT_JDK="$new_path"
12366     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12367 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12368   fi
12369 
12370   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12371 
12372   path="$BOOT_JDK"
12373   has_colon=`$ECHO $path | $GREP ^.:`
12374   new_path="$path"
12375   if test "x$has_colon" = x; then
12376     # Not in mixed or Windows style, start by that.
12377     new_path=`cmd //c echo $path`
12378   fi
12379 
12380 
12381   input_path="$new_path"
12382   # Check if we need to convert this using DOS-style short mode. If the path
12383   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12384   # take no chances and rewrite it.
12385   # Note: m4 eats our [], so we need to use [ and ] instead.
12386   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12387   if test "x$has_forbidden_chars" != x; then
12388     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12389     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12390   fi
12391 
12392 
12393   windows_path="$new_path"
12394   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12395     unix_path=`$CYGPATH -u "$windows_path"`
12396     new_path="$unix_path"
12397   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12398     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12399     new_path="$unix_path"
12400   fi
12401 
12402   if test "x$path" != "x$new_path"; then
12403     BOOT_JDK="$new_path"
12404     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12405 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12406   fi
12407 
12408   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12409   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12410 
12411   else
12412     # We're on a posix platform. Hooray! :)
12413     path="$BOOT_JDK"
12414 
12415     if test ! -f "$path" && test ! -d "$path"; then
12416       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12417     fi
12418 
12419     has_space=`$ECHO "$path" | $GREP " "`
12420     if test "x$has_space" != x; then
12421       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12422 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12423       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12424     fi
12425   fi
12426 
12427               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12428 $as_echo_n "checking for Boot JDK... " >&6; }
12429               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12430 $as_echo "$BOOT_JDK" >&6; }
12431               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12432 $as_echo_n "checking Boot JDK version... " >&6; }
12433               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12434               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12435 $as_echo "$BOOT_JDK_VERSION" >&6; }
12436             fi # end check jdk version
12437           fi # end check rt.jar
12438         fi # end check javac
12439       fi # end check java
12440     fi # end check boot jdk found
12441   fi
12442 
12443     done
12444   fi
12445 
12446   fi
12447 
12448 
12449     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12450     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12451       # Do we have a bin/java?
12452       if test ! -x "$BOOT_JDK/bin/java"; then
12453         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12454 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12455         BOOT_JDK_FOUND=no
12456       else
12457         # Do we have a bin/javac?
12458         if test ! -x "$BOOT_JDK/bin/javac"; then
12459           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12460 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12461           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12462 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12463           BOOT_JDK_FOUND=no
12464         else
12465           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12466           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12467             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12468 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12469             BOOT_JDK_FOUND=no
12470           else
12471             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12472             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12473 
12474             # Extra M4 quote needed to protect [] in grep expression.
12475             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12476             if test "x$FOUND_VERSION_78" = x; then
12477               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12478 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12479               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12480 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12481               BOOT_JDK_FOUND=no
12482             else
12483               # We're done! :-)
12484               BOOT_JDK_FOUND=yes
12485 
12486   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12487 
12488   # Input might be given as Windows format, start by converting to
12489   # unix format.
12490   path="$BOOT_JDK"
12491   new_path=`$CYGPATH -u "$path"`
12492 
12493   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12494   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12495   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12496   # "foo.exe" is OK but "foo" is an error.
12497   #
12498   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12499   # It is also a way to make sure we got the proper file name for the real test later on.
12500   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12501   if test "x$test_shortpath" = x; then
12502     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12503 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12504     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12505   fi
12506 
12507   # Call helper function which possibly converts this using DOS-style short mode.
12508   # If so, the updated path is stored in $new_path.
12509 
12510   input_path="$new_path"
12511   # Check if we need to convert this using DOS-style short mode. If the path
12512   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12513   # take no chances and rewrite it.
12514   # Note: m4 eats our [], so we need to use [ and ] instead.
12515   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12516   if test "x$has_forbidden_chars" != x; then
12517     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12518     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12519     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12520     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12521       # Going to short mode and back again did indeed matter. Since short mode is
12522       # case insensitive, let's make it lowercase to improve readability.
12523       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12524       # Now convert it back to Unix-stile (cygpath)
12525       input_path=`$CYGPATH -u "$shortmode_path"`
12526       new_path="$input_path"
12527     fi
12528   fi
12529 
12530   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12531   if test "x$test_cygdrive_prefix" = x; then
12532     # As a simple fix, exclude /usr/bin since it's not a real path.
12533     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12534       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12535       # a path prefixed by /cygdrive for fixpath to work.
12536       new_path="$CYGWIN_ROOT_PATH$input_path"
12537     fi
12538   fi
12539 
12540 
12541   if test "x$path" != "x$new_path"; then
12542     BOOT_JDK="$new_path"
12543     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12544 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12545   fi
12546 
12547   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12548 
12549   path="$BOOT_JDK"
12550   has_colon=`$ECHO $path | $GREP ^.:`
12551   new_path="$path"
12552   if test "x$has_colon" = x; then
12553     # Not in mixed or Windows style, start by that.
12554     new_path=`cmd //c echo $path`
12555   fi
12556 
12557 
12558   input_path="$new_path"
12559   # Check if we need to convert this using DOS-style short mode. If the path
12560   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12561   # take no chances and rewrite it.
12562   # Note: m4 eats our [], so we need to use [ and ] instead.
12563   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12564   if test "x$has_forbidden_chars" != x; then
12565     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12566     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12567   fi
12568 
12569 
12570   windows_path="$new_path"
12571   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12572     unix_path=`$CYGPATH -u "$windows_path"`
12573     new_path="$unix_path"
12574   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12575     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12576     new_path="$unix_path"
12577   fi
12578 
12579   if test "x$path" != "x$new_path"; then
12580     BOOT_JDK="$new_path"
12581     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12582 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12583   fi
12584 
12585   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12586   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12587 
12588   else
12589     # We're on a posix platform. Hooray! :)
12590     path="$BOOT_JDK"
12591 
12592     if test ! -f "$path" && test ! -d "$path"; then
12593       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12594     fi
12595 
12596     has_space=`$ECHO "$path" | $GREP " "`
12597     if test "x$has_space" != x; then
12598       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12599 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12600       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12601     fi
12602   fi
12603 
12604               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12605 $as_echo_n "checking for Boot JDK... " >&6; }
12606               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12607 $as_echo "$BOOT_JDK" >&6; }
12608               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12609 $as_echo_n "checking Boot JDK version... " >&6; }
12610               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12611               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12612 $as_echo "$BOOT_JDK_VERSION" >&6; }
12613             fi # end check jdk version
12614           fi # end check rt.jar
12615         fi # end check javac
12616       fi # end check java
12617     fi # end check boot jdk found
12618   fi
12619 
12620 
12621   if test "x$BOOT_JDK_FOUND" = xno; then
12622     # Now execute the test
12623 
12624   if test "x$PROGRAMW6432" != x; then
12625     VIRTUAL_DIR="$PROGRAMW6432/Java"
12626 
12627   windows_path="$VIRTUAL_DIR"
12628   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12629     unix_path=`$CYGPATH -u "$windows_path"`
12630     VIRTUAL_DIR="$unix_path"
12631   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12632     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12633     VIRTUAL_DIR="$unix_path"
12634   fi
12635 
12636 
12637   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12638   BOOT_JDK_SUFFIX=""
12639   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12640   if test "x$ALL_JDKS_FOUND" != x; then
12641     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12642 
12643   if test "x$BOOT_JDK_FOUND" = xno; then
12644     # Now execute the test
12645 
12646         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12647         if test -d "$BOOT_JDK"; then
12648           BOOT_JDK_FOUND=maybe
12649           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12650 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12651         fi
12652 
12653 
12654     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12655     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12656       # Do we have a bin/java?
12657       if test ! -x "$BOOT_JDK/bin/java"; then
12658         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12659 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12660         BOOT_JDK_FOUND=no
12661       else
12662         # Do we have a bin/javac?
12663         if test ! -x "$BOOT_JDK/bin/javac"; then
12664           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12665 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12666           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12667 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12668           BOOT_JDK_FOUND=no
12669         else
12670           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12671           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12672             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12673 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12674             BOOT_JDK_FOUND=no
12675           else
12676             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12677             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12678 
12679             # Extra M4 quote needed to protect [] in grep expression.
12680             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12681             if test "x$FOUND_VERSION_78" = x; then
12682               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12683 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12684               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12685 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12686               BOOT_JDK_FOUND=no
12687             else
12688               # We're done! :-)
12689               BOOT_JDK_FOUND=yes
12690 
12691   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12692 
12693   # Input might be given as Windows format, start by converting to
12694   # unix format.
12695   path="$BOOT_JDK"
12696   new_path=`$CYGPATH -u "$path"`
12697 
12698   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12699   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12700   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12701   # "foo.exe" is OK but "foo" is an error.
12702   #
12703   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12704   # It is also a way to make sure we got the proper file name for the real test later on.
12705   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12706   if test "x$test_shortpath" = x; then
12707     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12708 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12709     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12710   fi
12711 
12712   # Call helper function which possibly converts this using DOS-style short mode.
12713   # If so, the updated path is stored in $new_path.
12714 
12715   input_path="$new_path"
12716   # Check if we need to convert this using DOS-style short mode. If the path
12717   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12718   # take no chances and rewrite it.
12719   # Note: m4 eats our [], so we need to use [ and ] instead.
12720   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12721   if test "x$has_forbidden_chars" != x; then
12722     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12723     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12724     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12725     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12726       # Going to short mode and back again did indeed matter. Since short mode is
12727       # case insensitive, let's make it lowercase to improve readability.
12728       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12729       # Now convert it back to Unix-stile (cygpath)
12730       input_path=`$CYGPATH -u "$shortmode_path"`
12731       new_path="$input_path"
12732     fi
12733   fi
12734 
12735   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12736   if test "x$test_cygdrive_prefix" = x; then
12737     # As a simple fix, exclude /usr/bin since it's not a real path.
12738     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12739       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12740       # a path prefixed by /cygdrive for fixpath to work.
12741       new_path="$CYGWIN_ROOT_PATH$input_path"
12742     fi
12743   fi
12744 
12745 
12746   if test "x$path" != "x$new_path"; then
12747     BOOT_JDK="$new_path"
12748     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12749 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12750   fi
12751 
12752   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12753 
12754   path="$BOOT_JDK"
12755   has_colon=`$ECHO $path | $GREP ^.:`
12756   new_path="$path"
12757   if test "x$has_colon" = x; then
12758     # Not in mixed or Windows style, start by that.
12759     new_path=`cmd //c echo $path`
12760   fi
12761 
12762 
12763   input_path="$new_path"
12764   # Check if we need to convert this using DOS-style short mode. If the path
12765   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12766   # take no chances and rewrite it.
12767   # Note: m4 eats our [], so we need to use [ and ] instead.
12768   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12769   if test "x$has_forbidden_chars" != x; then
12770     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12771     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12772   fi
12773 
12774 
12775   windows_path="$new_path"
12776   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12777     unix_path=`$CYGPATH -u "$windows_path"`
12778     new_path="$unix_path"
12779   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12780     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12781     new_path="$unix_path"
12782   fi
12783 
12784   if test "x$path" != "x$new_path"; then
12785     BOOT_JDK="$new_path"
12786     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12787 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12788   fi
12789 
12790   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12791   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12792 
12793   else
12794     # We're on a posix platform. Hooray! :)
12795     path="$BOOT_JDK"
12796 
12797     if test ! -f "$path" && test ! -d "$path"; then
12798       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12799     fi
12800 
12801     has_space=`$ECHO "$path" | $GREP " "`
12802     if test "x$has_space" != x; then
12803       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12804 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12805       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12806     fi
12807   fi
12808 
12809               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12810 $as_echo_n "checking for Boot JDK... " >&6; }
12811               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12812 $as_echo "$BOOT_JDK" >&6; }
12813               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12814 $as_echo_n "checking Boot JDK version... " >&6; }
12815               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12816               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12817 $as_echo "$BOOT_JDK_VERSION" >&6; }
12818             fi # end check jdk version
12819           fi # end check rt.jar
12820         fi # end check javac
12821       fi # end check java
12822     fi # end check boot jdk found
12823   fi
12824 
12825     done
12826   fi
12827 
12828   fi
12829 
12830 
12831     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12832     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12833       # Do we have a bin/java?
12834       if test ! -x "$BOOT_JDK/bin/java"; then
12835         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12836 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12837         BOOT_JDK_FOUND=no
12838       else
12839         # Do we have a bin/javac?
12840         if test ! -x "$BOOT_JDK/bin/javac"; then
12841           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12842 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12843           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12844 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12845           BOOT_JDK_FOUND=no
12846         else
12847           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12848           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12849             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12850 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12851             BOOT_JDK_FOUND=no
12852           else
12853             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12854             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12855 
12856             # Extra M4 quote needed to protect [] in grep expression.
12857             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12858             if test "x$FOUND_VERSION_78" = x; then
12859               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12860 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12861               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12862 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12863               BOOT_JDK_FOUND=no
12864             else
12865               # We're done! :-)
12866               BOOT_JDK_FOUND=yes
12867 
12868   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12869 
12870   # Input might be given as Windows format, start by converting to
12871   # unix format.
12872   path="$BOOT_JDK"
12873   new_path=`$CYGPATH -u "$path"`
12874 
12875   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12876   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12877   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12878   # "foo.exe" is OK but "foo" is an error.
12879   #
12880   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12881   # It is also a way to make sure we got the proper file name for the real test later on.
12882   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12883   if test "x$test_shortpath" = x; then
12884     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12885 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12886     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12887   fi
12888 
12889   # Call helper function which possibly converts this using DOS-style short mode.
12890   # If so, the updated path is stored in $new_path.
12891 
12892   input_path="$new_path"
12893   # Check if we need to convert this using DOS-style short mode. If the path
12894   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12895   # take no chances and rewrite it.
12896   # Note: m4 eats our [], so we need to use [ and ] instead.
12897   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12898   if test "x$has_forbidden_chars" != x; then
12899     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12900     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12901     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12902     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12903       # Going to short mode and back again did indeed matter. Since short mode is
12904       # case insensitive, let's make it lowercase to improve readability.
12905       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12906       # Now convert it back to Unix-stile (cygpath)
12907       input_path=`$CYGPATH -u "$shortmode_path"`
12908       new_path="$input_path"
12909     fi
12910   fi
12911 
12912   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12913   if test "x$test_cygdrive_prefix" = x; then
12914     # As a simple fix, exclude /usr/bin since it's not a real path.
12915     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12916       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12917       # a path prefixed by /cygdrive for fixpath to work.
12918       new_path="$CYGWIN_ROOT_PATH$input_path"
12919     fi
12920   fi
12921 
12922 
12923   if test "x$path" != "x$new_path"; then
12924     BOOT_JDK="$new_path"
12925     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12926 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12927   fi
12928 
12929   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12930 
12931   path="$BOOT_JDK"
12932   has_colon=`$ECHO $path | $GREP ^.:`
12933   new_path="$path"
12934   if test "x$has_colon" = x; then
12935     # Not in mixed or Windows style, start by that.
12936     new_path=`cmd //c echo $path`
12937   fi
12938 
12939 
12940   input_path="$new_path"
12941   # Check if we need to convert this using DOS-style short mode. If the path
12942   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12943   # take no chances and rewrite it.
12944   # Note: m4 eats our [], so we need to use [ and ] instead.
12945   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12946   if test "x$has_forbidden_chars" != x; then
12947     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12948     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12949   fi
12950 
12951 
12952   windows_path="$new_path"
12953   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12954     unix_path=`$CYGPATH -u "$windows_path"`
12955     new_path="$unix_path"
12956   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12957     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12958     new_path="$unix_path"
12959   fi
12960 
12961   if test "x$path" != "x$new_path"; then
12962     BOOT_JDK="$new_path"
12963     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12964 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12965   fi
12966 
12967   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12968   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12969 
12970   else
12971     # We're on a posix platform. Hooray! :)
12972     path="$BOOT_JDK"
12973 
12974     if test ! -f "$path" && test ! -d "$path"; then
12975       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12976     fi
12977 
12978     has_space=`$ECHO "$path" | $GREP " "`
12979     if test "x$has_space" != x; then
12980       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12981 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12982       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12983     fi
12984   fi
12985 
12986               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12987 $as_echo_n "checking for Boot JDK... " >&6; }
12988               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12989 $as_echo "$BOOT_JDK" >&6; }
12990               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12991 $as_echo_n "checking Boot JDK version... " >&6; }
12992               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12993               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12994 $as_echo "$BOOT_JDK_VERSION" >&6; }
12995             fi # end check jdk version
12996           fi # end check rt.jar
12997         fi # end check javac
12998       fi # end check java
12999     fi # end check boot jdk found
13000   fi
13001 
13002 
13003   if test "x$BOOT_JDK_FOUND" = xno; then
13004     # Now execute the test
13005 
13006   if test "x$PROGRAMFILES" != x; then
13007     VIRTUAL_DIR="$PROGRAMFILES/Java"
13008 
13009   windows_path="$VIRTUAL_DIR"
13010   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13011     unix_path=`$CYGPATH -u "$windows_path"`
13012     VIRTUAL_DIR="$unix_path"
13013   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13014     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13015     VIRTUAL_DIR="$unix_path"
13016   fi
13017 
13018 
13019   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13020   BOOT_JDK_SUFFIX=""
13021   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13022   if test "x$ALL_JDKS_FOUND" != x; then
13023     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13024 
13025   if test "x$BOOT_JDK_FOUND" = xno; then
13026     # Now execute the test
13027 
13028         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13029         if test -d "$BOOT_JDK"; then
13030           BOOT_JDK_FOUND=maybe
13031           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13032 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13033         fi
13034 
13035 
13036     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13037     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13038       # Do we have a bin/java?
13039       if test ! -x "$BOOT_JDK/bin/java"; then
13040         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13041 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13042         BOOT_JDK_FOUND=no
13043       else
13044         # Do we have a bin/javac?
13045         if test ! -x "$BOOT_JDK/bin/javac"; then
13046           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13047 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13048           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13049 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13050           BOOT_JDK_FOUND=no
13051         else
13052           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13053           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13054             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13055 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13056             BOOT_JDK_FOUND=no
13057           else
13058             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13059             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13060 
13061             # Extra M4 quote needed to protect [] in grep expression.
13062             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13063             if test "x$FOUND_VERSION_78" = x; then
13064               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13065 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13066               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13067 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13068               BOOT_JDK_FOUND=no
13069             else
13070               # We're done! :-)
13071               BOOT_JDK_FOUND=yes
13072 
13073   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13074 
13075   # Input might be given as Windows format, start by converting to
13076   # unix format.
13077   path="$BOOT_JDK"
13078   new_path=`$CYGPATH -u "$path"`
13079 
13080   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13081   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13082   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13083   # "foo.exe" is OK but "foo" is an error.
13084   #
13085   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13086   # It is also a way to make sure we got the proper file name for the real test later on.
13087   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13088   if test "x$test_shortpath" = x; then
13089     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13090 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13091     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13092   fi
13093 
13094   # Call helper function which possibly converts this using DOS-style short mode.
13095   # If so, the updated path is stored in $new_path.
13096 
13097   input_path="$new_path"
13098   # Check if we need to convert this using DOS-style short mode. If the path
13099   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13100   # take no chances and rewrite it.
13101   # Note: m4 eats our [], so we need to use [ and ] instead.
13102   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13103   if test "x$has_forbidden_chars" != x; then
13104     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13105     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13106     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13107     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13108       # Going to short mode and back again did indeed matter. Since short mode is
13109       # case insensitive, let's make it lowercase to improve readability.
13110       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13111       # Now convert it back to Unix-stile (cygpath)
13112       input_path=`$CYGPATH -u "$shortmode_path"`
13113       new_path="$input_path"
13114     fi
13115   fi
13116 
13117   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13118   if test "x$test_cygdrive_prefix" = x; then
13119     # As a simple fix, exclude /usr/bin since it's not a real path.
13120     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13121       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13122       # a path prefixed by /cygdrive for fixpath to work.
13123       new_path="$CYGWIN_ROOT_PATH$input_path"
13124     fi
13125   fi
13126 
13127 
13128   if test "x$path" != "x$new_path"; then
13129     BOOT_JDK="$new_path"
13130     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13131 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13132   fi
13133 
13134   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13135 
13136   path="$BOOT_JDK"
13137   has_colon=`$ECHO $path | $GREP ^.:`
13138   new_path="$path"
13139   if test "x$has_colon" = x; then
13140     # Not in mixed or Windows style, start by that.
13141     new_path=`cmd //c echo $path`
13142   fi
13143 
13144 
13145   input_path="$new_path"
13146   # Check if we need to convert this using DOS-style short mode. If the path
13147   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13148   # take no chances and rewrite it.
13149   # Note: m4 eats our [], so we need to use [ and ] instead.
13150   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13151   if test "x$has_forbidden_chars" != x; then
13152     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13153     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13154   fi
13155 
13156 
13157   windows_path="$new_path"
13158   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13159     unix_path=`$CYGPATH -u "$windows_path"`
13160     new_path="$unix_path"
13161   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13162     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13163     new_path="$unix_path"
13164   fi
13165 
13166   if test "x$path" != "x$new_path"; then
13167     BOOT_JDK="$new_path"
13168     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13169 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13170   fi
13171 
13172   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13173   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13174 
13175   else
13176     # We're on a posix platform. Hooray! :)
13177     path="$BOOT_JDK"
13178 
13179     if test ! -f "$path" && test ! -d "$path"; then
13180       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13181     fi
13182 
13183     has_space=`$ECHO "$path" | $GREP " "`
13184     if test "x$has_space" != x; then
13185       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13186 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13187       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13188     fi
13189   fi
13190 
13191               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13192 $as_echo_n "checking for Boot JDK... " >&6; }
13193               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13194 $as_echo "$BOOT_JDK" >&6; }
13195               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13196 $as_echo_n "checking Boot JDK version... " >&6; }
13197               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13198               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13199 $as_echo "$BOOT_JDK_VERSION" >&6; }
13200             fi # end check jdk version
13201           fi # end check rt.jar
13202         fi # end check javac
13203       fi # end check java
13204     fi # end check boot jdk found
13205   fi
13206 
13207     done
13208   fi
13209 
13210   fi
13211 
13212 
13213     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13214     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13215       # Do we have a bin/java?
13216       if test ! -x "$BOOT_JDK/bin/java"; then
13217         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13218 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13219         BOOT_JDK_FOUND=no
13220       else
13221         # Do we have a bin/javac?
13222         if test ! -x "$BOOT_JDK/bin/javac"; then
13223           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13224 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13225           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13226 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13227           BOOT_JDK_FOUND=no
13228         else
13229           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13230           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13231             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13232 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13233             BOOT_JDK_FOUND=no
13234           else
13235             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13236             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13237 
13238             # Extra M4 quote needed to protect [] in grep expression.
13239             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13240             if test "x$FOUND_VERSION_78" = x; then
13241               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13242 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13243               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13244 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13245               BOOT_JDK_FOUND=no
13246             else
13247               # We're done! :-)
13248               BOOT_JDK_FOUND=yes
13249 
13250   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13251 
13252   # Input might be given as Windows format, start by converting to
13253   # unix format.
13254   path="$BOOT_JDK"
13255   new_path=`$CYGPATH -u "$path"`
13256 
13257   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13258   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13259   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13260   # "foo.exe" is OK but "foo" is an error.
13261   #
13262   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13263   # It is also a way to make sure we got the proper file name for the real test later on.
13264   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13265   if test "x$test_shortpath" = x; then
13266     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13267 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13268     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13269   fi
13270 
13271   # Call helper function which possibly converts this using DOS-style short mode.
13272   # If so, the updated path is stored in $new_path.
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     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13283     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13284     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13285       # Going to short mode and back again did indeed matter. Since short mode is
13286       # case insensitive, let's make it lowercase to improve readability.
13287       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13288       # Now convert it back to Unix-stile (cygpath)
13289       input_path=`$CYGPATH -u "$shortmode_path"`
13290       new_path="$input_path"
13291     fi
13292   fi
13293 
13294   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13295   if test "x$test_cygdrive_prefix" = x; then
13296     # As a simple fix, exclude /usr/bin since it's not a real path.
13297     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13298       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13299       # a path prefixed by /cygdrive for fixpath to work.
13300       new_path="$CYGWIN_ROOT_PATH$input_path"
13301     fi
13302   fi
13303 
13304 
13305   if test "x$path" != "x$new_path"; then
13306     BOOT_JDK="$new_path"
13307     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13308 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13309   fi
13310 
13311   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13312 
13313   path="$BOOT_JDK"
13314   has_colon=`$ECHO $path | $GREP ^.:`
13315   new_path="$path"
13316   if test "x$has_colon" = x; then
13317     # Not in mixed or Windows style, start by that.
13318     new_path=`cmd //c echo $path`
13319   fi
13320 
13321 
13322   input_path="$new_path"
13323   # Check if we need to convert this using DOS-style short mode. If the path
13324   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13325   # take no chances and rewrite it.
13326   # Note: m4 eats our [], so we need to use [ and ] instead.
13327   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13328   if test "x$has_forbidden_chars" != x; then
13329     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13330     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13331   fi
13332 
13333 
13334   windows_path="$new_path"
13335   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13336     unix_path=`$CYGPATH -u "$windows_path"`
13337     new_path="$unix_path"
13338   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13339     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13340     new_path="$unix_path"
13341   fi
13342 
13343   if test "x$path" != "x$new_path"; then
13344     BOOT_JDK="$new_path"
13345     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13346 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13347   fi
13348 
13349   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13350   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13351 
13352   else
13353     # We're on a posix platform. Hooray! :)
13354     path="$BOOT_JDK"
13355 
13356     if test ! -f "$path" && test ! -d "$path"; then
13357       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13358     fi
13359 
13360     has_space=`$ECHO "$path" | $GREP " "`
13361     if test "x$has_space" != x; then
13362       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13363 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13364       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13365     fi
13366   fi
13367 
13368               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13369 $as_echo_n "checking for Boot JDK... " >&6; }
13370               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13371 $as_echo "$BOOT_JDK" >&6; }
13372               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13373 $as_echo_n "checking Boot JDK version... " >&6; }
13374               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13375               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13376 $as_echo "$BOOT_JDK_VERSION" >&6; }
13377             fi # end check jdk version
13378           fi # end check rt.jar
13379         fi # end check javac
13380       fi # end check java
13381     fi # end check boot jdk found
13382   fi
13383 
13384 
13385   if test "x$BOOT_JDK_FOUND" = xno; then
13386     # Now execute the test
13387 
13388   if test "x$ProgramFiles" != x; then
13389     VIRTUAL_DIR="$ProgramFiles/Java"
13390 
13391   windows_path="$VIRTUAL_DIR"
13392   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13393     unix_path=`$CYGPATH -u "$windows_path"`
13394     VIRTUAL_DIR="$unix_path"
13395   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13396     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13397     VIRTUAL_DIR="$unix_path"
13398   fi
13399 
13400 
13401   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13402   BOOT_JDK_SUFFIX=""
13403   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13404   if test "x$ALL_JDKS_FOUND" != x; then
13405     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13406 
13407   if test "x$BOOT_JDK_FOUND" = xno; then
13408     # Now execute the test
13409 
13410         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13411         if test -d "$BOOT_JDK"; then
13412           BOOT_JDK_FOUND=maybe
13413           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13414 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13415         fi
13416 
13417 
13418     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13419     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13420       # Do we have a bin/java?
13421       if test ! -x "$BOOT_JDK/bin/java"; then
13422         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13423 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13424         BOOT_JDK_FOUND=no
13425       else
13426         # Do we have a bin/javac?
13427         if test ! -x "$BOOT_JDK/bin/javac"; then
13428           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13429 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13430           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13431 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13432           BOOT_JDK_FOUND=no
13433         else
13434           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13435           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13436             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13437 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13438             BOOT_JDK_FOUND=no
13439           else
13440             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13441             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13442 
13443             # Extra M4 quote needed to protect [] in grep expression.
13444             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13445             if test "x$FOUND_VERSION_78" = x; then
13446               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13447 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13448               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13449 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13450               BOOT_JDK_FOUND=no
13451             else
13452               # We're done! :-)
13453               BOOT_JDK_FOUND=yes
13454 
13455   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13456 
13457   # Input might be given as Windows format, start by converting to
13458   # unix format.
13459   path="$BOOT_JDK"
13460   new_path=`$CYGPATH -u "$path"`
13461 
13462   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13463   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13464   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13465   # "foo.exe" is OK but "foo" is an error.
13466   #
13467   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13468   # It is also a way to make sure we got the proper file name for the real test later on.
13469   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13470   if test "x$test_shortpath" = x; then
13471     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13472 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13473     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13474   fi
13475 
13476   # Call helper function which possibly converts this using DOS-style short mode.
13477   # If so, the updated path is stored in $new_path.
13478 
13479   input_path="$new_path"
13480   # Check if we need to convert this using DOS-style short mode. If the path
13481   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13482   # take no chances and rewrite it.
13483   # Note: m4 eats our [], so we need to use [ and ] instead.
13484   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13485   if test "x$has_forbidden_chars" != x; then
13486     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13487     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13488     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13489     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13490       # Going to short mode and back again did indeed matter. Since short mode is
13491       # case insensitive, let's make it lowercase to improve readability.
13492       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13493       # Now convert it back to Unix-stile (cygpath)
13494       input_path=`$CYGPATH -u "$shortmode_path"`
13495       new_path="$input_path"
13496     fi
13497   fi
13498 
13499   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13500   if test "x$test_cygdrive_prefix" = x; then
13501     # As a simple fix, exclude /usr/bin since it's not a real path.
13502     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13503       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13504       # a path prefixed by /cygdrive for fixpath to work.
13505       new_path="$CYGWIN_ROOT_PATH$input_path"
13506     fi
13507   fi
13508 
13509 
13510   if test "x$path" != "x$new_path"; then
13511     BOOT_JDK="$new_path"
13512     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13513 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13514   fi
13515 
13516   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13517 
13518   path="$BOOT_JDK"
13519   has_colon=`$ECHO $path | $GREP ^.:`
13520   new_path="$path"
13521   if test "x$has_colon" = x; then
13522     # Not in mixed or Windows style, start by that.
13523     new_path=`cmd //c echo $path`
13524   fi
13525 
13526 
13527   input_path="$new_path"
13528   # Check if we need to convert this using DOS-style short mode. If the path
13529   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13530   # take no chances and rewrite it.
13531   # Note: m4 eats our [], so we need to use [ and ] instead.
13532   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13533   if test "x$has_forbidden_chars" != x; then
13534     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13535     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13536   fi
13537 
13538 
13539   windows_path="$new_path"
13540   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13541     unix_path=`$CYGPATH -u "$windows_path"`
13542     new_path="$unix_path"
13543   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13544     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13545     new_path="$unix_path"
13546   fi
13547 
13548   if test "x$path" != "x$new_path"; then
13549     BOOT_JDK="$new_path"
13550     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13551 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13552   fi
13553 
13554   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13555   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13556 
13557   else
13558     # We're on a posix platform. Hooray! :)
13559     path="$BOOT_JDK"
13560 
13561     if test ! -f "$path" && test ! -d "$path"; then
13562       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13563     fi
13564 
13565     has_space=`$ECHO "$path" | $GREP " "`
13566     if test "x$has_space" != x; then
13567       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13568 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13569       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13570     fi
13571   fi
13572 
13573               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13574 $as_echo_n "checking for Boot JDK... " >&6; }
13575               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13576 $as_echo "$BOOT_JDK" >&6; }
13577               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13578 $as_echo_n "checking Boot JDK version... " >&6; }
13579               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13580               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13581 $as_echo "$BOOT_JDK_VERSION" >&6; }
13582             fi # end check jdk version
13583           fi # end check rt.jar
13584         fi # end check javac
13585       fi # end check java
13586     fi # end check boot jdk found
13587   fi
13588 
13589     done
13590   fi
13591 
13592   fi
13593 
13594 
13595     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13596     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13597       # Do we have a bin/java?
13598       if test ! -x "$BOOT_JDK/bin/java"; then
13599         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13600 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13601         BOOT_JDK_FOUND=no
13602       else
13603         # Do we have a bin/javac?
13604         if test ! -x "$BOOT_JDK/bin/javac"; then
13605           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13606 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13607           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13608 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13609           BOOT_JDK_FOUND=no
13610         else
13611           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13612           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13613             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13614 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13615             BOOT_JDK_FOUND=no
13616           else
13617             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13618             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13619 
13620             # Extra M4 quote needed to protect [] in grep expression.
13621             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13622             if test "x$FOUND_VERSION_78" = x; then
13623               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13624 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13625               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13626 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13627               BOOT_JDK_FOUND=no
13628             else
13629               # We're done! :-)
13630               BOOT_JDK_FOUND=yes
13631 
13632   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13633 
13634   # Input might be given as Windows format, start by converting to
13635   # unix format.
13636   path="$BOOT_JDK"
13637   new_path=`$CYGPATH -u "$path"`
13638 
13639   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13640   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13641   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13642   # "foo.exe" is OK but "foo" is an error.
13643   #
13644   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13645   # It is also a way to make sure we got the proper file name for the real test later on.
13646   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13647   if test "x$test_shortpath" = x; then
13648     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13649 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13650     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13651   fi
13652 
13653   # Call helper function which possibly converts this using DOS-style short mode.
13654   # If so, the updated path is stored in $new_path.
13655 
13656   input_path="$new_path"
13657   # Check if we need to convert this using DOS-style short mode. If the path
13658   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13659   # take no chances and rewrite it.
13660   # Note: m4 eats our [], so we need to use [ and ] instead.
13661   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13662   if test "x$has_forbidden_chars" != x; then
13663     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13664     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13665     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13666     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13667       # Going to short mode and back again did indeed matter. Since short mode is
13668       # case insensitive, let's make it lowercase to improve readability.
13669       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13670       # Now convert it back to Unix-stile (cygpath)
13671       input_path=`$CYGPATH -u "$shortmode_path"`
13672       new_path="$input_path"
13673     fi
13674   fi
13675 
13676   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13677   if test "x$test_cygdrive_prefix" = x; then
13678     # As a simple fix, exclude /usr/bin since it's not a real path.
13679     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13680       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13681       # a path prefixed by /cygdrive for fixpath to work.
13682       new_path="$CYGWIN_ROOT_PATH$input_path"
13683     fi
13684   fi
13685 
13686 
13687   if test "x$path" != "x$new_path"; then
13688     BOOT_JDK="$new_path"
13689     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13690 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13691   fi
13692 
13693   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13694 
13695   path="$BOOT_JDK"
13696   has_colon=`$ECHO $path | $GREP ^.:`
13697   new_path="$path"
13698   if test "x$has_colon" = x; then
13699     # Not in mixed or Windows style, start by that.
13700     new_path=`cmd //c echo $path`
13701   fi
13702 
13703 
13704   input_path="$new_path"
13705   # Check if we need to convert this using DOS-style short mode. If the path
13706   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13707   # take no chances and rewrite it.
13708   # Note: m4 eats our [], so we need to use [ and ] instead.
13709   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13710   if test "x$has_forbidden_chars" != x; then
13711     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13712     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13713   fi
13714 
13715 
13716   windows_path="$new_path"
13717   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13718     unix_path=`$CYGPATH -u "$windows_path"`
13719     new_path="$unix_path"
13720   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13721     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13722     new_path="$unix_path"
13723   fi
13724 
13725   if test "x$path" != "x$new_path"; then
13726     BOOT_JDK="$new_path"
13727     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13728 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13729   fi
13730 
13731   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13732   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13733 
13734   else
13735     # We're on a posix platform. Hooray! :)
13736     path="$BOOT_JDK"
13737 
13738     if test ! -f "$path" && test ! -d "$path"; then
13739       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13740     fi
13741 
13742     has_space=`$ECHO "$path" | $GREP " "`
13743     if test "x$has_space" != x; then
13744       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13745 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13746       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13747     fi
13748   fi
13749 
13750               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13751 $as_echo_n "checking for Boot JDK... " >&6; }
13752               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13753 $as_echo "$BOOT_JDK" >&6; }
13754               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13755 $as_echo_n "checking Boot JDK version... " >&6; }
13756               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13757               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13758 $as_echo "$BOOT_JDK_VERSION" >&6; }
13759             fi # end check jdk version
13760           fi # end check rt.jar
13761         fi # end check javac
13762       fi # end check java
13763     fi # end check boot jdk found
13764   fi
13765 
13766 
13767   if test "x$BOOT_JDK_FOUND" = xno; then
13768     # Now execute the test
13769 
13770   BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
13771   BOOT_JDK_SUFFIX=""
13772   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13773   if test "x$ALL_JDKS_FOUND" != x; then
13774     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13775 
13776   if test "x$BOOT_JDK_FOUND" = xno; then
13777     # Now execute the test
13778 
13779         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13780         if test -d "$BOOT_JDK"; then
13781           BOOT_JDK_FOUND=maybe
13782           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13783 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13784         fi
13785 
13786 
13787     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13788     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13789       # Do we have a bin/java?
13790       if test ! -x "$BOOT_JDK/bin/java"; then
13791         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13792 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13793         BOOT_JDK_FOUND=no
13794       else
13795         # Do we have a bin/javac?
13796         if test ! -x "$BOOT_JDK/bin/javac"; then
13797           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13798 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13799           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13800 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13801           BOOT_JDK_FOUND=no
13802         else
13803           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13804           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13805             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13806 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13807             BOOT_JDK_FOUND=no
13808           else
13809             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13810             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13811 
13812             # Extra M4 quote needed to protect [] in grep expression.
13813             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13814             if test "x$FOUND_VERSION_78" = x; then
13815               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13816 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13817               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13818 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13819               BOOT_JDK_FOUND=no
13820             else
13821               # We're done! :-)
13822               BOOT_JDK_FOUND=yes
13823 
13824   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13825 
13826   # Input might be given as Windows format, start by converting to
13827   # unix format.
13828   path="$BOOT_JDK"
13829   new_path=`$CYGPATH -u "$path"`
13830 
13831   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13832   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13833   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13834   # "foo.exe" is OK but "foo" is an error.
13835   #
13836   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13837   # It is also a way to make sure we got the proper file name for the real test later on.
13838   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13839   if test "x$test_shortpath" = x; then
13840     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13841 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13842     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13843   fi
13844 
13845   # Call helper function which possibly converts this using DOS-style short mode.
13846   # If so, the updated path is stored in $new_path.
13847 
13848   input_path="$new_path"
13849   # Check if we need to convert this using DOS-style short mode. If the path
13850   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13851   # take no chances and rewrite it.
13852   # Note: m4 eats our [], so we need to use [ and ] instead.
13853   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13854   if test "x$has_forbidden_chars" != x; then
13855     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13856     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13857     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13858     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13859       # Going to short mode and back again did indeed matter. Since short mode is
13860       # case insensitive, let's make it lowercase to improve readability.
13861       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13862       # Now convert it back to Unix-stile (cygpath)
13863       input_path=`$CYGPATH -u "$shortmode_path"`
13864       new_path="$input_path"
13865     fi
13866   fi
13867 
13868   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13869   if test "x$test_cygdrive_prefix" = x; then
13870     # As a simple fix, exclude /usr/bin since it's not a real path.
13871     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13872       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13873       # a path prefixed by /cygdrive for fixpath to work.
13874       new_path="$CYGWIN_ROOT_PATH$input_path"
13875     fi
13876   fi
13877 
13878 
13879   if test "x$path" != "x$new_path"; then
13880     BOOT_JDK="$new_path"
13881     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13882 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13883   fi
13884 
13885   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13886 
13887   path="$BOOT_JDK"
13888   has_colon=`$ECHO $path | $GREP ^.:`
13889   new_path="$path"
13890   if test "x$has_colon" = x; then
13891     # Not in mixed or Windows style, start by that.
13892     new_path=`cmd //c echo $path`
13893   fi
13894 
13895 
13896   input_path="$new_path"
13897   # Check if we need to convert this using DOS-style short mode. If the path
13898   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13899   # take no chances and rewrite it.
13900   # Note: m4 eats our [], so we need to use [ and ] instead.
13901   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13902   if test "x$has_forbidden_chars" != x; then
13903     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13904     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13905   fi
13906 
13907 
13908   windows_path="$new_path"
13909   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13910     unix_path=`$CYGPATH -u "$windows_path"`
13911     new_path="$unix_path"
13912   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13913     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13914     new_path="$unix_path"
13915   fi
13916 
13917   if test "x$path" != "x$new_path"; then
13918     BOOT_JDK="$new_path"
13919     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13920 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13921   fi
13922 
13923   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13924   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13925 
13926   else
13927     # We're on a posix platform. Hooray! :)
13928     path="$BOOT_JDK"
13929 
13930     if test ! -f "$path" && test ! -d "$path"; then
13931       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13932     fi
13933 
13934     has_space=`$ECHO "$path" | $GREP " "`
13935     if test "x$has_space" != x; then
13936       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13937 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13938       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13939     fi
13940   fi
13941 
13942               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13943 $as_echo_n "checking for Boot JDK... " >&6; }
13944               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13945 $as_echo "$BOOT_JDK" >&6; }
13946               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13947 $as_echo_n "checking Boot JDK version... " >&6; }
13948               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13949               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13950 $as_echo "$BOOT_JDK_VERSION" >&6; }
13951             fi # end check jdk version
13952           fi # end check rt.jar
13953         fi # end check javac
13954       fi # end check java
13955     fi # end check boot jdk found
13956   fi
13957 
13958     done
13959   fi
13960 
13961 
13962     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13963     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13964       # Do we have a bin/java?
13965       if test ! -x "$BOOT_JDK/bin/java"; then
13966         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13967 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13968         BOOT_JDK_FOUND=no
13969       else
13970         # Do we have a bin/javac?
13971         if test ! -x "$BOOT_JDK/bin/javac"; then
13972           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13973 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13974           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13975 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13976           BOOT_JDK_FOUND=no
13977         else
13978           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13979           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13980             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13981 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13982             BOOT_JDK_FOUND=no
13983           else
13984             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13985             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13986 
13987             # Extra M4 quote needed to protect [] in grep expression.
13988             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13989             if test "x$FOUND_VERSION_78" = x; then
13990               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13991 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13992               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13993 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13994               BOOT_JDK_FOUND=no
13995             else
13996               # We're done! :-)
13997               BOOT_JDK_FOUND=yes
13998 
13999   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14000 
14001   # Input might be given as Windows format, start by converting to
14002   # unix format.
14003   path="$BOOT_JDK"
14004   new_path=`$CYGPATH -u "$path"`
14005 
14006   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14007   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14008   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14009   # "foo.exe" is OK but "foo" is an error.
14010   #
14011   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14012   # It is also a way to make sure we got the proper file name for the real test later on.
14013   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14014   if test "x$test_shortpath" = x; then
14015     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14016 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14017     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14018   fi
14019 
14020   # Call helper function which possibly converts this using DOS-style short mode.
14021   # If so, the updated path is stored in $new_path.
14022 
14023   input_path="$new_path"
14024   # Check if we need to convert this using DOS-style short mode. If the path
14025   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14026   # take no chances and rewrite it.
14027   # Note: m4 eats our [], so we need to use [ and ] instead.
14028   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14029   if test "x$has_forbidden_chars" != x; then
14030     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14031     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14032     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14033     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14034       # Going to short mode and back again did indeed matter. Since short mode is
14035       # case insensitive, let's make it lowercase to improve readability.
14036       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14037       # Now convert it back to Unix-stile (cygpath)
14038       input_path=`$CYGPATH -u "$shortmode_path"`
14039       new_path="$input_path"
14040     fi
14041   fi
14042 
14043   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14044   if test "x$test_cygdrive_prefix" = x; then
14045     # As a simple fix, exclude /usr/bin since it's not a real path.
14046     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14047       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14048       # a path prefixed by /cygdrive for fixpath to work.
14049       new_path="$CYGWIN_ROOT_PATH$input_path"
14050     fi
14051   fi
14052 
14053 
14054   if test "x$path" != "x$new_path"; then
14055     BOOT_JDK="$new_path"
14056     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14057 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14058   fi
14059 
14060   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14061 
14062   path="$BOOT_JDK"
14063   has_colon=`$ECHO $path | $GREP ^.:`
14064   new_path="$path"
14065   if test "x$has_colon" = x; then
14066     # Not in mixed or Windows style, start by that.
14067     new_path=`cmd //c echo $path`
14068   fi
14069 
14070 
14071   input_path="$new_path"
14072   # Check if we need to convert this using DOS-style short mode. If the path
14073   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14074   # take no chances and rewrite it.
14075   # Note: m4 eats our [], so we need to use [ and ] instead.
14076   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14077   if test "x$has_forbidden_chars" != x; then
14078     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14079     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14080   fi
14081 
14082 
14083   windows_path="$new_path"
14084   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14085     unix_path=`$CYGPATH -u "$windows_path"`
14086     new_path="$unix_path"
14087   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14088     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14089     new_path="$unix_path"
14090   fi
14091 
14092   if test "x$path" != "x$new_path"; then
14093     BOOT_JDK="$new_path"
14094     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14095 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14096   fi
14097 
14098   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14099   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14100 
14101   else
14102     # We're on a posix platform. Hooray! :)
14103     path="$BOOT_JDK"
14104 
14105     if test ! -f "$path" && test ! -d "$path"; then
14106       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14107     fi
14108 
14109     has_space=`$ECHO "$path" | $GREP " "`
14110     if test "x$has_space" != x; then
14111       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14112 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14113       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14114     fi
14115   fi
14116 
14117               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14118 $as_echo_n "checking for Boot JDK... " >&6; }
14119               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14120 $as_echo "$BOOT_JDK" >&6; }
14121               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14122 $as_echo_n "checking Boot JDK version... " >&6; }
14123               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14124               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14125 $as_echo "$BOOT_JDK_VERSION" >&6; }
14126             fi # end check jdk version
14127           fi # end check rt.jar
14128         fi # end check javac
14129       fi # end check java
14130     fi # end check boot jdk found
14131   fi
14132 
14133   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
14134 
14135   if test "x$BOOT_JDK_FOUND" = xno; then
14136     # Now execute the test
14137 
14138   BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
14139   BOOT_JDK_SUFFIX="/Contents/Home"
14140   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14141   if test "x$ALL_JDKS_FOUND" != x; then
14142     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14143 
14144   if test "x$BOOT_JDK_FOUND" = xno; then
14145     # Now execute the test
14146 
14147         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14148         if test -d "$BOOT_JDK"; then
14149           BOOT_JDK_FOUND=maybe
14150           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14151 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14152         fi
14153 
14154 
14155     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14156     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14157       # Do we have a bin/java?
14158       if test ! -x "$BOOT_JDK/bin/java"; then
14159         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14160 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14161         BOOT_JDK_FOUND=no
14162       else
14163         # Do we have a bin/javac?
14164         if test ! -x "$BOOT_JDK/bin/javac"; then
14165           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14166 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14167           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14168 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14169           BOOT_JDK_FOUND=no
14170         else
14171           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14172           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14173             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14174 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14175             BOOT_JDK_FOUND=no
14176           else
14177             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14178             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14179 
14180             # Extra M4 quote needed to protect [] in grep expression.
14181             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14182             if test "x$FOUND_VERSION_78" = x; then
14183               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14184 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14185               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14186 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14187               BOOT_JDK_FOUND=no
14188             else
14189               # We're done! :-)
14190               BOOT_JDK_FOUND=yes
14191 
14192   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14193 
14194   # Input might be given as Windows format, start by converting to
14195   # unix format.
14196   path="$BOOT_JDK"
14197   new_path=`$CYGPATH -u "$path"`
14198 
14199   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14200   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14201   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14202   # "foo.exe" is OK but "foo" is an error.
14203   #
14204   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14205   # It is also a way to make sure we got the proper file name for the real test later on.
14206   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14207   if test "x$test_shortpath" = x; then
14208     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14209 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14210     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14211   fi
14212 
14213   # Call helper function which possibly converts this using DOS-style short mode.
14214   # If so, the updated path is stored in $new_path.
14215 
14216   input_path="$new_path"
14217   # Check if we need to convert this using DOS-style short mode. If the path
14218   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14219   # take no chances and rewrite it.
14220   # Note: m4 eats our [], so we need to use [ and ] instead.
14221   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14222   if test "x$has_forbidden_chars" != x; then
14223     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14224     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14225     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14226     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14227       # Going to short mode and back again did indeed matter. Since short mode is
14228       # case insensitive, let's make it lowercase to improve readability.
14229       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14230       # Now convert it back to Unix-stile (cygpath)
14231       input_path=`$CYGPATH -u "$shortmode_path"`
14232       new_path="$input_path"
14233     fi
14234   fi
14235 
14236   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14237   if test "x$test_cygdrive_prefix" = x; then
14238     # As a simple fix, exclude /usr/bin since it's not a real path.
14239     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14240       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14241       # a path prefixed by /cygdrive for fixpath to work.
14242       new_path="$CYGWIN_ROOT_PATH$input_path"
14243     fi
14244   fi
14245 
14246 
14247   if test "x$path" != "x$new_path"; then
14248     BOOT_JDK="$new_path"
14249     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14250 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14251   fi
14252 
14253   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14254 
14255   path="$BOOT_JDK"
14256   has_colon=`$ECHO $path | $GREP ^.:`
14257   new_path="$path"
14258   if test "x$has_colon" = x; then
14259     # Not in mixed or Windows style, start by that.
14260     new_path=`cmd //c echo $path`
14261   fi
14262 
14263 
14264   input_path="$new_path"
14265   # Check if we need to convert this using DOS-style short mode. If the path
14266   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14267   # take no chances and rewrite it.
14268   # Note: m4 eats our [], so we need to use [ and ] instead.
14269   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14270   if test "x$has_forbidden_chars" != x; then
14271     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14272     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14273   fi
14274 
14275 
14276   windows_path="$new_path"
14277   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14278     unix_path=`$CYGPATH -u "$windows_path"`
14279     new_path="$unix_path"
14280   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14281     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14282     new_path="$unix_path"
14283   fi
14284 
14285   if test "x$path" != "x$new_path"; then
14286     BOOT_JDK="$new_path"
14287     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14288 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14289   fi
14290 
14291   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14292   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14293 
14294   else
14295     # We're on a posix platform. Hooray! :)
14296     path="$BOOT_JDK"
14297 
14298     if test ! -f "$path" && test ! -d "$path"; then
14299       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14300     fi
14301 
14302     has_space=`$ECHO "$path" | $GREP " "`
14303     if test "x$has_space" != x; then
14304       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14305 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14306       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14307     fi
14308   fi
14309 
14310               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14311 $as_echo_n "checking for Boot JDK... " >&6; }
14312               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14313 $as_echo "$BOOT_JDK" >&6; }
14314               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14315 $as_echo_n "checking Boot JDK version... " >&6; }
14316               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14317               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14318 $as_echo "$BOOT_JDK_VERSION" >&6; }
14319             fi # end check jdk version
14320           fi # end check rt.jar
14321         fi # end check javac
14322       fi # end check java
14323     fi # end check boot jdk found
14324   fi
14325 
14326     done
14327   fi
14328 
14329 
14330     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14331     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14332       # Do we have a bin/java?
14333       if test ! -x "$BOOT_JDK/bin/java"; then
14334         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14335 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14336         BOOT_JDK_FOUND=no
14337       else
14338         # Do we have a bin/javac?
14339         if test ! -x "$BOOT_JDK/bin/javac"; then
14340           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14341 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14342           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14343 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14344           BOOT_JDK_FOUND=no
14345         else
14346           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14347           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14348             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14349 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14350             BOOT_JDK_FOUND=no
14351           else
14352             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14353             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14354 
14355             # Extra M4 quote needed to protect [] in grep expression.
14356             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14357             if test "x$FOUND_VERSION_78" = x; then
14358               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14359 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14360               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14361 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14362               BOOT_JDK_FOUND=no
14363             else
14364               # We're done! :-)
14365               BOOT_JDK_FOUND=yes
14366 
14367   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14368 
14369   # Input might be given as Windows format, start by converting to
14370   # unix format.
14371   path="$BOOT_JDK"
14372   new_path=`$CYGPATH -u "$path"`
14373 
14374   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14375   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14376   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14377   # "foo.exe" is OK but "foo" is an error.
14378   #
14379   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14380   # It is also a way to make sure we got the proper file name for the real test later on.
14381   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14382   if test "x$test_shortpath" = x; then
14383     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14384 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14385     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14386   fi
14387 
14388   # Call helper function which possibly converts this using DOS-style short mode.
14389   # If so, the updated path is stored in $new_path.
14390 
14391   input_path="$new_path"
14392   # Check if we need to convert this using DOS-style short mode. If the path
14393   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14394   # take no chances and rewrite it.
14395   # Note: m4 eats our [], so we need to use [ and ] instead.
14396   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14397   if test "x$has_forbidden_chars" != x; then
14398     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14399     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14400     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14401     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14402       # Going to short mode and back again did indeed matter. Since short mode is
14403       # case insensitive, let's make it lowercase to improve readability.
14404       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14405       # Now convert it back to Unix-stile (cygpath)
14406       input_path=`$CYGPATH -u "$shortmode_path"`
14407       new_path="$input_path"
14408     fi
14409   fi
14410 
14411   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14412   if test "x$test_cygdrive_prefix" = x; then
14413     # As a simple fix, exclude /usr/bin since it's not a real path.
14414     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14415       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14416       # a path prefixed by /cygdrive for fixpath to work.
14417       new_path="$CYGWIN_ROOT_PATH$input_path"
14418     fi
14419   fi
14420 
14421 
14422   if test "x$path" != "x$new_path"; then
14423     BOOT_JDK="$new_path"
14424     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14425 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14426   fi
14427 
14428   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14429 
14430   path="$BOOT_JDK"
14431   has_colon=`$ECHO $path | $GREP ^.:`
14432   new_path="$path"
14433   if test "x$has_colon" = x; then
14434     # Not in mixed or Windows style, start by that.
14435     new_path=`cmd //c echo $path`
14436   fi
14437 
14438 
14439   input_path="$new_path"
14440   # Check if we need to convert this using DOS-style short mode. If the path
14441   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14442   # take no chances and rewrite it.
14443   # Note: m4 eats our [], so we need to use [ and ] instead.
14444   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14445   if test "x$has_forbidden_chars" != x; then
14446     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14447     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14448   fi
14449 
14450 
14451   windows_path="$new_path"
14452   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14453     unix_path=`$CYGPATH -u "$windows_path"`
14454     new_path="$unix_path"
14455   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14456     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14457     new_path="$unix_path"
14458   fi
14459 
14460   if test "x$path" != "x$new_path"; then
14461     BOOT_JDK="$new_path"
14462     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14463 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14464   fi
14465 
14466   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14467   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14468 
14469   else
14470     # We're on a posix platform. Hooray! :)
14471     path="$BOOT_JDK"
14472 
14473     if test ! -f "$path" && test ! -d "$path"; then
14474       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14475     fi
14476 
14477     has_space=`$ECHO "$path" | $GREP " "`
14478     if test "x$has_space" != x; then
14479       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14480 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14481       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14482     fi
14483   fi
14484 
14485               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14486 $as_echo_n "checking for Boot JDK... " >&6; }
14487               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14488 $as_echo "$BOOT_JDK" >&6; }
14489               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14490 $as_echo_n "checking Boot JDK version... " >&6; }
14491               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14492               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14493 $as_echo "$BOOT_JDK_VERSION" >&6; }
14494             fi # end check jdk version
14495           fi # end check rt.jar
14496         fi # end check javac
14497       fi # end check java
14498     fi # end check boot jdk found
14499   fi
14500 
14501 
14502   if test "x$BOOT_JDK_FOUND" = xno; then
14503     # Now execute the test
14504 
14505   BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
14506   BOOT_JDK_SUFFIX="/Contents/Home"
14507   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14508   if test "x$ALL_JDKS_FOUND" != x; then
14509     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14510 
14511   if test "x$BOOT_JDK_FOUND" = xno; then
14512     # Now execute the test
14513 
14514         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14515         if test -d "$BOOT_JDK"; then
14516           BOOT_JDK_FOUND=maybe
14517           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14518 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14519         fi
14520 
14521 
14522     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14523     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14524       # Do we have a bin/java?
14525       if test ! -x "$BOOT_JDK/bin/java"; then
14526         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14527 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14528         BOOT_JDK_FOUND=no
14529       else
14530         # Do we have a bin/javac?
14531         if test ! -x "$BOOT_JDK/bin/javac"; then
14532           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14533 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14534           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14535 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14536           BOOT_JDK_FOUND=no
14537         else
14538           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14539           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14540             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14541 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14542             BOOT_JDK_FOUND=no
14543           else
14544             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14545             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14546 
14547             # Extra M4 quote needed to protect [] in grep expression.
14548             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14549             if test "x$FOUND_VERSION_78" = x; then
14550               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14551 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14552               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14553 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14554               BOOT_JDK_FOUND=no
14555             else
14556               # We're done! :-)
14557               BOOT_JDK_FOUND=yes
14558 
14559   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14560 
14561   # Input might be given as Windows format, start by converting to
14562   # unix format.
14563   path="$BOOT_JDK"
14564   new_path=`$CYGPATH -u "$path"`
14565 
14566   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14567   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14568   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14569   # "foo.exe" is OK but "foo" is an error.
14570   #
14571   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14572   # It is also a way to make sure we got the proper file name for the real test later on.
14573   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14574   if test "x$test_shortpath" = x; then
14575     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14576 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14577     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14578   fi
14579 
14580   # Call helper function which possibly converts this using DOS-style short mode.
14581   # If so, the updated path is stored in $new_path.
14582 
14583   input_path="$new_path"
14584   # Check if we need to convert this using DOS-style short mode. If the path
14585   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14586   # take no chances and rewrite it.
14587   # Note: m4 eats our [], so we need to use [ and ] instead.
14588   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14589   if test "x$has_forbidden_chars" != x; then
14590     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14591     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14592     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14593     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14594       # Going to short mode and back again did indeed matter. Since short mode is
14595       # case insensitive, let's make it lowercase to improve readability.
14596       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14597       # Now convert it back to Unix-stile (cygpath)
14598       input_path=`$CYGPATH -u "$shortmode_path"`
14599       new_path="$input_path"
14600     fi
14601   fi
14602 
14603   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14604   if test "x$test_cygdrive_prefix" = x; then
14605     # As a simple fix, exclude /usr/bin since it's not a real path.
14606     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14607       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14608       # a path prefixed by /cygdrive for fixpath to work.
14609       new_path="$CYGWIN_ROOT_PATH$input_path"
14610     fi
14611   fi
14612 
14613 
14614   if test "x$path" != "x$new_path"; then
14615     BOOT_JDK="$new_path"
14616     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14617 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14618   fi
14619 
14620   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14621 
14622   path="$BOOT_JDK"
14623   has_colon=`$ECHO $path | $GREP ^.:`
14624   new_path="$path"
14625   if test "x$has_colon" = x; then
14626     # Not in mixed or Windows style, start by that.
14627     new_path=`cmd //c echo $path`
14628   fi
14629 
14630 
14631   input_path="$new_path"
14632   # Check if we need to convert this using DOS-style short mode. If the path
14633   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14634   # take no chances and rewrite it.
14635   # Note: m4 eats our [], so we need to use [ and ] instead.
14636   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14637   if test "x$has_forbidden_chars" != x; then
14638     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14639     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14640   fi
14641 
14642 
14643   windows_path="$new_path"
14644   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14645     unix_path=`$CYGPATH -u "$windows_path"`
14646     new_path="$unix_path"
14647   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14648     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14649     new_path="$unix_path"
14650   fi
14651 
14652   if test "x$path" != "x$new_path"; then
14653     BOOT_JDK="$new_path"
14654     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14655 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14656   fi
14657 
14658   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14659   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14660 
14661   else
14662     # We're on a posix platform. Hooray! :)
14663     path="$BOOT_JDK"
14664 
14665     if test ! -f "$path" && test ! -d "$path"; then
14666       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14667     fi
14668 
14669     has_space=`$ECHO "$path" | $GREP " "`
14670     if test "x$has_space" != x; then
14671       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14672 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14673       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14674     fi
14675   fi
14676 
14677               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14678 $as_echo_n "checking for Boot JDK... " >&6; }
14679               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14680 $as_echo "$BOOT_JDK" >&6; }
14681               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14682 $as_echo_n "checking Boot JDK version... " >&6; }
14683               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14684               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14685 $as_echo "$BOOT_JDK_VERSION" >&6; }
14686             fi # end check jdk version
14687           fi # end check rt.jar
14688         fi # end check javac
14689       fi # end check java
14690     fi # end check boot jdk found
14691   fi
14692 
14693     done
14694   fi
14695 
14696 
14697     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14698     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14699       # Do we have a bin/java?
14700       if test ! -x "$BOOT_JDK/bin/java"; then
14701         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14702 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14703         BOOT_JDK_FOUND=no
14704       else
14705         # Do we have a bin/javac?
14706         if test ! -x "$BOOT_JDK/bin/javac"; then
14707           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14708 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14709           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14710 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14711           BOOT_JDK_FOUND=no
14712         else
14713           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14714           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14715             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14716 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14717             BOOT_JDK_FOUND=no
14718           else
14719             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14720             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14721 
14722             # Extra M4 quote needed to protect [] in grep expression.
14723             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14724             if test "x$FOUND_VERSION_78" = x; then
14725               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14726 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14727               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14728 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14729               BOOT_JDK_FOUND=no
14730             else
14731               # We're done! :-)
14732               BOOT_JDK_FOUND=yes
14733 
14734   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14735 
14736   # Input might be given as Windows format, start by converting to
14737   # unix format.
14738   path="$BOOT_JDK"
14739   new_path=`$CYGPATH -u "$path"`
14740 
14741   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14742   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14743   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14744   # "foo.exe" is OK but "foo" is an error.
14745   #
14746   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14747   # It is also a way to make sure we got the proper file name for the real test later on.
14748   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14749   if test "x$test_shortpath" = x; then
14750     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14751 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14752     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14753   fi
14754 
14755   # Call helper function which possibly converts this using DOS-style short mode.
14756   # If so, the updated path is stored in $new_path.
14757 
14758   input_path="$new_path"
14759   # Check if we need to convert this using DOS-style short mode. If the path
14760   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14761   # take no chances and rewrite it.
14762   # Note: m4 eats our [], so we need to use [ and ] instead.
14763   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14764   if test "x$has_forbidden_chars" != x; then
14765     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14766     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14767     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14768     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14769       # Going to short mode and back again did indeed matter. Since short mode is
14770       # case insensitive, let's make it lowercase to improve readability.
14771       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14772       # Now convert it back to Unix-stile (cygpath)
14773       input_path=`$CYGPATH -u "$shortmode_path"`
14774       new_path="$input_path"
14775     fi
14776   fi
14777 
14778   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14779   if test "x$test_cygdrive_prefix" = x; then
14780     # As a simple fix, exclude /usr/bin since it's not a real path.
14781     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14782       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14783       # a path prefixed by /cygdrive for fixpath to work.
14784       new_path="$CYGWIN_ROOT_PATH$input_path"
14785     fi
14786   fi
14787 
14788 
14789   if test "x$path" != "x$new_path"; then
14790     BOOT_JDK="$new_path"
14791     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14792 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14793   fi
14794 
14795   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14796 
14797   path="$BOOT_JDK"
14798   has_colon=`$ECHO $path | $GREP ^.:`
14799   new_path="$path"
14800   if test "x$has_colon" = x; then
14801     # Not in mixed or Windows style, start by that.
14802     new_path=`cmd //c echo $path`
14803   fi
14804 
14805 
14806   input_path="$new_path"
14807   # Check if we need to convert this using DOS-style short mode. If the path
14808   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14809   # take no chances and rewrite it.
14810   # Note: m4 eats our [], so we need to use [ and ] instead.
14811   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14812   if test "x$has_forbidden_chars" != x; then
14813     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14814     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14815   fi
14816 
14817 
14818   windows_path="$new_path"
14819   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14820     unix_path=`$CYGPATH -u "$windows_path"`
14821     new_path="$unix_path"
14822   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14823     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14824     new_path="$unix_path"
14825   fi
14826 
14827   if test "x$path" != "x$new_path"; then
14828     BOOT_JDK="$new_path"
14829     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14830 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14831   fi
14832 
14833   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14834   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14835 
14836   else
14837     # We're on a posix platform. Hooray! :)
14838     path="$BOOT_JDK"
14839 
14840     if test ! -f "$path" && test ! -d "$path"; then
14841       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14842     fi
14843 
14844     has_space=`$ECHO "$path" | $GREP " "`
14845     if test "x$has_space" != x; then
14846       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14847 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14848       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14849     fi
14850   fi
14851 
14852               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14853 $as_echo_n "checking for Boot JDK... " >&6; }
14854               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14855 $as_echo "$BOOT_JDK" >&6; }
14856               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14857 $as_echo_n "checking Boot JDK version... " >&6; }
14858               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14859               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14860 $as_echo "$BOOT_JDK_VERSION" >&6; }
14861             fi # end check jdk version
14862           fi # end check rt.jar
14863         fi # end check javac
14864       fi # end check java
14865     fi # end check boot jdk found
14866   fi
14867 
14868   elif test "x$OPENJDK_TARGET_OS" = xlinux; then
14869 
14870   if test "x$BOOT_JDK_FOUND" = xno; then
14871     # Now execute the test
14872 
14873   BOOT_JDK_PREFIX="/usr/lib/jvm"
14874   BOOT_JDK_SUFFIX=""
14875   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14876   if test "x$ALL_JDKS_FOUND" != x; then
14877     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14878 
14879   if test "x$BOOT_JDK_FOUND" = xno; then
14880     # Now execute the test
14881 
14882         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14883         if test -d "$BOOT_JDK"; then
14884           BOOT_JDK_FOUND=maybe
14885           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14886 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14887         fi
14888 
14889 
14890     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14891     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14892       # Do we have a bin/java?
14893       if test ! -x "$BOOT_JDK/bin/java"; then
14894         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14895 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14896         BOOT_JDK_FOUND=no
14897       else
14898         # Do we have a bin/javac?
14899         if test ! -x "$BOOT_JDK/bin/javac"; then
14900           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14901 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14902           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14903 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14904           BOOT_JDK_FOUND=no
14905         else
14906           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14907           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14908             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14909 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14910             BOOT_JDK_FOUND=no
14911           else
14912             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14913             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14914 
14915             # Extra M4 quote needed to protect [] in grep expression.
14916             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14917             if test "x$FOUND_VERSION_78" = x; then
14918               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14919 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14920               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14921 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14922               BOOT_JDK_FOUND=no
14923             else
14924               # We're done! :-)
14925               BOOT_JDK_FOUND=yes
14926 
14927   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14928 
14929   # Input might be given as Windows format, start by converting to
14930   # unix format.
14931   path="$BOOT_JDK"
14932   new_path=`$CYGPATH -u "$path"`
14933 
14934   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14935   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14936   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14937   # "foo.exe" is OK but "foo" is an error.
14938   #
14939   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14940   # It is also a way to make sure we got the proper file name for the real test later on.
14941   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14942   if test "x$test_shortpath" = x; then
14943     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14944 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14945     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14946   fi
14947 
14948   # Call helper function which possibly converts this using DOS-style short mode.
14949   # If so, the updated path is stored in $new_path.
14950 
14951   input_path="$new_path"
14952   # Check if we need to convert this using DOS-style short mode. If the path
14953   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14954   # take no chances and rewrite it.
14955   # Note: m4 eats our [], so we need to use [ and ] instead.
14956   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14957   if test "x$has_forbidden_chars" != x; then
14958     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14959     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14960     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14961     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14962       # Going to short mode and back again did indeed matter. Since short mode is
14963       # case insensitive, let's make it lowercase to improve readability.
14964       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14965       # Now convert it back to Unix-stile (cygpath)
14966       input_path=`$CYGPATH -u "$shortmode_path"`
14967       new_path="$input_path"
14968     fi
14969   fi
14970 
14971   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14972   if test "x$test_cygdrive_prefix" = x; then
14973     # As a simple fix, exclude /usr/bin since it's not a real path.
14974     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14975       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14976       # a path prefixed by /cygdrive for fixpath to work.
14977       new_path="$CYGWIN_ROOT_PATH$input_path"
14978     fi
14979   fi
14980 
14981 
14982   if test "x$path" != "x$new_path"; then
14983     BOOT_JDK="$new_path"
14984     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14985 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14986   fi
14987 
14988   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14989 
14990   path="$BOOT_JDK"
14991   has_colon=`$ECHO $path | $GREP ^.:`
14992   new_path="$path"
14993   if test "x$has_colon" = x; then
14994     # Not in mixed or Windows style, start by that.
14995     new_path=`cmd //c echo $path`
14996   fi
14997 
14998 
14999   input_path="$new_path"
15000   # Check if we need to convert this using DOS-style short mode. If the path
15001   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15002   # take no chances and rewrite it.
15003   # Note: m4 eats our [], so we need to use [ and ] instead.
15004   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15005   if test "x$has_forbidden_chars" != x; then
15006     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15007     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15008   fi
15009 
15010 
15011   windows_path="$new_path"
15012   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15013     unix_path=`$CYGPATH -u "$windows_path"`
15014     new_path="$unix_path"
15015   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15016     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15017     new_path="$unix_path"
15018   fi
15019 
15020   if test "x$path" != "x$new_path"; then
15021     BOOT_JDK="$new_path"
15022     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15023 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15024   fi
15025 
15026   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15027   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15028 
15029   else
15030     # We're on a posix platform. Hooray! :)
15031     path="$BOOT_JDK"
15032 
15033     if test ! -f "$path" && test ! -d "$path"; then
15034       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15035     fi
15036 
15037     has_space=`$ECHO "$path" | $GREP " "`
15038     if test "x$has_space" != x; then
15039       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15040 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15041       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15042     fi
15043   fi
15044 
15045               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15046 $as_echo_n "checking for Boot JDK... " >&6; }
15047               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15048 $as_echo "$BOOT_JDK" >&6; }
15049               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15050 $as_echo_n "checking Boot JDK version... " >&6; }
15051               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15052               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15053 $as_echo "$BOOT_JDK_VERSION" >&6; }
15054             fi # end check jdk version
15055           fi # end check rt.jar
15056         fi # end check javac
15057       fi # end check java
15058     fi # end check boot jdk found
15059   fi
15060 
15061     done
15062   fi
15063 
15064 
15065     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15066     if test "x$BOOT_JDK_FOUND" = xmaybe; then
15067       # Do we have a bin/java?
15068       if test ! -x "$BOOT_JDK/bin/java"; then
15069         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15070 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15071         BOOT_JDK_FOUND=no
15072       else
15073         # Do we have a bin/javac?
15074         if test ! -x "$BOOT_JDK/bin/javac"; then
15075           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15076 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15077           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15078 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15079           BOOT_JDK_FOUND=no
15080         else
15081           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15082           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15083             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15084 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15085             BOOT_JDK_FOUND=no
15086           else
15087             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15088             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15089 
15090             # Extra M4 quote needed to protect [] in grep expression.
15091             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15092             if test "x$FOUND_VERSION_78" = x; then
15093               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15094 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15095               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15096 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15097               BOOT_JDK_FOUND=no
15098             else
15099               # We're done! :-)
15100               BOOT_JDK_FOUND=yes
15101 
15102   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15103 
15104   # Input might be given as Windows format, start by converting to
15105   # unix format.
15106   path="$BOOT_JDK"
15107   new_path=`$CYGPATH -u "$path"`
15108 
15109   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15110   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15111   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15112   # "foo.exe" is OK but "foo" is an error.
15113   #
15114   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15115   # It is also a way to make sure we got the proper file name for the real test later on.
15116   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15117   if test "x$test_shortpath" = x; then
15118     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15119 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15120     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15121   fi
15122 
15123   # Call helper function which possibly converts this using DOS-style short mode.
15124   # If so, the updated path is stored in $new_path.
15125 
15126   input_path="$new_path"
15127   # Check if we need to convert this using DOS-style short mode. If the path
15128   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15129   # take no chances and rewrite it.
15130   # Note: m4 eats our [], so we need to use [ and ] instead.
15131   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15132   if test "x$has_forbidden_chars" != x; then
15133     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15134     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15135     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15136     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15137       # Going to short mode and back again did indeed matter. Since short mode is
15138       # case insensitive, let's make it lowercase to improve readability.
15139       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15140       # Now convert it back to Unix-stile (cygpath)
15141       input_path=`$CYGPATH -u "$shortmode_path"`
15142       new_path="$input_path"
15143     fi
15144   fi
15145 
15146   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15147   if test "x$test_cygdrive_prefix" = x; then
15148     # As a simple fix, exclude /usr/bin since it's not a real path.
15149     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15150       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15151       # a path prefixed by /cygdrive for fixpath to work.
15152       new_path="$CYGWIN_ROOT_PATH$input_path"
15153     fi
15154   fi
15155 
15156 
15157   if test "x$path" != "x$new_path"; then
15158     BOOT_JDK="$new_path"
15159     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15160 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15161   fi
15162 
15163   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15164 
15165   path="$BOOT_JDK"
15166   has_colon=`$ECHO $path | $GREP ^.:`
15167   new_path="$path"
15168   if test "x$has_colon" = x; then
15169     # Not in mixed or Windows style, start by that.
15170     new_path=`cmd //c echo $path`
15171   fi
15172 
15173 
15174   input_path="$new_path"
15175   # Check if we need to convert this using DOS-style short mode. If the path
15176   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15177   # take no chances and rewrite it.
15178   # Note: m4 eats our [], so we need to use [ and ] instead.
15179   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15180   if test "x$has_forbidden_chars" != x; then
15181     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15182     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15183   fi
15184 
15185 
15186   windows_path="$new_path"
15187   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15188     unix_path=`$CYGPATH -u "$windows_path"`
15189     new_path="$unix_path"
15190   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15191     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15192     new_path="$unix_path"
15193   fi
15194 
15195   if test "x$path" != "x$new_path"; then
15196     BOOT_JDK="$new_path"
15197     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15198 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15199   fi
15200 
15201   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15202   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15203 
15204   else
15205     # We're on a posix platform. Hooray! :)
15206     path="$BOOT_JDK"
15207 
15208     if test ! -f "$path" && test ! -d "$path"; then
15209       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15210     fi
15211 
15212     has_space=`$ECHO "$path" | $GREP " "`
15213     if test "x$has_space" != x; then
15214       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15215 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15216       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15217     fi
15218   fi
15219 
15220               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15221 $as_echo_n "checking for Boot JDK... " >&6; }
15222               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15223 $as_echo "$BOOT_JDK" >&6; }
15224               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15225 $as_echo_n "checking Boot JDK version... " >&6; }
15226               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15227               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15228 $as_echo "$BOOT_JDK_VERSION" >&6; }
15229             fi # end check jdk version
15230           fi # end check rt.jar
15231         fi # end check javac
15232       fi # end check java
15233     fi # end check boot jdk found
15234   fi
15235 
15236   fi
15237 
15238 
15239     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15240     if test "x$BOOT_JDK_FOUND" = xmaybe; then
15241       # Do we have a bin/java?
15242       if test ! -x "$BOOT_JDK/bin/java"; then
15243         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15244 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15245         BOOT_JDK_FOUND=no
15246       else
15247         # Do we have a bin/javac?
15248         if test ! -x "$BOOT_JDK/bin/javac"; then
15249           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15250 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15251           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15252 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15253           BOOT_JDK_FOUND=no
15254         else
15255           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15256           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15257             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15258 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15259             BOOT_JDK_FOUND=no
15260           else
15261             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15262             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15263 
15264             # Extra M4 quote needed to protect [] in grep expression.
15265             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15266             if test "x$FOUND_VERSION_78" = x; then
15267               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15268 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15269               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15270 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15271               BOOT_JDK_FOUND=no
15272             else
15273               # We're done! :-)
15274               BOOT_JDK_FOUND=yes
15275 
15276   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15277 
15278   # Input might be given as Windows format, start by converting to
15279   # unix format.
15280   path="$BOOT_JDK"
15281   new_path=`$CYGPATH -u "$path"`
15282 
15283   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15284   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15285   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15286   # "foo.exe" is OK but "foo" is an error.
15287   #
15288   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15289   # It is also a way to make sure we got the proper file name for the real test later on.
15290   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15291   if test "x$test_shortpath" = x; then
15292     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15293 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15294     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15295   fi
15296 
15297   # Call helper function which possibly converts this using DOS-style short mode.
15298   # If so, the updated path is stored in $new_path.
15299 
15300   input_path="$new_path"
15301   # Check if we need to convert this using DOS-style short mode. If the path
15302   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15303   # take no chances and rewrite it.
15304   # Note: m4 eats our [], so we need to use [ and ] instead.
15305   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15306   if test "x$has_forbidden_chars" != x; then
15307     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15308     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15309     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15310     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15311       # Going to short mode and back again did indeed matter. Since short mode is
15312       # case insensitive, let's make it lowercase to improve readability.
15313       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15314       # Now convert it back to Unix-stile (cygpath)
15315       input_path=`$CYGPATH -u "$shortmode_path"`
15316       new_path="$input_path"
15317     fi
15318   fi
15319 
15320   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15321   if test "x$test_cygdrive_prefix" = x; then
15322     # As a simple fix, exclude /usr/bin since it's not a real path.
15323     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15324       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15325       # a path prefixed by /cygdrive for fixpath to work.
15326       new_path="$CYGWIN_ROOT_PATH$input_path"
15327     fi
15328   fi
15329 
15330 
15331   if test "x$path" != "x$new_path"; then
15332     BOOT_JDK="$new_path"
15333     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15334 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15335   fi
15336 
15337   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15338 
15339   path="$BOOT_JDK"
15340   has_colon=`$ECHO $path | $GREP ^.:`
15341   new_path="$path"
15342   if test "x$has_colon" = x; then
15343     # Not in mixed or Windows style, start by that.
15344     new_path=`cmd //c echo $path`
15345   fi
15346 
15347 
15348   input_path="$new_path"
15349   # Check if we need to convert this using DOS-style short mode. If the path
15350   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15351   # take no chances and rewrite it.
15352   # Note: m4 eats our [], so we need to use [ and ] instead.
15353   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15354   if test "x$has_forbidden_chars" != x; then
15355     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15356     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15357   fi
15358 
15359 
15360   windows_path="$new_path"
15361   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15362     unix_path=`$CYGPATH -u "$windows_path"`
15363     new_path="$unix_path"
15364   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15365     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15366     new_path="$unix_path"
15367   fi
15368 
15369   if test "x$path" != "x$new_path"; then
15370     BOOT_JDK="$new_path"
15371     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15372 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15373   fi
15374 
15375   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15376   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15377 
15378   else
15379     # We're on a posix platform. Hooray! :)
15380     path="$BOOT_JDK"
15381 
15382     if test ! -f "$path" && test ! -d "$path"; then
15383       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15384     fi
15385 
15386     has_space=`$ECHO "$path" | $GREP " "`
15387     if test "x$has_space" != x; then
15388       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15389 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15390       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15391     fi
15392   fi
15393 
15394               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15395 $as_echo_n "checking for Boot JDK... " >&6; }
15396               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15397 $as_echo "$BOOT_JDK" >&6; }
15398               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15399 $as_echo_n "checking Boot JDK version... " >&6; }
15400               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15401               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15402 $as_echo "$BOOT_JDK_VERSION" >&6; }
15403             fi # end check jdk version
15404           fi # end check rt.jar
15405         fi # end check javac
15406       fi # end check java
15407     fi # end check boot jdk found
15408   fi
15409 
15410 
15411 # If we haven't found anything yet, we've truly lost. Give up.
15412 if test "x$BOOT_JDK_FOUND" = xno; then
15413 
15414     # Print a helpful message on how to acquire the necessary build dependency.
15415     # openjdk is the help tag: freetyp2, cups, pulse, alsa etc
15416     MISSING_DEPENDENCY=openjdk
15417     PKGHANDLER_COMMAND=
15418 
15419     case $PKGHANDLER in
15420         apt-get)
15421                 apt_help     $MISSING_DEPENDENCY ;;
15422     yum)
15423                 yum_help     $MISSING_DEPENDENCY ;;
15424         port)
15425                 port_help    $MISSING_DEPENDENCY ;;
15426         pkgutil)
15427                 pkgutil_help $MISSING_DEPENDENCY ;;
15428         pkgadd)
15429                 pkgadd_help  $MISSING_DEPENDENCY ;;
15430     * )
15431       break ;;
15432     esac
15433 
15434     if test "x$PKGHANDLER_COMMAND" != x; then
15435         HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
15436     fi
15437 
15438   { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
15439 $as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
15440   { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
15441 $as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15442   as_fn_error $? "Cannot continue" "$LINENO" 5
15443 fi
15444 
15445 # Setup proper paths for what we found
15446 BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
15447 if test ! -f "$BOOT_RTJAR"; then
15448     # On MacOSX it is called classes.jar
15449     BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
15450     if test -f "$BOOT_RTJAR"; then
15451       # Remove the ..
15452       BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
15453     fi
15454 fi
15455 BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
15456 BOOT_JDK="$BOOT_JDK"
15457 
15458 
15459 
15460 
15461 # Setup tools from the Boot JDK.
15462 
15463   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
15464 $as_echo_n "checking for java in Boot JDK... " >&6; }
15465   JAVA=$BOOT_JDK/bin/java
15466   if test ! -x $JAVA; then
15467       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15468 $as_echo "not found" >&6; }
15469       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15470 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15471       as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
15472   fi
15473   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15474 $as_echo "ok" >&6; }
15475 
15476 
15477   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
15478 $as_echo_n "checking for javac in Boot JDK... " >&6; }
15479   JAVAC=$BOOT_JDK/bin/javac
15480   if test ! -x $JAVAC; then
15481       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15482 $as_echo "not found" >&6; }
15483       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15484 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15485       as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
15486   fi
15487   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15488 $as_echo "ok" >&6; }
15489 
15490 
15491   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
15492 $as_echo_n "checking for javah in Boot JDK... " >&6; }
15493   JAVAH=$BOOT_JDK/bin/javah
15494   if test ! -x $JAVAH; then
15495       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15496 $as_echo "not found" >&6; }
15497       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15498 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15499       as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
15500   fi
15501   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15502 $as_echo "ok" >&6; }
15503 
15504 
15505   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
15506 $as_echo_n "checking for javap in Boot JDK... " >&6; }
15507   JAVAP=$BOOT_JDK/bin/javap
15508   if test ! -x $JAVAP; then
15509       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15510 $as_echo "not found" >&6; }
15511       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15512 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15513       as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
15514   fi
15515   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15516 $as_echo "ok" >&6; }
15517 
15518 
15519   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
15520 $as_echo_n "checking for jar in Boot JDK... " >&6; }
15521   JAR=$BOOT_JDK/bin/jar
15522   if test ! -x $JAR; then
15523       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15524 $as_echo "not found" >&6; }
15525       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15526 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15527       as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
15528   fi
15529   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15530 $as_echo "ok" >&6; }
15531 
15532 
15533   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
15534 $as_echo_n "checking for rmic in Boot JDK... " >&6; }
15535   RMIC=$BOOT_JDK/bin/rmic
15536   if test ! -x $RMIC; then
15537       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15538 $as_echo "not found" >&6; }
15539       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15540 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15541       as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
15542   fi
15543   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15544 $as_echo "ok" >&6; }
15545 
15546 
15547   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
15548 $as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
15549   NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
15550   if test ! -x $NATIVE2ASCII; then
15551       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15552 $as_echo "not found" >&6; }
15553       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15554 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15555       as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
15556   fi
15557   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15558 $as_echo "ok" >&6; }
15559 
15560 
15561 # Finally, set some other options...
15562 
15563 # When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
15564 BOOT_JDK_SOURCETARGET="-source 7 -target 7"
15565 
15566 
15567 
15568 
15569 ##############################################################################
15570 #
15571 # Specify options for anything that is run with the Boot JDK.
15572 #
15573 
15574 # Check whether --with-boot-jdk-jvmargs was given.
15575 if test "${with_boot_jdk_jvmargs+set}" = set; then :
15576   withval=$with_boot_jdk_jvmargs;
15577 fi
15578 
15579 
15580 if test "x$with_boot_jdk_jvmargs" = x; then
15581     # Not all JVM:s accept the same arguments on the command line.
15582     # OpenJDK specific increase in thread stack for JDK build,
15583     # well more specifically, when running javac.
15584     if test "x$BUILD_NUM_BITS" = x32; then
15585        STACK_SIZE=768
15586     else
15587        # Running Javac on a JVM on a 64-bit machine, the stack takes more space
15588        # since 64-bit pointers are pushed on the stach. Apparently, we need
15589        # to increase the stack space when javacing the JDK....
15590        STACK_SIZE=1536
15591     fi
15592 
15593     # Minimum amount of heap memory.
15594 
15595     # Test if -Xms64M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15596     # If so, then append -Xms64M to boot_jdk_jvmargs
15597     FOUND_WARN=`$JAVA -Xms64M -version 2>&1 | grep -i warn`
15598     FOUND_VERSION=`$JAVA -Xms64M -version 2>&1 | grep " version \""`
15599     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15600         boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
15601     fi
15602 
15603     if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15604         # Why does macosx need more heap? Its the huge JDK batch.
15605 
15606     # Test if -Xmx1600M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15607     # If so, then append -Xmx1600M to boot_jdk_jvmargs
15608     FOUND_WARN=`$JAVA -Xmx1600M -version 2>&1 | grep -i warn`
15609     FOUND_VERSION=`$JAVA -Xmx1600M -version 2>&1 | grep " version \""`
15610     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15611         boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
15612     fi
15613 
15614     else
15615 
15616     # Test if -Xmx1100M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15617     # If so, then append -Xmx1100M to boot_jdk_jvmargs
15618     FOUND_WARN=`$JAVA -Xmx1100M -version 2>&1 | grep -i warn`
15619     FOUND_VERSION=`$JAVA -Xmx1100M -version 2>&1 | grep " version \""`
15620     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15621         boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
15622     fi
15623 
15624     fi
15625     # When is adding -client something that speeds up the JVM?
15626     # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
15627 
15628     # Test if -XX:PermSize=32m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15629     # If so, then append -XX:PermSize=32m to boot_jdk_jvmargs
15630     FOUND_WARN=`$JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
15631     FOUND_VERSION=`$JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
15632     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15633         boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
15634     fi
15635 
15636 
15637     # Test if -XX:MaxPermSize=160m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15638     # If so, then append -XX:MaxPermSize=160m to boot_jdk_jvmargs
15639     FOUND_WARN=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
15640     FOUND_VERSION=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
15641     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15642         boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
15643     fi
15644 
15645 
15646     # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15647     # If so, then append -XX:ThreadStackSize=$STACK_SIZE to boot_jdk_jvmargs
15648     FOUND_WARN=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
15649     FOUND_VERSION=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
15650     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15651         boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
15652     fi
15653 
15654     # Disable special log output when a debug build is used as Boot JDK...
15655 
15656     # Test if -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15657     # If so, then append -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput to boot_jdk_jvmargs
15658     FOUND_WARN=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep -i warn`
15659     FOUND_VERSION=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep " version \""`
15660     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15661         boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
15662     fi
15663 
15664 fi
15665 
15666 BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
15667 
15668 
15669 
15670 ###############################################################################
15671 #
15672 # Configure the sources to use. We can add or override individual directories.
15673 #
15674 ###############################################################################
15675 
15676 
15677 
15678 # Where are the sources. Any of these can be overridden
15679 # using --with-override-corba and the likes.
15680 LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
15681 CORBA_TOPDIR="$SRC_ROOT/corba"
15682 JAXP_TOPDIR="$SRC_ROOT/jaxp"
15683 JAXWS_TOPDIR="$SRC_ROOT/jaxws"
15684 HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
15685 JDK_TOPDIR="$SRC_ROOT/jdk"
15686 
15687 
15688 
15689 
15690 
15691 
15692 
15693 
15694 
15695 ###############################################################################
15696 #
15697 # Pickup additional source for a component from outside of the source root
15698 # or override source for a component.
15699 #
15700 
15701 # Check whether --with-add-source-root was given.
15702 if test "${with_add_source_root+set}" = set; then :
15703   withval=$with_add_source_root;
15704 fi
15705 
15706 
15707 
15708 # Check whether --with-override-source-root was given.
15709 if test "${with_override_source_root+set}" = set; then :
15710   withval=$with_override_source_root;
15711 fi
15712 
15713 
15714 
15715 # Check whether --with-adds-and-overrides was given.
15716 if test "${with_adds_and_overrides+set}" = set; then :
15717   withval=$with_adds_and_overrides;
15718 fi
15719 
15720 
15721 if test "x$with_adds_and_overrides" != x; then
15722     with_add_source_root="$with_adds_and_overrides/adds"
15723     with_override_source_root="$with_adds_and_overrides/overrides"
15724 fi
15725 
15726 if test "x$with_add_source_root" != x; then
15727     if ! test -d $with_add_source_root; then
15728        as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
15729     fi
15730     CURDIR="$PWD"
15731     cd "$with_add_source_root"
15732     ADD_SRC_ROOT="`pwd`"
15733     cd "$CURDIR"
15734     # Verify that the addon source root does not have any root makefiles.
15735     # If it does, then it is usually an error, prevent this.
15736     if test -f $with_add_source_root/langtools/makefiles/Makefile || \
15737        test -f $with_add_source_root/langtools/make/Makefile; then
15738         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
15739     fi
15740     if test -f $with_add_source_root/corba/makefiles/Makefile || \
15741        test -f $with_add_source_root/corba/make/Makefile; then
15742         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
15743     fi
15744     if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
15745        test -f $with_add_source_root/jaxp/make/Makefile; then
15746         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
15747     fi
15748     if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
15749        test -f $with_add_source_root/jaxws/make/Makefile; then
15750         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
15751     fi
15752     if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
15753        test -f $with_add_source_root/hotspot/make/Makefile; then
15754         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
15755     fi
15756     if test -f $with_add_source_root/jdk/makefiles/Makefile || \
15757        test -f $with_add_source_root/jdk/make/Makefile; then
15758         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
15759     fi
15760 fi
15761 
15762 
15763 if test "x$with_override_source_root" != x; then
15764     if ! test -d $with_override_source_root; then
15765        as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
15766     fi
15767     CURDIR="$PWD"
15768     cd "$with_override_source_root"
15769     OVERRIDE_SRC_ROOT="`pwd`"
15770     cd "$CURDIR"
15771     if test -f $with_override_source_root/langtools/makefiles/Makefile || \
15772        test -f $with_override_source_root/langtools/make/Makefile; then
15773         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
15774     fi
15775     if test -f $with_override_source_root/corba/makefiles/Makefile || \
15776        test -f $with_override_source_root/corba/make/Makefile; then
15777         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
15778     fi
15779     if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
15780        test -f $with_override_source_root/jaxp/make/Makefile; then
15781         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
15782     fi
15783     if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
15784        test -f $with_override_source_root/jaxws/make/Makefile; then
15785         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
15786     fi
15787     if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
15788        test -f $with_override_source_root/hotspot/make/Makefile; then
15789         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
15790     fi
15791     if test -f $with_override_source_root/jdk/makefiles/Makefile || \
15792        test -f $with_override_source_root/jdk/make/Makefile; then
15793         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
15794     fi
15795 fi
15796 
15797 
15798 ###############################################################################
15799 #
15800 # Override a repo completely, this is used for example when you have 3 small
15801 # development sandboxes of the langtools sources and want to avoid having 3 full
15802 # OpenJDK sources checked out on disk.
15803 #
15804 # Assuming that the 3 langtools sandboxes are located here:
15805 # /home/fredrik/sandbox1/langtools
15806 # /home/fredrik/sandbox2/langtools
15807 # /home/fredrik/sandbox3/langtools
15808 #
15809 # From the source root you create build subdirs manually:
15810 #     mkdir -p build1 build2 build3
15811 # in each build directory run:
15812 #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
15813 #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
15814 #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
15815 #
15816 
15817 
15818 # Check whether --with-override-langtools was given.
15819 if test "${with_override_langtools+set}" = set; then :
15820   withval=$with_override_langtools;
15821 fi
15822 
15823 
15824 
15825 # Check whether --with-override-corba was given.
15826 if test "${with_override_corba+set}" = set; then :
15827   withval=$with_override_corba;
15828 fi
15829 
15830 
15831 
15832 # Check whether --with-override-jaxp was given.
15833 if test "${with_override_jaxp+set}" = set; then :
15834   withval=$with_override_jaxp;
15835 fi
15836 
15837 
15838 
15839 # Check whether --with-override-jaxws was given.
15840 if test "${with_override_jaxws+set}" = set; then :
15841   withval=$with_override_jaxws;
15842 fi
15843 
15844 
15845 
15846 # Check whether --with-override-hotspot was given.
15847 if test "${with_override_hotspot+set}" = set; then :
15848   withval=$with_override_hotspot;
15849 fi
15850 
15851 
15852 
15853 # Check whether --with-override-jdk was given.
15854 if test "${with_override_jdk+set}" = set; then :
15855   withval=$with_override_jdk;
15856 fi
15857 
15858 
15859 if test "x$with_override_langtools" != x; then
15860     CURDIR="$PWD"
15861     cd "$with_override_langtools"
15862     LANGTOOLS_TOPDIR="`pwd`"
15863     cd "$CURDIR"
15864     if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
15865         as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
15866     fi
15867     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
15868 $as_echo_n "checking if langtools should be overridden... " >&6; }
15869     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
15870 $as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
15871 fi
15872 if test "x$with_override_corba" != x; then
15873     CURDIR="$PWD"
15874     cd "$with_override_corba"
15875     CORBA_TOPDIR="`pwd`"
15876     cd "$CURDIR"
15877     if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
15878         as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
15879     fi
15880     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
15881 $as_echo_n "checking if corba should be overridden... " >&6; }
15882     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
15883 $as_echo "yes with $CORBA_TOPDIR" >&6; }
15884 fi
15885 if test "x$with_override_jaxp" != x; then
15886     CURDIR="$PWD"
15887     cd "$with_override_jaxp"
15888     JAXP_TOPDIR="`pwd`"
15889     cd "$CURDIR"
15890     if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
15891         as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
15892     fi
15893     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
15894 $as_echo_n "checking if jaxp should be overridden... " >&6; }
15895     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
15896 $as_echo "yes with $JAXP_TOPDIR" >&6; }
15897 fi
15898 if test "x$with_override_jaxws" != x; then
15899     CURDIR="$PWD"
15900     cd "$with_override_jaxws"
15901     JAXWS_TOPDIR="`pwd`"
15902     cd "$CURDIR"
15903     if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
15904         as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
15905     fi
15906     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
15907 $as_echo_n "checking if jaxws should be overridden... " >&6; }
15908     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
15909 $as_echo "yes with $JAXWS_TOPDIR" >&6; }
15910 fi
15911 if test "x$with_override_hotspot" != x; then
15912     CURDIR="$PWD"
15913     cd "$with_override_hotspot"
15914     HOTSPOT_TOPDIR="`pwd`"
15915     cd "$CURDIR"
15916     if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
15917        ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
15918         as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
15919     fi
15920     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
15921 $as_echo_n "checking if hotspot should be overridden... " >&6; }
15922     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
15923 $as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
15924 fi
15925 if test "x$with_override_jdk" != x; then
15926     CURDIR="$PWD"
15927     cd "$with_override_jdk"
15928     JDK_TOPDIR="`pwd`"
15929     cd "$CURDIR"
15930     if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
15931         as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
15932     fi
15933     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
15934 $as_echo_n "checking if JDK should be overridden... " >&6; }
15935     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
15936 $as_echo "yes with $JDK_TOPDIR" >&6; }
15937 fi
15938 
15939 
15940 
15941 BUILD_OUTPUT="$OUTPUT_ROOT"
15942 
15943 
15944 HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
15945 BUILD_HOTSPOT=true
15946 
15947 
15948 
15949 # Check whether --with-import-hotspot was given.
15950 if test "${with_import_hotspot+set}" = set; then :
15951   withval=$with_import_hotspot;
15952 fi
15953 
15954 if test "x$with_import_hotspot" != x; then
15955     CURDIR="$PWD"
15956     cd "$with_import_hotspot"
15957     HOTSPOT_DIST="`pwd`"
15958     cd "$CURDIR"
15959     if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
15960         as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
15961     fi
15962     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
15963 $as_echo_n "checking if hotspot should be imported... " >&6; }
15964     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
15965 $as_echo "yes from $HOTSPOT_DIST" >&6; }
15966     BUILD_HOTSPOT=false
15967 fi
15968 
15969 JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
15970 
15971 
15972 ###############################################################################
15973 #
15974 # Setup the toolchain (compilers etc), i.e. the tools that need to be
15975 # cross-compilation aware.
15976 #
15977 ###############################################################################
15978 
15979 
15980 ###############################################################################
15981 #
15982 # Configure the development tool paths and potential sysroot.
15983 #
15984 ac_ext=cpp
15985 ac_cpp='$CXXCPP $CPPFLAGS'
15986 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15987 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15988 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15989 
15990 
15991 # The option used to specify the target .o,.a or .so file.
15992 # When compiling, how to specify the to be created object file.
15993 CC_OUT_OPTION='-o$(SPACE)'
15994 # When linking, how to specify the to be created executable.
15995 EXE_OUT_OPTION='-o$(SPACE)'
15996 # When linking, how to specify the to be created dynamically linkable library.
15997 LD_OUT_OPTION='-o$(SPACE)'
15998 # When archiving, how to specify the to be create static archive for object files.
15999 AR_OUT_OPTION='rcs$(SPACE)'
16000 
16001 
16002 
16003 
16004 
16005 # Locate the actual tools
16006 
16007 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16008 
16009   # Store path to cygwin link.exe to help excluding it when searching for
16010   # VS linker. This must be done before changing the PATH when looking for VS.
16011   # Extract the first word of "link", so it can be a program name with args.
16012 set dummy link; ac_word=$2
16013 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16014 $as_echo_n "checking for $ac_word... " >&6; }
16015 if ${ac_cv_path_CYGWIN_LINK+:} false; then :
16016   $as_echo_n "(cached) " >&6
16017 else
16018   case $CYGWIN_LINK in
16019   [\\/]* | ?:[\\/]*)
16020   ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
16021   ;;
16022   *)
16023   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16024 for as_dir in $PATH
16025 do
16026   IFS=$as_save_IFS
16027   test -z "$as_dir" && as_dir=.
16028     for ac_exec_ext in '' $ac_executable_extensions; do
16029   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16030     ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
16031     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16032     break 2
16033   fi
16034 done
16035   done
16036 IFS=$as_save_IFS
16037 
16038   ;;
16039 esac
16040 fi
16041 CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
16042 if test -n "$CYGWIN_LINK"; then
16043   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
16044 $as_echo "$CYGWIN_LINK" >&6; }
16045 else
16046   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16047 $as_echo "no" >&6; }
16048 fi
16049 
16050 
16051   if test "x$CYGWIN_LINK" != x; then
16052     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
16053 $as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
16054     "$CYGWIN_LINK" --version > /dev/null
16055     if test $? -eq 0 ; then
16056       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16057 $as_echo "yes" >&6; }
16058     else
16059       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16060 $as_echo "no" >&6; }
16061       # This might be the VS linker. Don't exclude it later on.
16062       CYGWIN_LINK=""
16063     fi
16064   fi
16065 
16066   # First-hand choice is to locate and run the vsvars bat file.
16067 
16068   if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16069     VCVARSFILE="vc/bin/vcvars32.bat"
16070   else
16071     VCVARSFILE="vc/bin/amd64/vcvars64.bat"
16072   fi
16073 
16074   VS_ENV_CMD=""
16075   VS_ENV_ARGS=""
16076   if test "x$with_toolsdir" != x; then
16077 
16078   if test "x$VS_ENV_CMD" = x; then
16079     VS100BASE="$with_toolsdir/../.."
16080     METHOD="--with-tools-dir"
16081 
16082   windows_path="$VS100BASE"
16083   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16084     unix_path=`$CYGPATH -u "$windows_path"`
16085     VS100BASE="$unix_path"
16086   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16087     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16088     VS100BASE="$unix_path"
16089   fi
16090 
16091     if test -d "$VS100BASE"; then
16092       if test -f "$VS100BASE/$VCVARSFILE"; then
16093         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16094 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16095         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16096       else
16097         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16098 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16099         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16100 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16101       fi
16102     fi
16103   fi
16104 
16105   fi
16106 
16107   if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
16108     # Having specified an argument which is incorrect will produce an instant failure;
16109     # we should not go on looking
16110     { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
16111 $as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
16112     { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
16113 $as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
16114     as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
16115   fi
16116 
16117   if test "x$ProgramW6432" != x; then
16118 
16119   if test "x$VS_ENV_CMD" = x; then
16120     WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
16121     METHOD="well-known name"
16122 
16123   windows_path="$WIN_SDK_BASE"
16124   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16125     unix_path=`$CYGPATH -u "$windows_path"`
16126     WIN_SDK_BASE="$unix_path"
16127   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16128     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16129     WIN_SDK_BASE="$unix_path"
16130   fi
16131 
16132     if test -d "$WIN_SDK_BASE"; then
16133       # There have been cases of partial or broken SDK installations. A missing
16134       # lib dir is not going to work.
16135       if test ! -d "$WIN_SDK_BASE/../lib"; then
16136         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16137 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16138         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16139 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16140       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16141         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16142 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16143         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16144         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16145           VS_ENV_ARGS="/x86"
16146         else
16147           VS_ENV_ARGS="/x64"
16148         fi
16149       else
16150         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16151 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16152         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16153 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16154       fi
16155     fi
16156   fi
16157 
16158   fi
16159   if test "x$PROGRAMW6432" != x; then
16160 
16161   if test "x$VS_ENV_CMD" = x; then
16162     WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
16163     METHOD="well-known name"
16164 
16165   windows_path="$WIN_SDK_BASE"
16166   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16167     unix_path=`$CYGPATH -u "$windows_path"`
16168     WIN_SDK_BASE="$unix_path"
16169   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16170     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16171     WIN_SDK_BASE="$unix_path"
16172   fi
16173 
16174     if test -d "$WIN_SDK_BASE"; then
16175       # There have been cases of partial or broken SDK installations. A missing
16176       # lib dir is not going to work.
16177       if test ! -d "$WIN_SDK_BASE/../lib"; then
16178         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16179 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16180         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16181 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16182       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16183         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16184 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16185         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16186         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16187           VS_ENV_ARGS="/x86"
16188         else
16189           VS_ENV_ARGS="/x64"
16190         fi
16191       else
16192         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16193 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16194         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16195 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16196       fi
16197     fi
16198   fi
16199 
16200   fi
16201   if test "x$PROGRAMFILES" != x; then
16202 
16203   if test "x$VS_ENV_CMD" = x; then
16204     WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
16205     METHOD="well-known name"
16206 
16207   windows_path="$WIN_SDK_BASE"
16208   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16209     unix_path=`$CYGPATH -u "$windows_path"`
16210     WIN_SDK_BASE="$unix_path"
16211   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16212     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16213     WIN_SDK_BASE="$unix_path"
16214   fi
16215 
16216     if test -d "$WIN_SDK_BASE"; then
16217       # There have been cases of partial or broken SDK installations. A missing
16218       # lib dir is not going to work.
16219       if test ! -d "$WIN_SDK_BASE/../lib"; then
16220         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16221 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16222         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16223 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16224       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16225         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16226 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16227         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16228         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16229           VS_ENV_ARGS="/x86"
16230         else
16231           VS_ENV_ARGS="/x64"
16232         fi
16233       else
16234         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16235 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16236         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16237 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16238       fi
16239     fi
16240   fi
16241 
16242   fi
16243 
16244   if test "x$VS_ENV_CMD" = x; then
16245     WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
16246     METHOD="well-known name"
16247 
16248   windows_path="$WIN_SDK_BASE"
16249   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16250     unix_path=`$CYGPATH -u "$windows_path"`
16251     WIN_SDK_BASE="$unix_path"
16252   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16253     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16254     WIN_SDK_BASE="$unix_path"
16255   fi
16256 
16257     if test -d "$WIN_SDK_BASE"; then
16258       # There have been cases of partial or broken SDK installations. A missing
16259       # lib dir is not going to work.
16260       if test ! -d "$WIN_SDK_BASE/../lib"; then
16261         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16262 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16263         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16264 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16265       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16266         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16267 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16268         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16269         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16270           VS_ENV_ARGS="/x86"
16271         else
16272           VS_ENV_ARGS="/x64"
16273         fi
16274       else
16275         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16276 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16277         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16278 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16279       fi
16280     fi
16281   fi
16282 
16283 
16284   if test "x$VS_ENV_CMD" = x; then
16285     WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
16286     METHOD="well-known name"
16287 
16288   windows_path="$WIN_SDK_BASE"
16289   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16290     unix_path=`$CYGPATH -u "$windows_path"`
16291     WIN_SDK_BASE="$unix_path"
16292   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16293     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16294     WIN_SDK_BASE="$unix_path"
16295   fi
16296 
16297     if test -d "$WIN_SDK_BASE"; then
16298       # There have been cases of partial or broken SDK installations. A missing
16299       # lib dir is not going to work.
16300       if test ! -d "$WIN_SDK_BASE/../lib"; then
16301         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16302 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16303         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16304 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16305       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16306         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16307 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16308         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16309         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16310           VS_ENV_ARGS="/x86"
16311         else
16312           VS_ENV_ARGS="/x64"
16313         fi
16314       else
16315         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16316 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16317         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16318 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16319       fi
16320     fi
16321   fi
16322 
16323 
16324   if test "x$VS100COMNTOOLS" != x; then
16325 
16326   if test "x$VS_ENV_CMD" = x; then
16327     VS100BASE="$VS100COMNTOOLS/../.."
16328     METHOD="VS100COMNTOOLS variable"
16329 
16330   windows_path="$VS100BASE"
16331   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16332     unix_path=`$CYGPATH -u "$windows_path"`
16333     VS100BASE="$unix_path"
16334   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16335     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16336     VS100BASE="$unix_path"
16337   fi
16338 
16339     if test -d "$VS100BASE"; then
16340       if test -f "$VS100BASE/$VCVARSFILE"; then
16341         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16342 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16343         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16344       else
16345         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16346 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16347         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16348 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16349       fi
16350     fi
16351   fi
16352 
16353   fi
16354   if test "x$PROGRAMFILES" != x; then
16355 
16356   if test "x$VS_ENV_CMD" = x; then
16357     VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
16358     METHOD="well-known name"
16359 
16360   windows_path="$VS100BASE"
16361   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16362     unix_path=`$CYGPATH -u "$windows_path"`
16363     VS100BASE="$unix_path"
16364   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16365     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16366     VS100BASE="$unix_path"
16367   fi
16368 
16369     if test -d "$VS100BASE"; then
16370       if test -f "$VS100BASE/$VCVARSFILE"; then
16371         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16372 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16373         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16374       else
16375         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16376 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16377         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16378 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16379       fi
16380     fi
16381   fi
16382 
16383   fi
16384 
16385   if test "x$VS_ENV_CMD" = x; then
16386     VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
16387     METHOD="well-known name"
16388 
16389   windows_path="$VS100BASE"
16390   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16391     unix_path=`$CYGPATH -u "$windows_path"`
16392     VS100BASE="$unix_path"
16393   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16394     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16395     VS100BASE="$unix_path"
16396   fi
16397 
16398     if test -d "$VS100BASE"; then
16399       if test -f "$VS100BASE/$VCVARSFILE"; then
16400         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16401 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16402         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16403       else
16404         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16405 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16406         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16407 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16408       fi
16409     fi
16410   fi
16411 
16412 
16413   if test "x$VS_ENV_CMD" = x; then
16414     VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
16415     METHOD="well-known name"
16416 
16417   windows_path="$VS100BASE"
16418   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16419     unix_path=`$CYGPATH -u "$windows_path"`
16420     VS100BASE="$unix_path"
16421   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16422     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16423     VS100BASE="$unix_path"
16424   fi
16425 
16426     if test -d "$VS100BASE"; then
16427       if test -f "$VS100BASE/$VCVARSFILE"; then
16428         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16429 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16430         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16431       else
16432         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16433 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16434         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16435 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16436       fi
16437     fi
16438   fi
16439 
16440 
16441   if test "x$VS_ENV_CMD" != x; then
16442     # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
16443 
16444   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16445 
16446   # First separate the path from the arguments. This will split at the first
16447   # space.
16448   complete="$VS_ENV_CMD"
16449   path="${complete%% *}"
16450   tmp="$complete EOL"
16451   arguments="${tmp#* }"
16452 
16453   # Input might be given as Windows format, start by converting to
16454   # unix format.
16455   new_path=`$CYGPATH -u "$path"`
16456 
16457   # Now try to locate executable using which
16458   new_path=`$WHICH "$new_path" 2> /dev/null`
16459   # bat and cmd files are not always considered executable in cygwin causing which
16460   # to not find them
16461   if test "x$new_path" = x \
16462            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16463            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16464     new_path=`$CYGPATH -u "$path"`
16465   fi
16466   if test "x$new_path" = x; then
16467     # Oops. Which didn't find the executable.
16468     # The splitting of arguments from the executable at a space might have been incorrect,
16469     # since paths with space are more likely in Windows. Give it another try with the whole
16470     # argument.
16471     path="$complete"
16472     arguments="EOL"
16473     new_path=`$CYGPATH -u "$path"`
16474     new_path=`$WHICH "$new_path" 2> /dev/null`
16475     # bat and cmd files are not always considered executable in cygwin causing which
16476     # to not find them
16477     if test "x$new_path" = x \
16478              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16479              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16480       new_path=`$CYGPATH -u "$path"`
16481     fi
16482     if test "x$new_path" = x; then
16483       # It's still not found. Now this is an unrecoverable error.
16484       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16485 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16486       has_space=`$ECHO "$complete" | $GREP " "`
16487       if test "x$has_space" != x; then
16488         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16489 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16490       fi
16491       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16492     fi
16493   fi
16494 
16495   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16496   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16497   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16498   # "foo.exe" is OK but "foo" is an error.
16499   #
16500   # This test is therefore slightly more accurate than "test -f" to check for file precense.
16501   # It is also a way to make sure we got the proper file name for the real test later on.
16502   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16503   if test "x$test_shortpath" = x; then
16504     # Short path failed, file does not exist as specified.
16505     # Try adding .exe or .cmd
16506     if test -f "${new_path}.exe"; then
16507        input_to_shortpath="${new_path}.exe"
16508     elif test -f "${new_path}.cmd"; then
16509        input_to_shortpath="${new_path}.cmd"
16510     else
16511       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
16512 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
16513       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16514 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16515       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16516     fi
16517   else
16518     input_to_shortpath="$new_path"
16519   fi
16520 
16521   # Call helper function which possibly converts this using DOS-style short mode.
16522   # If so, the updated path is stored in $new_path.
16523   new_path="$input_to_shortpath"
16524 
16525   input_path="$input_to_shortpath"
16526   # Check if we need to convert this using DOS-style short mode. If the path
16527   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16528   # take no chances and rewrite it.
16529   # Note: m4 eats our [], so we need to use [ and ] instead.
16530   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16531   if test "x$has_forbidden_chars" != x; then
16532     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16533     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16534     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16535     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16536       # Going to short mode and back again did indeed matter. Since short mode is
16537       # case insensitive, let's make it lowercase to improve readability.
16538       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16539       # Now convert it back to Unix-stile (cygpath)
16540       input_path=`$CYGPATH -u "$shortmode_path"`
16541       new_path="$input_path"
16542     fi
16543   fi
16544 
16545   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16546   if test "x$test_cygdrive_prefix" = x; then
16547     # As a simple fix, exclude /usr/bin since it's not a real path.
16548     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16549       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16550       # a path prefixed by /cygdrive for fixpath to work.
16551       new_path="$CYGWIN_ROOT_PATH$input_path"
16552     fi
16553   fi
16554 
16555   # remove trailing .exe if any
16556   new_path="${new_path/%.exe/}"
16557 
16558   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16559 
16560   # First separate the path from the arguments. This will split at the first
16561   # space.
16562   complete="$VS_ENV_CMD"
16563   path="${complete%% *}"
16564   tmp="$complete EOL"
16565   arguments="${tmp#* }"
16566 
16567   # Input might be given as Windows format, start by converting to
16568   # unix format.
16569   new_path="$path"
16570 
16571   windows_path="$new_path"
16572   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16573     unix_path=`$CYGPATH -u "$windows_path"`
16574     new_path="$unix_path"
16575   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16576     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16577     new_path="$unix_path"
16578   fi
16579 
16580 
16581   # Now try to locate executable using which
16582   new_path=`$WHICH "$new_path" 2> /dev/null`
16583 
16584   if test "x$new_path" = x; then
16585     # Oops. Which didn't find the executable.
16586     # The splitting of arguments from the executable at a space might have been incorrect,
16587     # since paths with space are more likely in Windows. Give it another try with the whole
16588     # argument.
16589     path="$complete"
16590     arguments="EOL"
16591     new_path="$path"
16592 
16593   windows_path="$new_path"
16594   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16595     unix_path=`$CYGPATH -u "$windows_path"`
16596     new_path="$unix_path"
16597   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16598     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16599     new_path="$unix_path"
16600   fi
16601 
16602 
16603     new_path=`$WHICH "$new_path" 2> /dev/null`
16604 
16605     if test "x$new_path" = x; then
16606       # It's still not found. Now this is an unrecoverable error.
16607       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16608 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16609       has_space=`$ECHO "$complete" | $GREP " "`
16610       if test "x$has_space" != x; then
16611         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16612 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16613       fi
16614       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16615     fi
16616   fi
16617 
16618   # Now new_path has a complete unix path to the binary
16619   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16620     # Keep paths in /bin as-is, but remove trailing .exe if any
16621     new_path="${new_path/%.exe/}"
16622     # Do not save /bin paths to all_fixpath_prefixes!
16623   else
16624     # Not in mixed or Windows style, start by that.
16625     new_path=`cmd //c echo $new_path`
16626 
16627   input_path="$new_path"
16628   # Check if we need to convert this using DOS-style short mode. If the path
16629   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16630   # take no chances and rewrite it.
16631   # Note: m4 eats our [], so we need to use [ and ] instead.
16632   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16633   if test "x$has_forbidden_chars" != x; then
16634     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16635     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16636   fi
16637 
16638     # Output is in $new_path
16639 
16640   windows_path="$new_path"
16641   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16642     unix_path=`$CYGPATH -u "$windows_path"`
16643     new_path="$unix_path"
16644   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16645     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16646     new_path="$unix_path"
16647   fi
16648 
16649     # remove trailing .exe if any
16650     new_path="${new_path/%.exe/}"
16651 
16652     # Save the first 10 bytes of this path to the storage, so fixpath can work.
16653     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16654   fi
16655 
16656   else
16657     # We're on a posix platform. Hooray! :)
16658     # First separate the path from the arguments. This will split at the first
16659     # space.
16660     complete="$VS_ENV_CMD"
16661     path="${complete%% *}"
16662     tmp="$complete EOL"
16663     arguments="${tmp#* }"
16664 
16665     # Cannot rely on the command "which" here since it doesn't always work.
16666     is_absolute_path=`$ECHO "$path" | $GREP ^/`
16667     if test -z "$is_absolute_path"; then
16668       # Path to executable is not absolute. Find it.
16669       IFS_save="$IFS"
16670       IFS=:
16671       for p in $PATH; do
16672         if test -f "$p/$path" && test -x "$p/$path"; then
16673           new_path="$p/$path"
16674           break
16675         fi
16676       done
16677       IFS="$IFS_save"
16678     else
16679       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
16680 $as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
16681       new_path="$path"
16682     fi
16683 
16684     if test "x$new_path" = x; then
16685         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16686 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16687         has_space=`$ECHO "$complete" | $GREP " "`
16688         if test "x$has_space" != x; then
16689           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16690 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16691         fi
16692         as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16693       fi
16694   fi
16695 
16696       # Now join together the path and the arguments once again
16697       if test "x$arguments" != xEOL; then
16698         new_complete="$new_path ${arguments% *}"
16699       else
16700         new_complete="$new_path"
16701       fi
16702 
16703   if test "x$complete" != "x$new_complete"; then
16704       VS_ENV_CMD="$new_complete"
16705       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
16706 $as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
16707     fi
16708 
16709 
16710     # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
16711     { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
16712 $as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
16713     cd $OUTPUT_ROOT
16714     # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
16715     # to autoconf standards.
16716 
16717     #----
16718 
16719     # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
16720     # but calculate the difference in Cygwin environment before/after running it and then
16721     # apply the diff.
16722 
16723     if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
16724       _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
16725       _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
16726       _dosbash=`cygpath -a -w -s \`which bash\`.*`
16727     else
16728       _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
16729       _dosbash=`cmd //c echo \`which bash\``
16730     fi
16731 
16732     # generate the set of exported vars before/after the vs10 setup
16733     $ECHO "@echo off"                                           >  localdevenvtmp.bat
16734     $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
16735     $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
16736     $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
16737 
16738     # Now execute the newly created bat file.
16739     # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
16740     cmd /c localdevenvtmp.bat | cat
16741 
16742     # apply the diff (less some non-vs10 vars named by "!")
16743     $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
16744     $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
16745     $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
16746 
16747     # cleanup
16748     $RM localdevenvtmp*
16749     #----
16750     cd $CURDIR
16751     if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
16752       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16753 $as_echo "no" >&6; }
16754       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
16755 $as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
16756       { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16757 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16758       { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16759 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16760       as_fn_error $? "Cannot continue" "$LINENO" 5
16761     fi
16762 
16763     # Now set all paths and other env variables. This will allow the rest of
16764     # the configure script to find and run the compiler in the proper way.
16765     { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
16766 $as_echo "$as_me: Setting extracted environment variables" >&6;}
16767     . $OUTPUT_ROOT/localdevenv.sh
16768   else
16769     # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
16770     { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
16771 $as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
16772   fi
16773 
16774   # At this point, we should have corrent variables in the environment, or we can't continue.
16775   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
16776 $as_echo_n "checking for Visual Studio variables... " >&6; }
16777 
16778   if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
16779     if test "x$INCLUDE" = x || test "x$LIB" = x; then
16780       { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
16781 $as_echo "present but broken" >&6; }
16782       as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
16783     else
16784       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16785 $as_echo "ok" >&6; }
16786       # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
16787       VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
16788       VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
16789       VS_PATH="$PATH"
16790 
16791 
16792 
16793     fi
16794   else
16795     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16796 $as_echo "not found" >&6; }
16797 
16798     if test "x$VS_ENV_CMD" = x; then
16799       { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
16800 $as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
16801       { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
16802 $as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
16803     else
16804       { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
16805 $as_echo "$as_me: Running the extraction script failed." >&6;}
16806     fi
16807     { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16808 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16809     { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16810 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16811     as_fn_error $? "Cannot continue" "$LINENO" 5
16812   fi
16813 
16814   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
16815 $as_echo_n "checking for msvcr100.dll... " >&6; }
16816 
16817 # Check whether --with-msvcr-dll was given.
16818 if test "${with_msvcr_dll+set}" = set; then :
16819   withval=$with_msvcr_dll;
16820 fi
16821 
16822   if test "x$with_msvcr_dll" != x; then
16823     MSVCR_DLL="$with_msvcr_dll"
16824   else
16825     if test "x$VCINSTALLDIR" != x; then
16826       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16827         MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x64 | head --lines 1`
16828       else
16829         MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
16830         if test "x$MSVCR_DLL" = x; then
16831           MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | head --lines 1`
16832         fi
16833       fi
16834       if test "x$MSVCR_DLL" != x; then
16835         { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16836 $as_echo "$as_me: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16837       else
16838         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16839 $as_echo "$as_me: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16840       fi
16841     fi
16842     if test "x$MSVCR_DLL" = x; then
16843       if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then
16844         { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $SYSTEMROOT/system32" >&5
16845 $as_echo "$as_me: msvcr100.dll found in $SYSTEMROOT/system32" >&6;}
16846         MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll"
16847       fi
16848     fi
16849   fi
16850   if test "x$MSVCR_DLL" = x; then
16851     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16852 $as_echo "no" >&6; }
16853     as_fn_error $? "Could not find msvcr100.dll !" "$LINENO" 5
16854   fi
16855   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
16856 $as_echo "$MSVCR_DLL" >&6; }
16857 
16858   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16859 
16860   # Input might be given as Windows format, start by converting to
16861   # unix format.
16862   path="$MSVCR_DLL"
16863   new_path=`$CYGPATH -u "$path"`
16864 
16865   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16866   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16867   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16868   # "foo.exe" is OK but "foo" is an error.
16869   #
16870   # This test is therefore slightly more accurate than "test -f" to check for file precense.
16871   # It is also a way to make sure we got the proper file name for the real test later on.
16872   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16873   if test "x$test_shortpath" = x; then
16874     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
16875 $as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
16876     as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
16877   fi
16878 
16879   # Call helper function which possibly converts this using DOS-style short mode.
16880   # If so, the updated path is stored in $new_path.
16881 
16882   input_path="$new_path"
16883   # Check if we need to convert this using DOS-style short mode. If the path
16884   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16885   # take no chances and rewrite it.
16886   # Note: m4 eats our [], so we need to use [ and ] instead.
16887   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16888   if test "x$has_forbidden_chars" != x; then
16889     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16890     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16891     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16892     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16893       # Going to short mode and back again did indeed matter. Since short mode is
16894       # case insensitive, let's make it lowercase to improve readability.
16895       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16896       # Now convert it back to Unix-stile (cygpath)
16897       input_path=`$CYGPATH -u "$shortmode_path"`
16898       new_path="$input_path"
16899     fi
16900   fi
16901 
16902   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16903   if test "x$test_cygdrive_prefix" = x; then
16904     # As a simple fix, exclude /usr/bin since it's not a real path.
16905     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16906       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16907       # a path prefixed by /cygdrive for fixpath to work.
16908       new_path="$CYGWIN_ROOT_PATH$input_path"
16909     fi
16910   fi
16911 
16912 
16913   if test "x$path" != "x$new_path"; then
16914     MSVCR_DLL="$new_path"
16915     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
16916 $as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
16917   fi
16918 
16919   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16920 
16921   path="$MSVCR_DLL"
16922   has_colon=`$ECHO $path | $GREP ^.:`
16923   new_path="$path"
16924   if test "x$has_colon" = x; then
16925     # Not in mixed or Windows style, start by that.
16926     new_path=`cmd //c echo $path`
16927   fi
16928 
16929 
16930   input_path="$new_path"
16931   # Check if we need to convert this using DOS-style short mode. If the path
16932   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16933   # take no chances and rewrite it.
16934   # Note: m4 eats our [], so we need to use [ and ] instead.
16935   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16936   if test "x$has_forbidden_chars" != x; then
16937     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16938     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16939   fi
16940 
16941 
16942   windows_path="$new_path"
16943   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16944     unix_path=`$CYGPATH -u "$windows_path"`
16945     new_path="$unix_path"
16946   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16947     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16948     new_path="$unix_path"
16949   fi
16950 
16951   if test "x$path" != "x$new_path"; then
16952     MSVCR_DLL="$new_path"
16953     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
16954 $as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
16955   fi
16956 
16957   # Save the first 10 bytes of this path to the storage, so fixpath can work.
16958   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16959 
16960   else
16961     # We're on a posix platform. Hooray! :)
16962     path="$MSVCR_DLL"
16963 
16964     if test ! -f "$path" && test ! -d "$path"; then
16965       as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
16966     fi
16967 
16968     has_space=`$ECHO "$path" | $GREP " "`
16969     if test "x$has_space" != x; then
16970       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
16971 $as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
16972       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16973     fi
16974   fi
16975 
16976 
16977 
16978 
16979 # Check whether --with-dxsdk was given.
16980 if test "${with_dxsdk+set}" = set; then :
16981   withval=$with_dxsdk;
16982 fi
16983 
16984 
16985 # Check whether --with-dxsdk-lib was given.
16986 if test "${with_dxsdk_lib+set}" = set; then :
16987   withval=$with_dxsdk_lib;
16988 fi
16989 
16990 
16991 # Check whether --with-dxsdk-include was given.
16992 if test "${with_dxsdk_include+set}" = set; then :
16993   withval=$with_dxsdk_include;
16994 fi
16995 
16996 
16997   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK" >&5
16998 $as_echo_n "checking for DirectX SDK... " >&6; }
16999 
17000   if test "x$with_dxsdk" != x; then
17001     dxsdk_path="$with_dxsdk"
17002   elif test "x$DXSDK_DIR" != x; then
17003     dxsdk_path="$DXSDK_DIR"
17004   elif test -d "C:/DXSDK"; then
17005     dxsdk_path="C:/DXSDK"
17006   else
17007     as_fn_error $? "Could not find the DirectX SDK" "$LINENO" 5
17008   fi
17009   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dxsdk_path" >&5
17010 $as_echo "$dxsdk_path" >&6; }
17011 
17012   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17013 
17014   # Input might be given as Windows format, start by converting to
17015   # unix format.
17016   path="$dxsdk_path"
17017   new_path=`$CYGPATH -u "$path"`
17018 
17019   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17020   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17021   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17022   # "foo.exe" is OK but "foo" is an error.
17023   #
17024   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17025   # It is also a way to make sure we got the proper file name for the real test later on.
17026   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17027   if test "x$test_shortpath" = x; then
17028     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&5
17029 $as_echo "$as_me: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&6;}
17030     as_fn_error $? "Cannot locate the the path of dxsdk_path" "$LINENO" 5
17031   fi
17032 
17033   # Call helper function which possibly converts this using DOS-style short mode.
17034   # If so, the updated path is stored in $new_path.
17035 
17036   input_path="$new_path"
17037   # Check if we need to convert this using DOS-style short mode. If the path
17038   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17039   # take no chances and rewrite it.
17040   # Note: m4 eats our [], so we need to use [ and ] instead.
17041   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17042   if test "x$has_forbidden_chars" != x; then
17043     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17044     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17045     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17046     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17047       # Going to short mode and back again did indeed matter. Since short mode is
17048       # case insensitive, let's make it lowercase to improve readability.
17049       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17050       # Now convert it back to Unix-stile (cygpath)
17051       input_path=`$CYGPATH -u "$shortmode_path"`
17052       new_path="$input_path"
17053     fi
17054   fi
17055 
17056   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17057   if test "x$test_cygdrive_prefix" = x; then
17058     # As a simple fix, exclude /usr/bin since it's not a real path.
17059     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17060       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17061       # a path prefixed by /cygdrive for fixpath to work.
17062       new_path="$CYGWIN_ROOT_PATH$input_path"
17063     fi
17064   fi
17065 
17066 
17067   if test "x$path" != "x$new_path"; then
17068     dxsdk_path="$new_path"
17069     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting dxsdk_path to \"$new_path\"" >&5
17070 $as_echo "$as_me: Rewriting dxsdk_path to \"$new_path\"" >&6;}
17071   fi
17072 
17073   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17074 
17075   path="$dxsdk_path"
17076   has_colon=`$ECHO $path | $GREP ^.:`
17077   new_path="$path"
17078   if test "x$has_colon" = x; then
17079     # Not in mixed or Windows style, start by that.
17080     new_path=`cmd //c echo $path`
17081   fi
17082 
17083 
17084   input_path="$new_path"
17085   # Check if we need to convert this using DOS-style short mode. If the path
17086   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17087   # take no chances and rewrite it.
17088   # Note: m4 eats our [], so we need to use [ and ] instead.
17089   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17090   if test "x$has_forbidden_chars" != x; then
17091     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17092     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17093   fi
17094 
17095 
17096   windows_path="$new_path"
17097   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17098     unix_path=`$CYGPATH -u "$windows_path"`
17099     new_path="$unix_path"
17100   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17101     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17102     new_path="$unix_path"
17103   fi
17104 
17105   if test "x$path" != "x$new_path"; then
17106     dxsdk_path="$new_path"
17107     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting dxsdk_path to \"$new_path\"" >&5
17108 $as_echo "$as_me: Rewriting dxsdk_path to \"$new_path\"" >&6;}
17109   fi
17110 
17111   # Save the first 10 bytes of this path to the storage, so fixpath can work.
17112   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17113 
17114   else
17115     # We're on a posix platform. Hooray! :)
17116     path="$dxsdk_path"
17117 
17118     if test ! -f "$path" && test ! -d "$path"; then
17119       as_fn_error $? "The path of dxsdk_path, which resolves as \"$path\", is not found." "$LINENO" 5
17120     fi
17121 
17122     has_space=`$ECHO "$path" | $GREP " "`
17123     if test "x$has_space" != x; then
17124       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&5
17125 $as_echo "$as_me: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&6;}
17126       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17127     fi
17128   fi
17129 
17130 
17131   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK lib dir" >&5
17132 $as_echo_n "checking for DirectX SDK lib dir... " >&6; }
17133   if test "x$with_dxsdk_lib" != x; then
17134     DXSDK_LIB_PATH="$with_dxsdk_lib"
17135   elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
17136     DXSDK_LIB_PATH="$dxsdk_path/Lib/x64"
17137   else
17138     DXSDK_LIB_PATH="$dxsdk_path/Lib"
17139   fi
17140   # dsound.lib is linked to in jsoundds
17141   if test ! -f "$DXSDK_LIB_PATH/dsound.lib"; then
17142     as_fn_error $? "Invalid DirectX SDK lib dir" "$LINENO" 5
17143   fi
17144   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DXSDK_LIB_PATH" >&5
17145 $as_echo "$DXSDK_LIB_PATH" >&6; }
17146 
17147   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17148 
17149   # Input might be given as Windows format, start by converting to
17150   # unix format.
17151   path="$DXSDK_LIB_PATH"
17152   new_path=`$CYGPATH -u "$path"`
17153 
17154   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17155   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17156   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17157   # "foo.exe" is OK but "foo" is an error.
17158   #
17159   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17160   # It is also a way to make sure we got the proper file name for the real test later on.
17161   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17162   if test "x$test_shortpath" = x; then
17163     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&5
17164 $as_echo "$as_me: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
17165     as_fn_error $? "Cannot locate the the path of DXSDK_LIB_PATH" "$LINENO" 5
17166   fi
17167 
17168   # Call helper function which possibly converts this using DOS-style short mode.
17169   # If so, the updated path is stored in $new_path.
17170 
17171   input_path="$new_path"
17172   # Check if we need to convert this using DOS-style short mode. If the path
17173   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17174   # take no chances and rewrite it.
17175   # Note: m4 eats our [], so we need to use [ and ] instead.
17176   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17177   if test "x$has_forbidden_chars" != x; then
17178     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17179     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17180     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17181     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17182       # Going to short mode and back again did indeed matter. Since short mode is
17183       # case insensitive, let's make it lowercase to improve readability.
17184       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17185       # Now convert it back to Unix-stile (cygpath)
17186       input_path=`$CYGPATH -u "$shortmode_path"`
17187       new_path="$input_path"
17188     fi
17189   fi
17190 
17191   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17192   if test "x$test_cygdrive_prefix" = x; then
17193     # As a simple fix, exclude /usr/bin since it's not a real path.
17194     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17195       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17196       # a path prefixed by /cygdrive for fixpath to work.
17197       new_path="$CYGWIN_ROOT_PATH$input_path"
17198     fi
17199   fi
17200 
17201 
17202   if test "x$path" != "x$new_path"; then
17203     DXSDK_LIB_PATH="$new_path"
17204     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&5
17205 $as_echo "$as_me: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&6;}
17206   fi
17207 
17208   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17209 
17210   path="$DXSDK_LIB_PATH"
17211   has_colon=`$ECHO $path | $GREP ^.:`
17212   new_path="$path"
17213   if test "x$has_colon" = x; then
17214     # Not in mixed or Windows style, start by that.
17215     new_path=`cmd //c echo $path`
17216   fi
17217 
17218 
17219   input_path="$new_path"
17220   # Check if we need to convert this using DOS-style short mode. If the path
17221   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17222   # take no chances and rewrite it.
17223   # Note: m4 eats our [], so we need to use [ and ] instead.
17224   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17225   if test "x$has_forbidden_chars" != x; then
17226     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17227     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17228   fi
17229 
17230 
17231   windows_path="$new_path"
17232   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17233     unix_path=`$CYGPATH -u "$windows_path"`
17234     new_path="$unix_path"
17235   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17236     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17237     new_path="$unix_path"
17238   fi
17239 
17240   if test "x$path" != "x$new_path"; then
17241     DXSDK_LIB_PATH="$new_path"
17242     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&5
17243 $as_echo "$as_me: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&6;}
17244   fi
17245 
17246   # Save the first 10 bytes of this path to the storage, so fixpath can work.
17247   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17248 
17249   else
17250     # We're on a posix platform. Hooray! :)
17251     path="$DXSDK_LIB_PATH"
17252 
17253     if test ! -f "$path" && test ! -d "$path"; then
17254       as_fn_error $? "The path of DXSDK_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
17255     fi
17256 
17257     has_space=`$ECHO "$path" | $GREP " "`
17258     if test "x$has_space" != x; then
17259       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&5
17260 $as_echo "$as_me: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
17261       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17262     fi
17263   fi
17264 
17265 
17266   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK include dir" >&5
17267 $as_echo_n "checking for DirectX SDK include dir... " >&6; }
17268   if test "x$with_dxsdk_include" != x; then
17269     DXSDK_INCLUDE_PATH="$with_dxsdk_include"
17270   else
17271     DXSDK_INCLUDE_PATH="$dxsdk_path/Include"
17272   fi
17273   # dsound.h is included in jsoundds
17274   if test ! -f "$DXSDK_INCLUDE_PATH/dsound.h"; then
17275     as_fn_error $? "Invalid DirectX SDK lib dir" "$LINENO" 5
17276   fi
17277   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DXSDK_INCLUDE_PATH" >&5
17278 $as_echo "$DXSDK_INCLUDE_PATH" >&6; }
17279 
17280   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17281 
17282   # Input might be given as Windows format, start by converting to
17283   # unix format.
17284   path="$DXSDK_INCLUDE_PATH"
17285   new_path=`$CYGPATH -u "$path"`
17286 
17287   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17288   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17289   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17290   # "foo.exe" is OK but "foo" is an error.
17291   #
17292   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17293   # It is also a way to make sure we got the proper file name for the real test later on.
17294   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17295   if test "x$test_shortpath" = x; then
17296     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
17297 $as_echo "$as_me: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
17298     as_fn_error $? "Cannot locate the the path of DXSDK_INCLUDE_PATH" "$LINENO" 5
17299   fi
17300 
17301   # Call helper function which possibly converts this using DOS-style short mode.
17302   # If so, the updated path is stored in $new_path.
17303 
17304   input_path="$new_path"
17305   # Check if we need to convert this using DOS-style short mode. If the path
17306   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17307   # take no chances and rewrite it.
17308   # Note: m4 eats our [], so we need to use [ and ] instead.
17309   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17310   if test "x$has_forbidden_chars" != x; then
17311     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17312     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17313     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17314     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17315       # Going to short mode and back again did indeed matter. Since short mode is
17316       # case insensitive, let's make it lowercase to improve readability.
17317       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17318       # Now convert it back to Unix-stile (cygpath)
17319       input_path=`$CYGPATH -u "$shortmode_path"`
17320       new_path="$input_path"
17321     fi
17322   fi
17323 
17324   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17325   if test "x$test_cygdrive_prefix" = x; then
17326     # As a simple fix, exclude /usr/bin since it's not a real path.
17327     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17328       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17329       # a path prefixed by /cygdrive for fixpath to work.
17330       new_path="$CYGWIN_ROOT_PATH$input_path"
17331     fi
17332   fi
17333 
17334 
17335   if test "x$path" != "x$new_path"; then
17336     DXSDK_INCLUDE_PATH="$new_path"
17337     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&5
17338 $as_echo "$as_me: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&6;}
17339   fi
17340 
17341   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17342 
17343   path="$DXSDK_INCLUDE_PATH"
17344   has_colon=`$ECHO $path | $GREP ^.:`
17345   new_path="$path"
17346   if test "x$has_colon" = x; then
17347     # Not in mixed or Windows style, start by that.
17348     new_path=`cmd //c echo $path`
17349   fi
17350 
17351 
17352   input_path="$new_path"
17353   # Check if we need to convert this using DOS-style short mode. If the path
17354   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17355   # take no chances and rewrite it.
17356   # Note: m4 eats our [], so we need to use [ and ] instead.
17357   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17358   if test "x$has_forbidden_chars" != x; then
17359     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17360     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17361   fi
17362 
17363 
17364   windows_path="$new_path"
17365   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17366     unix_path=`$CYGPATH -u "$windows_path"`
17367     new_path="$unix_path"
17368   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17369     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17370     new_path="$unix_path"
17371   fi
17372 
17373   if test "x$path" != "x$new_path"; then
17374     DXSDK_INCLUDE_PATH="$new_path"
17375     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&5
17376 $as_echo "$as_me: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&6;}
17377   fi
17378 
17379   # Save the first 10 bytes of this path to the storage, so fixpath can work.
17380   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17381 
17382   else
17383     # We're on a posix platform. Hooray! :)
17384     path="$DXSDK_INCLUDE_PATH"
17385 
17386     if test ! -f "$path" && test ! -d "$path"; then
17387       as_fn_error $? "The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
17388     fi
17389 
17390     has_space=`$ECHO "$path" | $GREP " "`
17391     if test "x$has_space" != x; then
17392       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
17393 $as_echo "$as_me: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
17394       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17395     fi
17396   fi
17397 
17398 
17399 
17400 
17401   LDFLAGS_JDK="$LDFLAGS_JDK -libpath:$DXSDK_LIB_PATH"
17402 
17403 fi
17404 
17405 
17406 
17407 # If --build AND --host is set, then the configure script will find any
17408 # cross compilation tools in the PATH. Cross compilation tools
17409 # follows the cross compilation standard where they are prefixed with ${host}.
17410 # For example the binary i686-sun-solaris2.10-gcc
17411 # will cross compile for i686-sun-solaris2.10
17412 # If neither of build and host is not set, then build=host and the
17413 # default compiler found in the path will be used.
17414 # Setting only --host, does not seem to be really supported.
17415 # Please set both --build and --host if you want to cross compile.
17416 
17417 if test "x$COMPILE_TYPE" = "xcross"; then
17418     # Now we to find a C/C++ compiler that can build executables for the build
17419     # platform. We can't use the AC_PROG_CC macro, since it can only be used
17420     # once. Also, we need to do this before adding a tools dir to the path,
17421     # otherwise we might pick up cross-compilers which don't use standard naming.
17422     # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
17423     # to wait until they are properly discovered.
17424     for ac_prog in cl cc gcc
17425 do
17426   # Extract the first word of "$ac_prog", so it can be a program name with args.
17427 set dummy $ac_prog; ac_word=$2
17428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17429 $as_echo_n "checking for $ac_word... " >&6; }
17430 if ${ac_cv_path_BUILD_CC+:} false; then :
17431   $as_echo_n "(cached) " >&6
17432 else
17433   case $BUILD_CC in
17434   [\\/]* | ?:[\\/]*)
17435   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
17436   ;;
17437   *)
17438   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17439 for as_dir in $PATH
17440 do
17441   IFS=$as_save_IFS
17442   test -z "$as_dir" && as_dir=.
17443     for ac_exec_ext in '' $ac_executable_extensions; do
17444   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17445     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
17446     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17447     break 2
17448   fi
17449 done
17450   done
17451 IFS=$as_save_IFS
17452 
17453   ;;
17454 esac
17455 fi
17456 BUILD_CC=$ac_cv_path_BUILD_CC
17457 if test -n "$BUILD_CC"; then
17458   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
17459 $as_echo "$BUILD_CC" >&6; }
17460 else
17461   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17462 $as_echo "no" >&6; }
17463 fi
17464 
17465 
17466   test -n "$BUILD_CC" && break
17467 done
17468 
17469 
17470   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17471 
17472   # First separate the path from the arguments. This will split at the first
17473   # space.
17474   complete="$BUILD_CC"
17475   path="${complete%% *}"
17476   tmp="$complete EOL"
17477   arguments="${tmp#* }"
17478 
17479   # Input might be given as Windows format, start by converting to
17480   # unix format.
17481   new_path=`$CYGPATH -u "$path"`
17482 
17483   # Now try to locate executable using which
17484   new_path=`$WHICH "$new_path" 2> /dev/null`
17485   # bat and cmd files are not always considered executable in cygwin causing which
17486   # to not find them
17487   if test "x$new_path" = x \
17488            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17489            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17490     new_path=`$CYGPATH -u "$path"`
17491   fi
17492   if test "x$new_path" = x; then
17493     # Oops. Which didn't find the executable.
17494     # The splitting of arguments from the executable at a space might have been incorrect,
17495     # since paths with space are more likely in Windows. Give it another try with the whole
17496     # argument.
17497     path="$complete"
17498     arguments="EOL"
17499     new_path=`$CYGPATH -u "$path"`
17500     new_path=`$WHICH "$new_path" 2> /dev/null`
17501     # bat and cmd files are not always considered executable in cygwin causing which
17502     # to not find them
17503     if test "x$new_path" = x \
17504              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17505              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17506       new_path=`$CYGPATH -u "$path"`
17507     fi
17508     if test "x$new_path" = x; then
17509       # It's still not found. Now this is an unrecoverable error.
17510       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17511 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17512       has_space=`$ECHO "$complete" | $GREP " "`
17513       if test "x$has_space" != x; then
17514         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17515 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17516       fi
17517       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17518     fi
17519   fi
17520 
17521   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17522   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17523   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17524   # "foo.exe" is OK but "foo" is an error.
17525   #
17526   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17527   # It is also a way to make sure we got the proper file name for the real test later on.
17528   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17529   if test "x$test_shortpath" = x; then
17530     # Short path failed, file does not exist as specified.
17531     # Try adding .exe or .cmd
17532     if test -f "${new_path}.exe"; then
17533        input_to_shortpath="${new_path}.exe"
17534     elif test -f "${new_path}.cmd"; then
17535        input_to_shortpath="${new_path}.cmd"
17536     else
17537       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
17538 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
17539       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17540 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17541       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17542     fi
17543   else
17544     input_to_shortpath="$new_path"
17545   fi
17546 
17547   # Call helper function which possibly converts this using DOS-style short mode.
17548   # If so, the updated path is stored in $new_path.
17549   new_path="$input_to_shortpath"
17550 
17551   input_path="$input_to_shortpath"
17552   # Check if we need to convert this using DOS-style short mode. If the path
17553   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17554   # take no chances and rewrite it.
17555   # Note: m4 eats our [], so we need to use [ and ] instead.
17556   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17557   if test "x$has_forbidden_chars" != x; then
17558     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17559     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17560     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17561     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17562       # Going to short mode and back again did indeed matter. Since short mode is
17563       # case insensitive, let's make it lowercase to improve readability.
17564       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17565       # Now convert it back to Unix-stile (cygpath)
17566       input_path=`$CYGPATH -u "$shortmode_path"`
17567       new_path="$input_path"
17568     fi
17569   fi
17570 
17571   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17572   if test "x$test_cygdrive_prefix" = x; then
17573     # As a simple fix, exclude /usr/bin since it's not a real path.
17574     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17575       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17576       # a path prefixed by /cygdrive for fixpath to work.
17577       new_path="$CYGWIN_ROOT_PATH$input_path"
17578     fi
17579   fi
17580 
17581   # remove trailing .exe if any
17582   new_path="${new_path/%.exe/}"
17583 
17584   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17585 
17586   # First separate the path from the arguments. This will split at the first
17587   # space.
17588   complete="$BUILD_CC"
17589   path="${complete%% *}"
17590   tmp="$complete EOL"
17591   arguments="${tmp#* }"
17592 
17593   # Input might be given as Windows format, start by converting to
17594   # unix format.
17595   new_path="$path"
17596 
17597   windows_path="$new_path"
17598   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17599     unix_path=`$CYGPATH -u "$windows_path"`
17600     new_path="$unix_path"
17601   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17602     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17603     new_path="$unix_path"
17604   fi
17605 
17606 
17607   # Now try to locate executable using which
17608   new_path=`$WHICH "$new_path" 2> /dev/null`
17609 
17610   if test "x$new_path" = x; then
17611     # Oops. Which didn't find the executable.
17612     # The splitting of arguments from the executable at a space might have been incorrect,
17613     # since paths with space are more likely in Windows. Give it another try with the whole
17614     # argument.
17615     path="$complete"
17616     arguments="EOL"
17617     new_path="$path"
17618 
17619   windows_path="$new_path"
17620   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17621     unix_path=`$CYGPATH -u "$windows_path"`
17622     new_path="$unix_path"
17623   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17624     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17625     new_path="$unix_path"
17626   fi
17627 
17628 
17629     new_path=`$WHICH "$new_path" 2> /dev/null`
17630 
17631     if test "x$new_path" = x; then
17632       # It's still not found. Now this is an unrecoverable error.
17633       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17634 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17635       has_space=`$ECHO "$complete" | $GREP " "`
17636       if test "x$has_space" != x; then
17637         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17638 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17639       fi
17640       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17641     fi
17642   fi
17643 
17644   # Now new_path has a complete unix path to the binary
17645   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17646     # Keep paths in /bin as-is, but remove trailing .exe if any
17647     new_path="${new_path/%.exe/}"
17648     # Do not save /bin paths to all_fixpath_prefixes!
17649   else
17650     # Not in mixed or Windows style, start by that.
17651     new_path=`cmd //c echo $new_path`
17652 
17653   input_path="$new_path"
17654   # Check if we need to convert this using DOS-style short mode. If the path
17655   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17656   # take no chances and rewrite it.
17657   # Note: m4 eats our [], so we need to use [ and ] instead.
17658   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17659   if test "x$has_forbidden_chars" != x; then
17660     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17661     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17662   fi
17663 
17664     # Output is in $new_path
17665 
17666   windows_path="$new_path"
17667   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17668     unix_path=`$CYGPATH -u "$windows_path"`
17669     new_path="$unix_path"
17670   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17671     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17672     new_path="$unix_path"
17673   fi
17674 
17675     # remove trailing .exe if any
17676     new_path="${new_path/%.exe/}"
17677 
17678     # Save the first 10 bytes of this path to the storage, so fixpath can work.
17679     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17680   fi
17681 
17682   else
17683     # We're on a posix platform. Hooray! :)
17684     # First separate the path from the arguments. This will split at the first
17685     # space.
17686     complete="$BUILD_CC"
17687     path="${complete%% *}"
17688     tmp="$complete EOL"
17689     arguments="${tmp#* }"
17690 
17691     # Cannot rely on the command "which" here since it doesn't always work.
17692     is_absolute_path=`$ECHO "$path" | $GREP ^/`
17693     if test -z "$is_absolute_path"; then
17694       # Path to executable is not absolute. Find it.
17695       IFS_save="$IFS"
17696       IFS=:
17697       for p in $PATH; do
17698         if test -f "$p/$path" && test -x "$p/$path"; then
17699           new_path="$p/$path"
17700           break
17701         fi
17702       done
17703       IFS="$IFS_save"
17704     else
17705       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
17706 $as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
17707       new_path="$path"
17708     fi
17709 
17710     if test "x$new_path" = x; then
17711         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17712 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17713         has_space=`$ECHO "$complete" | $GREP " "`
17714         if test "x$has_space" != x; then
17715           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17716 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17717         fi
17718         as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17719       fi
17720   fi
17721 
17722       # Now join together the path and the arguments once again
17723       if test "x$arguments" != xEOL; then
17724         new_complete="$new_path ${arguments% *}"
17725       else
17726         new_complete="$new_path"
17727       fi
17728 
17729   if test "x$complete" != "x$new_complete"; then
17730       BUILD_CC="$new_complete"
17731       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
17732 $as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
17733     fi
17734 
17735     for ac_prog in cl CC g++
17736 do
17737   # Extract the first word of "$ac_prog", so it can be a program name with args.
17738 set dummy $ac_prog; ac_word=$2
17739 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17740 $as_echo_n "checking for $ac_word... " >&6; }
17741 if ${ac_cv_path_BUILD_CXX+:} false; then :
17742   $as_echo_n "(cached) " >&6
17743 else
17744   case $BUILD_CXX in
17745   [\\/]* | ?:[\\/]*)
17746   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
17747   ;;
17748   *)
17749   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17750 for as_dir in $PATH
17751 do
17752   IFS=$as_save_IFS
17753   test -z "$as_dir" && as_dir=.
17754     for ac_exec_ext in '' $ac_executable_extensions; do
17755   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17756     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
17757     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17758     break 2
17759   fi
17760 done
17761   done
17762 IFS=$as_save_IFS
17763 
17764   ;;
17765 esac
17766 fi
17767 BUILD_CXX=$ac_cv_path_BUILD_CXX
17768 if test -n "$BUILD_CXX"; then
17769   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
17770 $as_echo "$BUILD_CXX" >&6; }
17771 else
17772   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17773 $as_echo "no" >&6; }
17774 fi
17775 
17776 
17777   test -n "$BUILD_CXX" && break
17778 done
17779 
17780 
17781   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17782 
17783   # First separate the path from the arguments. This will split at the first
17784   # space.
17785   complete="$BUILD_CXX"
17786   path="${complete%% *}"
17787   tmp="$complete EOL"
17788   arguments="${tmp#* }"
17789 
17790   # Input might be given as Windows format, start by converting to
17791   # unix format.
17792   new_path=`$CYGPATH -u "$path"`
17793 
17794   # Now try to locate executable using which
17795   new_path=`$WHICH "$new_path" 2> /dev/null`
17796   # bat and cmd files are not always considered executable in cygwin causing which
17797   # to not find them
17798   if test "x$new_path" = x \
17799            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17800            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17801     new_path=`$CYGPATH -u "$path"`
17802   fi
17803   if test "x$new_path" = x; then
17804     # Oops. Which didn't find the executable.
17805     # The splitting of arguments from the executable at a space might have been incorrect,
17806     # since paths with space are more likely in Windows. Give it another try with the whole
17807     # argument.
17808     path="$complete"
17809     arguments="EOL"
17810     new_path=`$CYGPATH -u "$path"`
17811     new_path=`$WHICH "$new_path" 2> /dev/null`
17812     # bat and cmd files are not always considered executable in cygwin causing which
17813     # to not find them
17814     if test "x$new_path" = x \
17815              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17816              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17817       new_path=`$CYGPATH -u "$path"`
17818     fi
17819     if test "x$new_path" = x; then
17820       # It's still not found. Now this is an unrecoverable error.
17821       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17822 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17823       has_space=`$ECHO "$complete" | $GREP " "`
17824       if test "x$has_space" != x; then
17825         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17826 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17827       fi
17828       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17829     fi
17830   fi
17831 
17832   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17833   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17834   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17835   # "foo.exe" is OK but "foo" is an error.
17836   #
17837   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17838   # It is also a way to make sure we got the proper file name for the real test later on.
17839   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17840   if test "x$test_shortpath" = x; then
17841     # Short path failed, file does not exist as specified.
17842     # Try adding .exe or .cmd
17843     if test -f "${new_path}.exe"; then
17844        input_to_shortpath="${new_path}.exe"
17845     elif test -f "${new_path}.cmd"; then
17846        input_to_shortpath="${new_path}.cmd"
17847     else
17848       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
17849 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
17850       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17851 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17852       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17853     fi
17854   else
17855     input_to_shortpath="$new_path"
17856   fi
17857 
17858   # Call helper function which possibly converts this using DOS-style short mode.
17859   # If so, the updated path is stored in $new_path.
17860   new_path="$input_to_shortpath"
17861 
17862   input_path="$input_to_shortpath"
17863   # Check if we need to convert this using DOS-style short mode. If the path
17864   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17865   # take no chances and rewrite it.
17866   # Note: m4 eats our [], so we need to use [ and ] instead.
17867   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17868   if test "x$has_forbidden_chars" != x; then
17869     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17870     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17871     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17872     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17873       # Going to short mode and back again did indeed matter. Since short mode is
17874       # case insensitive, let's make it lowercase to improve readability.
17875       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17876       # Now convert it back to Unix-stile (cygpath)
17877       input_path=`$CYGPATH -u "$shortmode_path"`
17878       new_path="$input_path"
17879     fi
17880   fi
17881 
17882   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17883   if test "x$test_cygdrive_prefix" = x; then
17884     # As a simple fix, exclude /usr/bin since it's not a real path.
17885     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17886       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17887       # a path prefixed by /cygdrive for fixpath to work.
17888       new_path="$CYGWIN_ROOT_PATH$input_path"
17889     fi
17890   fi
17891 
17892   # remove trailing .exe if any
17893   new_path="${new_path/%.exe/}"
17894 
17895   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17896 
17897   # First separate the path from the arguments. This will split at the first
17898   # space.
17899   complete="$BUILD_CXX"
17900   path="${complete%% *}"
17901   tmp="$complete EOL"
17902   arguments="${tmp#* }"
17903 
17904   # Input might be given as Windows format, start by converting to
17905   # unix format.
17906   new_path="$path"
17907 
17908   windows_path="$new_path"
17909   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17910     unix_path=`$CYGPATH -u "$windows_path"`
17911     new_path="$unix_path"
17912   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17913     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17914     new_path="$unix_path"
17915   fi
17916 
17917 
17918   # Now try to locate executable using which
17919   new_path=`$WHICH "$new_path" 2> /dev/null`
17920 
17921   if test "x$new_path" = x; then
17922     # Oops. Which didn't find the executable.
17923     # The splitting of arguments from the executable at a space might have been incorrect,
17924     # since paths with space are more likely in Windows. Give it another try with the whole
17925     # argument.
17926     path="$complete"
17927     arguments="EOL"
17928     new_path="$path"
17929 
17930   windows_path="$new_path"
17931   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17932     unix_path=`$CYGPATH -u "$windows_path"`
17933     new_path="$unix_path"
17934   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17935     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17936     new_path="$unix_path"
17937   fi
17938 
17939 
17940     new_path=`$WHICH "$new_path" 2> /dev/null`
17941 
17942     if test "x$new_path" = x; then
17943       # It's still not found. Now this is an unrecoverable error.
17944       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17945 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17946       has_space=`$ECHO "$complete" | $GREP " "`
17947       if test "x$has_space" != x; then
17948         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17949 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17950       fi
17951       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17952     fi
17953   fi
17954 
17955   # Now new_path has a complete unix path to the binary
17956   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17957     # Keep paths in /bin as-is, but remove trailing .exe if any
17958     new_path="${new_path/%.exe/}"
17959     # Do not save /bin paths to all_fixpath_prefixes!
17960   else
17961     # Not in mixed or Windows style, start by that.
17962     new_path=`cmd //c echo $new_path`
17963 
17964   input_path="$new_path"
17965   # Check if we need to convert this using DOS-style short mode. If the path
17966   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17967   # take no chances and rewrite it.
17968   # Note: m4 eats our [], so we need to use [ and ] instead.
17969   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17970   if test "x$has_forbidden_chars" != x; then
17971     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17972     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17973   fi
17974 
17975     # Output is in $new_path
17976 
17977   windows_path="$new_path"
17978   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17979     unix_path=`$CYGPATH -u "$windows_path"`
17980     new_path="$unix_path"
17981   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17982     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17983     new_path="$unix_path"
17984   fi
17985 
17986     # remove trailing .exe if any
17987     new_path="${new_path/%.exe/}"
17988 
17989     # Save the first 10 bytes of this path to the storage, so fixpath can work.
17990     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17991   fi
17992 
17993   else
17994     # We're on a posix platform. Hooray! :)
17995     # First separate the path from the arguments. This will split at the first
17996     # space.
17997     complete="$BUILD_CXX"
17998     path="${complete%% *}"
17999     tmp="$complete EOL"
18000     arguments="${tmp#* }"
18001 
18002     # Cannot rely on the command "which" here since it doesn't always work.
18003     is_absolute_path=`$ECHO "$path" | $GREP ^/`
18004     if test -z "$is_absolute_path"; then
18005       # Path to executable is not absolute. Find it.
18006       IFS_save="$IFS"
18007       IFS=:
18008       for p in $PATH; do
18009         if test -f "$p/$path" && test -x "$p/$path"; then
18010           new_path="$p/$path"
18011           break
18012         fi
18013       done
18014       IFS="$IFS_save"
18015     else
18016       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
18017 $as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
18018       new_path="$path"
18019     fi
18020 
18021     if test "x$new_path" = x; then
18022         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18023 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18024         has_space=`$ECHO "$complete" | $GREP " "`
18025         if test "x$has_space" != x; then
18026           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18027 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18028         fi
18029         as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18030       fi
18031   fi
18032 
18033       # Now join together the path and the arguments once again
18034       if test "x$arguments" != xEOL; then
18035         new_complete="$new_path ${arguments% *}"
18036       else
18037         new_complete="$new_path"
18038       fi
18039 
18040   if test "x$complete" != "x$new_complete"; then
18041       BUILD_CXX="$new_complete"
18042       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
18043 $as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
18044     fi
18045 
18046     # Extract the first word of "ld", so it can be a program name with args.
18047 set dummy ld; ac_word=$2
18048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18049 $as_echo_n "checking for $ac_word... " >&6; }
18050 if ${ac_cv_path_BUILD_LD+:} false; then :
18051   $as_echo_n "(cached) " >&6
18052 else
18053   case $BUILD_LD in
18054   [\\/]* | ?:[\\/]*)
18055   ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
18056   ;;
18057   *)
18058   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18059 for as_dir in $PATH
18060 do
18061   IFS=$as_save_IFS
18062   test -z "$as_dir" && as_dir=.
18063     for ac_exec_ext in '' $ac_executable_extensions; do
18064   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18065     ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
18066     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18067     break 2
18068   fi
18069 done
18070   done
18071 IFS=$as_save_IFS
18072 
18073   ;;
18074 esac
18075 fi
18076 BUILD_LD=$ac_cv_path_BUILD_LD
18077 if test -n "$BUILD_LD"; then
18078   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
18079 $as_echo "$BUILD_LD" >&6; }
18080 else
18081   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18082 $as_echo "no" >&6; }
18083 fi
18084 
18085 
18086 
18087   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18088 
18089   # First separate the path from the arguments. This will split at the first
18090   # space.
18091   complete="$BUILD_LD"
18092   path="${complete%% *}"
18093   tmp="$complete EOL"
18094   arguments="${tmp#* }"
18095 
18096   # Input might be given as Windows format, start by converting to
18097   # unix format.
18098   new_path=`$CYGPATH -u "$path"`
18099 
18100   # Now try to locate executable using which
18101   new_path=`$WHICH "$new_path" 2> /dev/null`
18102   # bat and cmd files are not always considered executable in cygwin causing which
18103   # to not find them
18104   if test "x$new_path" = x \
18105            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18106            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18107     new_path=`$CYGPATH -u "$path"`
18108   fi
18109   if test "x$new_path" = x; then
18110     # Oops. Which didn't find the executable.
18111     # The splitting of arguments from the executable at a space might have been incorrect,
18112     # since paths with space are more likely in Windows. Give it another try with the whole
18113     # argument.
18114     path="$complete"
18115     arguments="EOL"
18116     new_path=`$CYGPATH -u "$path"`
18117     new_path=`$WHICH "$new_path" 2> /dev/null`
18118     # bat and cmd files are not always considered executable in cygwin causing which
18119     # to not find them
18120     if test "x$new_path" = x \
18121              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18122              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18123       new_path=`$CYGPATH -u "$path"`
18124     fi
18125     if test "x$new_path" = x; then
18126       # It's still not found. Now this is an unrecoverable error.
18127       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18128 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18129       has_space=`$ECHO "$complete" | $GREP " "`
18130       if test "x$has_space" != x; then
18131         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18132 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18133       fi
18134       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18135     fi
18136   fi
18137 
18138   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18139   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18140   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18141   # "foo.exe" is OK but "foo" is an error.
18142   #
18143   # This test is therefore slightly more accurate than "test -f" to check for file precense.
18144   # It is also a way to make sure we got the proper file name for the real test later on.
18145   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18146   if test "x$test_shortpath" = x; then
18147     # Short path failed, file does not exist as specified.
18148     # Try adding .exe or .cmd
18149     if test -f "${new_path}.exe"; then
18150        input_to_shortpath="${new_path}.exe"
18151     elif test -f "${new_path}.cmd"; then
18152        input_to_shortpath="${new_path}.cmd"
18153     else
18154       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
18155 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
18156       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18157 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18158       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18159     fi
18160   else
18161     input_to_shortpath="$new_path"
18162   fi
18163 
18164   # Call helper function which possibly converts this using DOS-style short mode.
18165   # If so, the updated path is stored in $new_path.
18166   new_path="$input_to_shortpath"
18167 
18168   input_path="$input_to_shortpath"
18169   # Check if we need to convert this using DOS-style short mode. If the path
18170   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18171   # take no chances and rewrite it.
18172   # Note: m4 eats our [], so we need to use [ and ] instead.
18173   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18174   if test "x$has_forbidden_chars" != x; then
18175     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18176     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18177     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18178     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18179       # Going to short mode and back again did indeed matter. Since short mode is
18180       # case insensitive, let's make it lowercase to improve readability.
18181       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18182       # Now convert it back to Unix-stile (cygpath)
18183       input_path=`$CYGPATH -u "$shortmode_path"`
18184       new_path="$input_path"
18185     fi
18186   fi
18187 
18188   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18189   if test "x$test_cygdrive_prefix" = x; then
18190     # As a simple fix, exclude /usr/bin since it's not a real path.
18191     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18192       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18193       # a path prefixed by /cygdrive for fixpath to work.
18194       new_path="$CYGWIN_ROOT_PATH$input_path"
18195     fi
18196   fi
18197 
18198   # remove trailing .exe if any
18199   new_path="${new_path/%.exe/}"
18200 
18201   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18202 
18203   # First separate the path from the arguments. This will split at the first
18204   # space.
18205   complete="$BUILD_LD"
18206   path="${complete%% *}"
18207   tmp="$complete EOL"
18208   arguments="${tmp#* }"
18209 
18210   # Input might be given as Windows format, start by converting to
18211   # unix format.
18212   new_path="$path"
18213 
18214   windows_path="$new_path"
18215   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18216     unix_path=`$CYGPATH -u "$windows_path"`
18217     new_path="$unix_path"
18218   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18219     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18220     new_path="$unix_path"
18221   fi
18222 
18223 
18224   # Now try to locate executable using which
18225   new_path=`$WHICH "$new_path" 2> /dev/null`
18226 
18227   if test "x$new_path" = x; then
18228     # Oops. Which didn't find the executable.
18229     # The splitting of arguments from the executable at a space might have been incorrect,
18230     # since paths with space are more likely in Windows. Give it another try with the whole
18231     # argument.
18232     path="$complete"
18233     arguments="EOL"
18234     new_path="$path"
18235 
18236   windows_path="$new_path"
18237   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18238     unix_path=`$CYGPATH -u "$windows_path"`
18239     new_path="$unix_path"
18240   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18241     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18242     new_path="$unix_path"
18243   fi
18244 
18245 
18246     new_path=`$WHICH "$new_path" 2> /dev/null`
18247 
18248     if test "x$new_path" = x; then
18249       # It's still not found. Now this is an unrecoverable error.
18250       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18251 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18252       has_space=`$ECHO "$complete" | $GREP " "`
18253       if test "x$has_space" != x; then
18254         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18255 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18256       fi
18257       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18258     fi
18259   fi
18260 
18261   # Now new_path has a complete unix path to the binary
18262   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18263     # Keep paths in /bin as-is, but remove trailing .exe if any
18264     new_path="${new_path/%.exe/}"
18265     # Do not save /bin paths to all_fixpath_prefixes!
18266   else
18267     # Not in mixed or Windows style, start by that.
18268     new_path=`cmd //c echo $new_path`
18269 
18270   input_path="$new_path"
18271   # Check if we need to convert this using DOS-style short mode. If the path
18272   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18273   # take no chances and rewrite it.
18274   # Note: m4 eats our [], so we need to use [ and ] instead.
18275   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18276   if test "x$has_forbidden_chars" != x; then
18277     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18278     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18279   fi
18280 
18281     # Output is in $new_path
18282 
18283   windows_path="$new_path"
18284   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18285     unix_path=`$CYGPATH -u "$windows_path"`
18286     new_path="$unix_path"
18287   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18288     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18289     new_path="$unix_path"
18290   fi
18291 
18292     # remove trailing .exe if any
18293     new_path="${new_path/%.exe/}"
18294 
18295     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18296     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18297   fi
18298 
18299   else
18300     # We're on a posix platform. Hooray! :)
18301     # First separate the path from the arguments. This will split at the first
18302     # space.
18303     complete="$BUILD_LD"
18304     path="${complete%% *}"
18305     tmp="$complete EOL"
18306     arguments="${tmp#* }"
18307 
18308     # Cannot rely on the command "which" here since it doesn't always work.
18309     is_absolute_path=`$ECHO "$path" | $GREP ^/`
18310     if test -z "$is_absolute_path"; then
18311       # Path to executable is not absolute. Find it.
18312       IFS_save="$IFS"
18313       IFS=:
18314       for p in $PATH; do
18315         if test -f "$p/$path" && test -x "$p/$path"; then
18316           new_path="$p/$path"
18317           break
18318         fi
18319       done
18320       IFS="$IFS_save"
18321     else
18322       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
18323 $as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
18324       new_path="$path"
18325     fi
18326 
18327     if test "x$new_path" = x; then
18328         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18329 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18330         has_space=`$ECHO "$complete" | $GREP " "`
18331         if test "x$has_space" != x; then
18332           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18333 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18334         fi
18335         as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18336       fi
18337   fi
18338 
18339       # Now join together the path and the arguments once again
18340       if test "x$arguments" != xEOL; then
18341         new_complete="$new_path ${arguments% *}"
18342       else
18343         new_complete="$new_path"
18344       fi
18345 
18346   if test "x$complete" != "x$new_complete"; then
18347       BUILD_LD="$new_complete"
18348       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
18349 $as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
18350     fi
18351 
18352 fi
18353 
18354 
18355 
18356 
18357 # If a devkit is found on the builddeps server, then prepend its path to the
18358 # PATH variable. If there are cross compilers available in the devkit, these
18359 # will be found by AC_PROG_CC et al.
18360 DEVKIT=
18361 
18362 
18363     if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
18364         # Source the builddeps file again, to make sure it uses the latest variables!
18365         . $builddepsfile
18366         # Look for a target and build machine specific resource!
18367         eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
18368         if test "x$resource" = x; then
18369             # Ok, lets instead look for a target specific resource
18370             eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
18371         fi
18372         if test "x$resource" = x; then
18373             # Ok, lets instead look for a build specific resource
18374             eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
18375         fi
18376         if test "x$resource" = x; then
18377             # Ok, lets instead look for a generic resource
18378             # (The devkit comes from M4 and not the shell, thus no need for eval here.)
18379             resource=${builddep_devkit}
18380         fi
18381         if test "x$resource" != x; then
18382             { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
18383 $as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
18384             # If the resource in the builddeps.conf file is an existing directory,
18385             # for example /java/linux/cups
18386             if test -d ${resource}; then
18387                depdir=${resource}
18388             else
18389 
18390 # devkit is for example mymodule
18391 # $resource is for example libs/general/libmymod_1_2_3.zip
18392 # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
18393 # $with_builddeps_dir is for example /localhome/builddeps
18394 # depdir is the name of the variable into which we store the depdir, eg MYMOD
18395 # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
18396 # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
18397     filename=`basename $resource`
18398     filebase=`echo $filename | sed 's/\.[^\.]*$//'`
18399     filebase=${filename%%.*}
18400     extension=${filename#*.}
18401     installdir=$with_builddeps_dir/$filebase
18402     if test ! -f $installdir/$filename.unpacked; then
18403         { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
18404 $as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
18405         if test ! -d $installdir; then
18406             mkdir -p $installdir
18407         fi
18408         if test ! -d $installdir; then
18409             as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
18410         fi
18411         tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
18412         touch $tmpfile
18413         if test ! -f $tmpfile; then
18414             as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
18415         fi
18416 
18417     # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
18418     # $tmpfile is the local file name for the downloaded file.
18419     VALID_TOOL=no
18420     if test "x$BDEPS_FTP" = xwget; then
18421        VALID_TOOL=yes
18422        wget -O $tmpfile $with_builddeps_server/$resource
18423     fi
18424     if test "x$BDEPS_FTP" = xlftp; then
18425        VALID_TOOL=yes
18426        lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
18427     fi
18428     if test "x$BDEPS_FTP" = xftp; then
18429         VALID_TOOL=yes
18430         FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
18431         FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
18432         FTPUSERPWD=${FTPSERVER%%@*}
18433         if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
18434             FTPUSER=${userpwd%%:*}
18435             FTPPWD=${userpwd#*@}
18436             FTPSERVER=${FTPSERVER#*@}
18437         else
18438             FTPUSER=ftp
18439             FTPPWD=ftp
18440         fi
18441         # the "pass" command does not work on some
18442         # ftp clients (read ftp.exe) but if it works,
18443         # passive mode is better!
18444         (\
18445             echo "user $FTPUSER $FTPPWD"        ;\
18446             echo "pass"                         ;\
18447             echo "bin"                          ;\
18448             echo "get $FTPPATH $tmpfile"              ;\
18449         ) | ftp -in $FTPSERVER
18450     fi
18451     if test "x$VALID_TOOL" != xyes; then
18452        as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
18453     fi
18454 
18455         mv $tmpfile $installdir/$filename
18456         if test ! -s $installdir/$filename; then
18457             as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
18458         fi
18459         case "$extension" in
18460             zip)  echo "Unzipping $installdir/$filename..."
18461                (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
18462             ;;
18463             tar.gz) echo "Untaring $installdir/$filename..."
18464                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18465             ;;
18466             tgz) echo "Untaring $installdir/$filename..."
18467                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18468             ;;
18469             *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
18470             ;;
18471         esac
18472     fi
18473     if test -f $installdir/$filename.unpacked; then
18474         depdir=$installdir
18475     fi
18476 
18477             fi
18478             # Source the builddeps file again, because in the previous command, the depdir
18479             # was updated to point at the current build dependency install directory.
18480             . $builddepsfile
18481             # Now extract variables from the builddeps.conf files.
18482             theroot=${builddep_devkit_ROOT}
18483             thecflags=${builddep_devkit_CFLAGS}
18484             thelibs=${builddep_devkit_LIBS}
18485             if test "x$depdir" = x; then
18486                 as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
18487             fi
18488             DEVKIT=$depdir
18489             if test "x$theroot" != x; then
18490                DEVKIT="$theroot"
18491             fi
18492             if test "x$thecflags" != x; then
18493                DEVKIT_CFLAGS="$thecflags"
18494             fi
18495             if test "x$thelibs" != x; then
18496                DEVKIT_LIBS="$thelibs"
18497             fi
18498             # Found devkit
18499                      PATH="$DEVKIT/bin:$PATH"
18500                      SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
18501                      if test "x$x_includes" = "xNONE"; then
18502                          x_includes="$SYS_ROOT/usr/include/X11"
18503                      fi
18504                      if test "x$x_libraries" = "xNONE"; then
18505                          x_libraries="$SYS_ROOT/usr/lib"
18506                      fi
18507 
18508 
18509         fi
18510 
18511     fi
18512 
18513 
18514 if test "x$SYS_ROOT" != "x/" ; then
18515     CFLAGS="--sysroot=$SYS_ROOT $CFLAGS"
18516     CXXFLAGS="--sysroot=$SYS_ROOT $CXXFLAGS"
18517     OBJCFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
18518     OBJCXXFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
18519     CPPFLAGS="--sysroot=$SYS_ROOT $CPPFLAGS"
18520     LDFLAGS="--sysroot=$SYS_ROOT $LDFLAGS"
18521 fi
18522 
18523 # Store the CFLAGS etal passed to the configure script.
18524 ORG_CFLAGS="$CFLAGS"
18525 ORG_CXXFLAGS="$CXXFLAGS"
18526 ORG_OBJCFLAGS="$OBJCFLAGS"
18527 
18528 # autoconf magic only relies on PATH, so update it if tools dir is specified
18529 OLD_PATH="$PATH"
18530 if test "x$TOOLS_DIR" != x; then
18531   PATH=$TOOLS_DIR:$PATH
18532 fi
18533 
18534 
18535 ### Locate C compiler (CC)
18536 
18537 # gcc is almost always present, but on Windows we
18538 # prefer cl.exe and on Solaris we prefer CC.
18539 # Thus test for them in this order.
18540 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
18541   # Do not probe for cc on MacOSX.
18542   COMPILER_CHECK_LIST="cl gcc"
18543 else
18544   COMPILER_CHECK_LIST="cl cc gcc"
18545 fi
18546 
18547 
18548   COMPILER_NAME=C
18549 
18550   CC=
18551   # If TOOLS_DIR is set, check for all compiler names in there first
18552   # before checking the rest of the PATH.
18553   if test -n "$TOOLS_DIR"; then
18554     PATH_save="$PATH"
18555     PATH="$TOOLS_DIR"
18556     for ac_prog in $COMPILER_CHECK_LIST
18557 do
18558   # Extract the first word of "$ac_prog", so it can be a program name with args.
18559 set dummy $ac_prog; ac_word=$2
18560 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18561 $as_echo_n "checking for $ac_word... " >&6; }
18562 if ${ac_cv_path_TOOLS_DIR_CC+:} false; then :
18563   $as_echo_n "(cached) " >&6
18564 else
18565   case $TOOLS_DIR_CC in
18566   [\\/]* | ?:[\\/]*)
18567   ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
18568   ;;
18569   *)
18570   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18571 for as_dir in $PATH
18572 do
18573   IFS=$as_save_IFS
18574   test -z "$as_dir" && as_dir=.
18575     for ac_exec_ext in '' $ac_executable_extensions; do
18576   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18577     ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
18578     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18579     break 2
18580   fi
18581 done
18582   done
18583 IFS=$as_save_IFS
18584 
18585   ;;
18586 esac
18587 fi
18588 TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
18589 if test -n "$TOOLS_DIR_CC"; then
18590   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
18591 $as_echo "$TOOLS_DIR_CC" >&6; }
18592 else
18593   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18594 $as_echo "no" >&6; }
18595 fi
18596 
18597 
18598   test -n "$TOOLS_DIR_CC" && break
18599 done
18600 
18601     CC=$TOOLS_DIR_CC
18602     PATH="$PATH_save"
18603   fi
18604 
18605   # AC_PATH_PROGS can't be run multiple times with the same variable,
18606   # so create a new name for this run.
18607   if test "x$CC" = x; then
18608     for ac_prog in $COMPILER_CHECK_LIST
18609 do
18610   # Extract the first word of "$ac_prog", so it can be a program name with args.
18611 set dummy $ac_prog; ac_word=$2
18612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18613 $as_echo_n "checking for $ac_word... " >&6; }
18614 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
18615   $as_echo_n "(cached) " >&6
18616 else
18617   case $POTENTIAL_CC in
18618   [\\/]* | ?:[\\/]*)
18619   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
18620   ;;
18621   *)
18622   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18623 for as_dir in $PATH
18624 do
18625   IFS=$as_save_IFS
18626   test -z "$as_dir" && as_dir=.
18627     for ac_exec_ext in '' $ac_executable_extensions; do
18628   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18629     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
18630     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18631     break 2
18632   fi
18633 done
18634   done
18635 IFS=$as_save_IFS
18636 
18637   ;;
18638 esac
18639 fi
18640 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
18641 if test -n "$POTENTIAL_CC"; then
18642   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
18643 $as_echo "$POTENTIAL_CC" >&6; }
18644 else
18645   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18646 $as_echo "no" >&6; }
18647 fi
18648 
18649 
18650   test -n "$POTENTIAL_CC" && break
18651 done
18652 
18653     CC=$POTENTIAL_CC
18654   fi
18655 
18656   if test "x$CC" = x; then
18657 
18658     # Print a helpful message on how to acquire the necessary build dependency.
18659     # devkit is the help tag: freetyp2, cups, pulse, alsa etc
18660     MISSING_DEPENDENCY=devkit
18661     PKGHANDLER_COMMAND=
18662 
18663     case $PKGHANDLER in
18664         apt-get)
18665                 apt_help     $MISSING_DEPENDENCY ;;
18666     yum)
18667                 yum_help     $MISSING_DEPENDENCY ;;
18668         port)
18669                 port_help    $MISSING_DEPENDENCY ;;
18670         pkgutil)
18671                 pkgutil_help $MISSING_DEPENDENCY ;;
18672         pkgadd)
18673                 pkgadd_help  $MISSING_DEPENDENCY ;;
18674     * )
18675       break ;;
18676     esac
18677 
18678     if test "x$PKGHANDLER_COMMAND" != x; then
18679         HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
18680     fi
18681 
18682       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
18683   fi
18684 
18685   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18686 
18687   # First separate the path from the arguments. This will split at the first
18688   # space.
18689   complete="$CC"
18690   path="${complete%% *}"
18691   tmp="$complete EOL"
18692   arguments="${tmp#* }"
18693 
18694   # Input might be given as Windows format, start by converting to
18695   # unix format.
18696   new_path=`$CYGPATH -u "$path"`
18697 
18698   # Now try to locate executable using which
18699   new_path=`$WHICH "$new_path" 2> /dev/null`
18700   # bat and cmd files are not always considered executable in cygwin causing which
18701   # to not find them
18702   if test "x$new_path" = x \
18703            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18704            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18705     new_path=`$CYGPATH -u "$path"`
18706   fi
18707   if test "x$new_path" = x; then
18708     # Oops. Which didn't find the executable.
18709     # The splitting of arguments from the executable at a space might have been incorrect,
18710     # since paths with space are more likely in Windows. Give it another try with the whole
18711     # argument.
18712     path="$complete"
18713     arguments="EOL"
18714     new_path=`$CYGPATH -u "$path"`
18715     new_path=`$WHICH "$new_path" 2> /dev/null`
18716     # bat and cmd files are not always considered executable in cygwin causing which
18717     # to not find them
18718     if test "x$new_path" = x \
18719              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18720              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18721       new_path=`$CYGPATH -u "$path"`
18722     fi
18723     if test "x$new_path" = x; then
18724       # It's still not found. Now this is an unrecoverable error.
18725       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18726 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18727       has_space=`$ECHO "$complete" | $GREP " "`
18728       if test "x$has_space" != x; then
18729         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18730 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18731       fi
18732       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18733     fi
18734   fi
18735 
18736   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18737   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18738   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18739   # "foo.exe" is OK but "foo" is an error.
18740   #
18741   # This test is therefore slightly more accurate than "test -f" to check for file precense.
18742   # It is also a way to make sure we got the proper file name for the real test later on.
18743   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18744   if test "x$test_shortpath" = x; then
18745     # Short path failed, file does not exist as specified.
18746     # Try adding .exe or .cmd
18747     if test -f "${new_path}.exe"; then
18748        input_to_shortpath="${new_path}.exe"
18749     elif test -f "${new_path}.cmd"; then
18750        input_to_shortpath="${new_path}.cmd"
18751     else
18752       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
18753 $as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
18754       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18755 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18756       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18757     fi
18758   else
18759     input_to_shortpath="$new_path"
18760   fi
18761 
18762   # Call helper function which possibly converts this using DOS-style short mode.
18763   # If so, the updated path is stored in $new_path.
18764   new_path="$input_to_shortpath"
18765 
18766   input_path="$input_to_shortpath"
18767   # Check if we need to convert this using DOS-style short mode. If the path
18768   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18769   # take no chances and rewrite it.
18770   # Note: m4 eats our [], so we need to use [ and ] instead.
18771   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18772   if test "x$has_forbidden_chars" != x; then
18773     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18774     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18775     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18776     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18777       # Going to short mode and back again did indeed matter. Since short mode is
18778       # case insensitive, let's make it lowercase to improve readability.
18779       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18780       # Now convert it back to Unix-stile (cygpath)
18781       input_path=`$CYGPATH -u "$shortmode_path"`
18782       new_path="$input_path"
18783     fi
18784   fi
18785 
18786   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18787   if test "x$test_cygdrive_prefix" = x; then
18788     # As a simple fix, exclude /usr/bin since it's not a real path.
18789     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18790       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18791       # a path prefixed by /cygdrive for fixpath to work.
18792       new_path="$CYGWIN_ROOT_PATH$input_path"
18793     fi
18794   fi
18795 
18796   # remove trailing .exe if any
18797   new_path="${new_path/%.exe/}"
18798 
18799   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18800 
18801   # First separate the path from the arguments. This will split at the first
18802   # space.
18803   complete="$CC"
18804   path="${complete%% *}"
18805   tmp="$complete EOL"
18806   arguments="${tmp#* }"
18807 
18808   # Input might be given as Windows format, start by converting to
18809   # unix format.
18810   new_path="$path"
18811 
18812   windows_path="$new_path"
18813   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18814     unix_path=`$CYGPATH -u "$windows_path"`
18815     new_path="$unix_path"
18816   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18817     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18818     new_path="$unix_path"
18819   fi
18820 
18821 
18822   # Now try to locate executable using which
18823   new_path=`$WHICH "$new_path" 2> /dev/null`
18824 
18825   if test "x$new_path" = x; then
18826     # Oops. Which didn't find the executable.
18827     # The splitting of arguments from the executable at a space might have been incorrect,
18828     # since paths with space are more likely in Windows. Give it another try with the whole
18829     # argument.
18830     path="$complete"
18831     arguments="EOL"
18832     new_path="$path"
18833 
18834   windows_path="$new_path"
18835   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18836     unix_path=`$CYGPATH -u "$windows_path"`
18837     new_path="$unix_path"
18838   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18839     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18840     new_path="$unix_path"
18841   fi
18842 
18843 
18844     new_path=`$WHICH "$new_path" 2> /dev/null`
18845 
18846     if test "x$new_path" = x; then
18847       # It's still not found. Now this is an unrecoverable error.
18848       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18849 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18850       has_space=`$ECHO "$complete" | $GREP " "`
18851       if test "x$has_space" != x; then
18852         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18853 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18854       fi
18855       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18856     fi
18857   fi
18858 
18859   # Now new_path has a complete unix path to the binary
18860   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18861     # Keep paths in /bin as-is, but remove trailing .exe if any
18862     new_path="${new_path/%.exe/}"
18863     # Do not save /bin paths to all_fixpath_prefixes!
18864   else
18865     # Not in mixed or Windows style, start by that.
18866     new_path=`cmd //c echo $new_path`
18867 
18868   input_path="$new_path"
18869   # Check if we need to convert this using DOS-style short mode. If the path
18870   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18871   # take no chances and rewrite it.
18872   # Note: m4 eats our [], so we need to use [ and ] instead.
18873   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18874   if test "x$has_forbidden_chars" != x; then
18875     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18876     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18877   fi
18878 
18879     # Output is in $new_path
18880 
18881   windows_path="$new_path"
18882   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18883     unix_path=`$CYGPATH -u "$windows_path"`
18884     new_path="$unix_path"
18885   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18886     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18887     new_path="$unix_path"
18888   fi
18889 
18890     # remove trailing .exe if any
18891     new_path="${new_path/%.exe/}"
18892 
18893     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18894     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18895   fi
18896 
18897   else
18898     # We're on a posix platform. Hooray! :)
18899     # First separate the path from the arguments. This will split at the first
18900     # space.
18901     complete="$CC"
18902     path="${complete%% *}"
18903     tmp="$complete EOL"
18904     arguments="${tmp#* }"
18905 
18906     # Cannot rely on the command "which" here since it doesn't always work.
18907     is_absolute_path=`$ECHO "$path" | $GREP ^/`
18908     if test -z "$is_absolute_path"; then
18909       # Path to executable is not absolute. Find it.
18910       IFS_save="$IFS"
18911       IFS=:
18912       for p in $PATH; do
18913         if test -f "$p/$path" && test -x "$p/$path"; then
18914           new_path="$p/$path"
18915           break
18916         fi
18917       done
18918       IFS="$IFS_save"
18919     else
18920       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
18921 $as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
18922       new_path="$path"
18923     fi
18924 
18925     if test "x$new_path" = x; then
18926         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18927 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18928         has_space=`$ECHO "$complete" | $GREP " "`
18929         if test "x$has_space" != x; then
18930           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18931 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18932         fi
18933         as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18934       fi
18935   fi
18936 
18937       # Now join together the path and the arguments once again
18938       if test "x$arguments" != xEOL; then
18939         new_complete="$new_path ${arguments% *}"
18940       else
18941         new_complete="$new_path"
18942       fi
18943 
18944   if test "x$complete" != "x$new_complete"; then
18945       CC="$new_complete"
18946       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
18947 $as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
18948     fi
18949 
18950   { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
18951 $as_echo_n "checking resolved symbolic links for CC... " >&6; }
18952   TEST_COMPILER="$CC"
18953 
18954     if test "x$OPENJDK_BUILD_OS" != xwindows; then
18955         # Follow a chain of symbolic links. Use readlink
18956         # where it exists, else fall back to horribly
18957         # complicated shell code.
18958         if test "x$READLINK_TESTED" != yes; then
18959             # On MacOSX there is a readlink tool with a different
18960             # purpose than the GNU readlink tool. Check the found readlink.
18961             ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
18962             if test "x$ISGNU" = x; then
18963                  # A readlink that we do not know how to use.
18964                  # Are there other non-GNU readlinks out there?
18965                  READLINK_TESTED=yes
18966                  READLINK=
18967             fi
18968         fi
18969 
18970         if test "x$READLINK" != x; then
18971             TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
18972         else
18973             # Save the current directory for restoring afterwards
18974             STARTDIR=$PWD
18975             COUNTER=0
18976             sym_link_dir=`$DIRNAME $TEST_COMPILER`
18977             sym_link_file=`$BASENAME $TEST_COMPILER`
18978             # Use the system pwd and not the shell builtin to resolve directory symlinks
18979             cd $sym_link_dir
18980             cd `$THEPWDCMD`
18981             sym_link_dir=`$THEPWDCMD`
18982             # Resolve file symlinks
18983             while test $COUNTER -lt 20; do
18984                 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
18985                 if test "x$ISLINK" == x; then
18986                     # This is not a symbolic link! We are done!
18987                     break
18988                 fi
18989                 # Again resolve directory symlinks since the target of the just found
18990                 # link could be in a different directory
18991                 cd `$DIRNAME $ISLINK`
18992                 sym_link_dir=`$THEPWDCMD`
18993                 sym_link_file=`$BASENAME $ISLINK`
18994                 let COUNTER=COUNTER+1
18995             done
18996             cd $STARTDIR
18997             TEST_COMPILER=$sym_link_dir/$sym_link_file
18998         fi
18999     fi
19000 
19001   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
19002 $as_echo "$TEST_COMPILER" >&6; }
19003   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
19004 $as_echo_n "checking if CC is disguised ccache... " >&6; }
19005 
19006   COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
19007   if test "x$COMPILER_BASENAME" = "xccache"; then
19008     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
19009 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
19010     # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
19011     # We want to control ccache invocation ourselves, so ignore this cc and try
19012     # searching again.
19013 
19014     # Remove the path to the fake ccache cc from the PATH
19015     RETRY_COMPILER_SAVED_PATH="$PATH"
19016     COMPILER_DIRNAME=`$DIRNAME $CC`
19017     PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
19018 
19019     # Try again looking for our compiler
19020     if test -n "$ac_tool_prefix"; then
19021   for ac_prog in $COMPILER_CHECK_LIST
19022   do
19023     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19024 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19026 $as_echo_n "checking for $ac_word... " >&6; }
19027 if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
19028   $as_echo_n "(cached) " >&6
19029 else
19030   if test -n "$PROPER_COMPILER_CC"; then
19031   ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
19032 else
19033 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19034 for as_dir in $PATH
19035 do
19036   IFS=$as_save_IFS
19037   test -z "$as_dir" && as_dir=.
19038     for ac_exec_ext in '' $ac_executable_extensions; do
19039   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19040     ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
19041     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19042     break 2
19043   fi
19044 done
19045   done
19046 IFS=$as_save_IFS
19047 
19048 fi
19049 fi
19050 PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
19051 if test -n "$PROPER_COMPILER_CC"; then
19052   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19053 $as_echo "$PROPER_COMPILER_CC" >&6; }
19054 else
19055   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19056 $as_echo "no" >&6; }
19057 fi
19058 
19059 
19060     test -n "$PROPER_COMPILER_CC" && break
19061   done
19062 fi
19063 if test -z "$PROPER_COMPILER_CC"; then
19064   ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
19065   for ac_prog in $COMPILER_CHECK_LIST
19066 do
19067   # Extract the first word of "$ac_prog", so it can be a program name with args.
19068 set dummy $ac_prog; ac_word=$2
19069 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19070 $as_echo_n "checking for $ac_word... " >&6; }
19071 if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
19072   $as_echo_n "(cached) " >&6
19073 else
19074   if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19075   ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
19076 else
19077 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19078 for as_dir in $PATH
19079 do
19080   IFS=$as_save_IFS
19081   test -z "$as_dir" && as_dir=.
19082     for ac_exec_ext in '' $ac_executable_extensions; do
19083   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19084     ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
19085     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19086     break 2
19087   fi
19088 done
19089   done
19090 IFS=$as_save_IFS
19091 
19092 fi
19093 fi
19094 ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
19095 if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19096   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
19097 $as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
19098 else
19099   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19100 $as_echo "no" >&6; }
19101 fi
19102 
19103 
19104   test -n "$ac_ct_PROPER_COMPILER_CC" && break
19105 done
19106 
19107   if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
19108     PROPER_COMPILER_CC=""
19109   else
19110     case $cross_compiling:$ac_tool_warned in
19111 yes:)
19112 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19113 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19114 ac_tool_warned=yes ;;
19115 esac
19116     PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
19117   fi
19118 fi
19119 
19120 
19121   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19122 
19123   # First separate the path from the arguments. This will split at the first
19124   # space.
19125   complete="$PROPER_COMPILER_CC"
19126   path="${complete%% *}"
19127   tmp="$complete EOL"
19128   arguments="${tmp#* }"
19129 
19130   # Input might be given as Windows format, start by converting to
19131   # unix format.
19132   new_path=`$CYGPATH -u "$path"`
19133 
19134   # Now try to locate executable using which
19135   new_path=`$WHICH "$new_path" 2> /dev/null`
19136   # bat and cmd files are not always considered executable in cygwin causing which
19137   # to not find them
19138   if test "x$new_path" = x \
19139            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19140            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19141     new_path=`$CYGPATH -u "$path"`
19142   fi
19143   if test "x$new_path" = x; then
19144     # Oops. Which didn't find the executable.
19145     # The splitting of arguments from the executable at a space might have been incorrect,
19146     # since paths with space are more likely in Windows. Give it another try with the whole
19147     # argument.
19148     path="$complete"
19149     arguments="EOL"
19150     new_path=`$CYGPATH -u "$path"`
19151     new_path=`$WHICH "$new_path" 2> /dev/null`
19152     # bat and cmd files are not always considered executable in cygwin causing which
19153     # to not find them
19154     if test "x$new_path" = x \
19155              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19156              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19157       new_path=`$CYGPATH -u "$path"`
19158     fi
19159     if test "x$new_path" = x; then
19160       # It's still not found. Now this is an unrecoverable error.
19161       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19162 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19163       has_space=`$ECHO "$complete" | $GREP " "`
19164       if test "x$has_space" != x; then
19165         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19166 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19167       fi
19168       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19169     fi
19170   fi
19171 
19172   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19173   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19174   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19175   # "foo.exe" is OK but "foo" is an error.
19176   #
19177   # This test is therefore slightly more accurate than "test -f" to check for file precense.
19178   # It is also a way to make sure we got the proper file name for the real test later on.
19179   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19180   if test "x$test_shortpath" = x; then
19181     # Short path failed, file does not exist as specified.
19182     # Try adding .exe or .cmd
19183     if test -f "${new_path}.exe"; then
19184        input_to_shortpath="${new_path}.exe"
19185     elif test -f "${new_path}.cmd"; then
19186        input_to_shortpath="${new_path}.cmd"
19187     else
19188       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
19189 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
19190       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19191 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19192       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19193     fi
19194   else
19195     input_to_shortpath="$new_path"
19196   fi
19197 
19198   # Call helper function which possibly converts this using DOS-style short mode.
19199   # If so, the updated path is stored in $new_path.
19200   new_path="$input_to_shortpath"
19201 
19202   input_path="$input_to_shortpath"
19203   # Check if we need to convert this using DOS-style short mode. If the path
19204   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19205   # take no chances and rewrite it.
19206   # Note: m4 eats our [], so we need to use [ and ] instead.
19207   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19208   if test "x$has_forbidden_chars" != x; then
19209     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19210     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19211     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19212     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19213       # Going to short mode and back again did indeed matter. Since short mode is
19214       # case insensitive, let's make it lowercase to improve readability.
19215       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19216       # Now convert it back to Unix-stile (cygpath)
19217       input_path=`$CYGPATH -u "$shortmode_path"`
19218       new_path="$input_path"
19219     fi
19220   fi
19221 
19222   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19223   if test "x$test_cygdrive_prefix" = x; then
19224     # As a simple fix, exclude /usr/bin since it's not a real path.
19225     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19226       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19227       # a path prefixed by /cygdrive for fixpath to work.
19228       new_path="$CYGWIN_ROOT_PATH$input_path"
19229     fi
19230   fi
19231 
19232   # remove trailing .exe if any
19233   new_path="${new_path/%.exe/}"
19234 
19235   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19236 
19237   # First separate the path from the arguments. This will split at the first
19238   # space.
19239   complete="$PROPER_COMPILER_CC"
19240   path="${complete%% *}"
19241   tmp="$complete EOL"
19242   arguments="${tmp#* }"
19243 
19244   # Input might be given as Windows format, start by converting to
19245   # unix format.
19246   new_path="$path"
19247 
19248   windows_path="$new_path"
19249   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19250     unix_path=`$CYGPATH -u "$windows_path"`
19251     new_path="$unix_path"
19252   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19253     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19254     new_path="$unix_path"
19255   fi
19256 
19257 
19258   # Now try to locate executable using which
19259   new_path=`$WHICH "$new_path" 2> /dev/null`
19260 
19261   if test "x$new_path" = x; then
19262     # Oops. Which didn't find the executable.
19263     # The splitting of arguments from the executable at a space might have been incorrect,
19264     # since paths with space are more likely in Windows. Give it another try with the whole
19265     # argument.
19266     path="$complete"
19267     arguments="EOL"
19268     new_path="$path"
19269 
19270   windows_path="$new_path"
19271   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19272     unix_path=`$CYGPATH -u "$windows_path"`
19273     new_path="$unix_path"
19274   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19275     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19276     new_path="$unix_path"
19277   fi
19278 
19279 
19280     new_path=`$WHICH "$new_path" 2> /dev/null`
19281 
19282     if test "x$new_path" = x; then
19283       # It's still not found. Now this is an unrecoverable error.
19284       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19285 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19286       has_space=`$ECHO "$complete" | $GREP " "`
19287       if test "x$has_space" != x; then
19288         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19289 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19290       fi
19291       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19292     fi
19293   fi
19294 
19295   # Now new_path has a complete unix path to the binary
19296   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19297     # Keep paths in /bin as-is, but remove trailing .exe if any
19298     new_path="${new_path/%.exe/}"
19299     # Do not save /bin paths to all_fixpath_prefixes!
19300   else
19301     # Not in mixed or Windows style, start by that.
19302     new_path=`cmd //c echo $new_path`
19303 
19304   input_path="$new_path"
19305   # Check if we need to convert this using DOS-style short mode. If the path
19306   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19307   # take no chances and rewrite it.
19308   # Note: m4 eats our [], so we need to use [ and ] instead.
19309   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19310   if test "x$has_forbidden_chars" != x; then
19311     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19312     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19313   fi
19314 
19315     # Output is in $new_path
19316 
19317   windows_path="$new_path"
19318   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19319     unix_path=`$CYGPATH -u "$windows_path"`
19320     new_path="$unix_path"
19321   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19322     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19323     new_path="$unix_path"
19324   fi
19325 
19326     # remove trailing .exe if any
19327     new_path="${new_path/%.exe/}"
19328 
19329     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19330     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19331   fi
19332 
19333   else
19334     # We're on a posix platform. Hooray! :)
19335     # First separate the path from the arguments. This will split at the first
19336     # space.
19337     complete="$PROPER_COMPILER_CC"
19338     path="${complete%% *}"
19339     tmp="$complete EOL"
19340     arguments="${tmp#* }"
19341 
19342     # Cannot rely on the command "which" here since it doesn't always work.
19343     is_absolute_path=`$ECHO "$path" | $GREP ^/`
19344     if test -z "$is_absolute_path"; then
19345       # Path to executable is not absolute. Find it.
19346       IFS_save="$IFS"
19347       IFS=:
19348       for p in $PATH; do
19349         if test -f "$p/$path" && test -x "$p/$path"; then
19350           new_path="$p/$path"
19351           break
19352         fi
19353       done
19354       IFS="$IFS_save"
19355     else
19356       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
19357 $as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
19358       new_path="$path"
19359     fi
19360 
19361     if test "x$new_path" = x; then
19362         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19363 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19364         has_space=`$ECHO "$complete" | $GREP " "`
19365         if test "x$has_space" != x; then
19366           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19367 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19368         fi
19369         as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19370       fi
19371   fi
19372 
19373       # Now join together the path and the arguments once again
19374       if test "x$arguments" != xEOL; then
19375         new_complete="$new_path ${arguments% *}"
19376       else
19377         new_complete="$new_path"
19378       fi
19379 
19380   if test "x$complete" != "x$new_complete"; then
19381       PROPER_COMPILER_CC="$new_complete"
19382       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
19383 $as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
19384     fi
19385 
19386     PATH="$RETRY_COMPILER_SAVED_PATH"
19387 
19388     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
19389 $as_echo_n "checking for resolved symbolic links for CC... " >&6; }
19390 
19391     if test "x$OPENJDK_BUILD_OS" != xwindows; then
19392         # Follow a chain of symbolic links. Use readlink
19393         # where it exists, else fall back to horribly
19394         # complicated shell code.
19395         if test "x$READLINK_TESTED" != yes; then
19396             # On MacOSX there is a readlink tool with a different
19397             # purpose than the GNU readlink tool. Check the found readlink.
19398             ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19399             if test "x$ISGNU" = x; then
19400                  # A readlink that we do not know how to use.
19401                  # Are there other non-GNU readlinks out there?
19402                  READLINK_TESTED=yes
19403                  READLINK=
19404             fi
19405         fi
19406 
19407         if test "x$READLINK" != x; then
19408             PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
19409         else
19410             # Save the current directory for restoring afterwards
19411             STARTDIR=$PWD
19412             COUNTER=0
19413             sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
19414             sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
19415             # Use the system pwd and not the shell builtin to resolve directory symlinks
19416             cd $sym_link_dir
19417             cd `$THEPWDCMD`
19418             sym_link_dir=`$THEPWDCMD`
19419             # Resolve file symlinks
19420             while test $COUNTER -lt 20; do
19421                 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19422                 if test "x$ISLINK" == x; then
19423                     # This is not a symbolic link! We are done!
19424                     break
19425                 fi
19426                 # Again resolve directory symlinks since the target of the just found
19427                 # link could be in a different directory
19428                 cd `$DIRNAME $ISLINK`
19429                 sym_link_dir=`$THEPWDCMD`
19430                 sym_link_file=`$BASENAME $ISLINK`
19431                 let COUNTER=COUNTER+1
19432             done
19433             cd $STARTDIR
19434             PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
19435         fi
19436     fi
19437 
19438     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19439 $as_echo "$PROPER_COMPILER_CC" >&6; }
19440     CC="$PROPER_COMPILER_CC"
19441   else
19442     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
19443 $as_echo "no, keeping CC" >&6; }
19444     CC="$TEST_COMPILER"
19445   fi
19446 
19447   COMPILER=$CC
19448   COMPILER_NAME=$COMPILER_NAME
19449 
19450   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
19451     # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
19452     COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
19453     $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
19454     if test $? -ne 0; then
19455       GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19456 
19457       { $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
19458 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
19459       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
19460 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
19461       as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19462     else
19463       COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
19464       COMPILER_VENDOR="Sun Studio"
19465     fi
19466   elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
19467     # First line typically looks something like:
19468     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
19469     COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
19470     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
19471     COMPILER_VENDOR="Microsoft CL.EXE"
19472     COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
19473     if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
19474       if test "x$COMPILER_CPU_TEST" != "x80x86"; then
19475         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
19476       fi
19477     elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
19478       if test "x$COMPILER_CPU_TEST" != "xx64"; then
19479         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
19480       fi
19481     fi
19482   else
19483     COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19484     # Check that this is likely to be GCC.
19485     $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
19486     if test $? -ne 0; then
19487       { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
19488 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
19489       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
19490 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
19491       as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19492     fi
19493 
19494     # First line typically looks something like:
19495     # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
19496     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
19497     COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
19498   fi
19499   # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
19500   CC_VERSION="$COMPILER_VERSION"
19501   # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
19502   CC_VENDOR="$COMPILER_VENDOR"
19503 
19504   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
19505 $as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
19506 
19507 
19508 # Now that we have resolved CC ourself, let autoconf have it's go at it
19509 ac_ext=c
19510 ac_cpp='$CPP $CPPFLAGS'
19511 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19512 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19513 ac_compiler_gnu=$ac_cv_c_compiler_gnu
19514 if test -n "$ac_tool_prefix"; then
19515   for ac_prog in $CC
19516   do
19517     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19518 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19520 $as_echo_n "checking for $ac_word... " >&6; }
19521 if ${ac_cv_prog_CC+:} false; then :
19522   $as_echo_n "(cached) " >&6
19523 else
19524   if test -n "$CC"; then
19525   ac_cv_prog_CC="$CC" # Let the user override the test.
19526 else
19527 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19528 for as_dir in $PATH
19529 do
19530   IFS=$as_save_IFS
19531   test -z "$as_dir" && as_dir=.
19532     for ac_exec_ext in '' $ac_executable_extensions; do
19533   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19534     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
19535     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19536     break 2
19537   fi
19538 done
19539   done
19540 IFS=$as_save_IFS
19541 
19542 fi
19543 fi
19544 CC=$ac_cv_prog_CC
19545 if test -n "$CC"; then
19546   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
19547 $as_echo "$CC" >&6; }
19548 else
19549   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19550 $as_echo "no" >&6; }
19551 fi
19552 
19553 
19554     test -n "$CC" && break
19555   done
19556 fi
19557 if test -z "$CC"; then
19558   ac_ct_CC=$CC
19559   for ac_prog in $CC
19560 do
19561   # Extract the first word of "$ac_prog", so it can be a program name with args.
19562 set dummy $ac_prog; ac_word=$2
19563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19564 $as_echo_n "checking for $ac_word... " >&6; }
19565 if ${ac_cv_prog_ac_ct_CC+:} false; then :
19566   $as_echo_n "(cached) " >&6
19567 else
19568   if test -n "$ac_ct_CC"; then
19569   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
19570 else
19571 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19572 for as_dir in $PATH
19573 do
19574   IFS=$as_save_IFS
19575   test -z "$as_dir" && as_dir=.
19576     for ac_exec_ext in '' $ac_executable_extensions; do
19577   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19578     ac_cv_prog_ac_ct_CC="$ac_prog"
19579     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19580     break 2
19581   fi
19582 done
19583   done
19584 IFS=$as_save_IFS
19585 
19586 fi
19587 fi
19588 ac_ct_CC=$ac_cv_prog_ac_ct_CC
19589 if test -n "$ac_ct_CC"; then
19590   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
19591 $as_echo "$ac_ct_CC" >&6; }
19592 else
19593   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19594 $as_echo "no" >&6; }
19595 fi
19596 
19597 
19598   test -n "$ac_ct_CC" && break
19599 done
19600 
19601   if test "x$ac_ct_CC" = x; then
19602     CC=""
19603   else
19604     case $cross_compiling:$ac_tool_warned in
19605 yes:)
19606 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19607 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19608 ac_tool_warned=yes ;;
19609 esac
19610     CC=$ac_ct_CC
19611   fi
19612 fi
19613 
19614 
19615 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19616 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19617 as_fn_error $? "no acceptable C compiler found in \$PATH
19618 See \`config.log' for more details" "$LINENO" 5; }
19619 
19620 # Provide some information about the compiler.
19621 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
19622 set X $ac_compile
19623 ac_compiler=$2
19624 for ac_option in --version -v -V -qversion; do
19625   { { ac_try="$ac_compiler $ac_option >&5"
19626 case "(($ac_try" in
19627   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19628   *) ac_try_echo=$ac_try;;
19629 esac
19630 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19631 $as_echo "$ac_try_echo"; } >&5
19632   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
19633   ac_status=$?
19634   if test -s conftest.err; then
19635     sed '10a\
19636 ... rest of stderr output deleted ...
19637          10q' conftest.err >conftest.er1
19638     cat conftest.er1 >&5
19639   fi
19640   rm -f conftest.er1 conftest.err
19641   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19642   test $ac_status = 0; }
19643 done
19644 
19645 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19646 /* end confdefs.h.  */
19647 
19648 int
19649 main ()
19650 {
19651 
19652   ;
19653   return 0;
19654 }
19655 _ACEOF
19656 ac_clean_files_save=$ac_clean_files
19657 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
19658 # Try to create an executable without -o first, disregard a.out.
19659 # It will help us diagnose broken compilers, and finding out an intuition
19660 # of exeext.
19661 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
19662 $as_echo_n "checking whether the C compiler works... " >&6; }
19663 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
19664 
19665 # The possible output files:
19666 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
19667 
19668 ac_rmfiles=
19669 for ac_file in $ac_files
19670 do
19671   case $ac_file in
19672     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
19673     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
19674   esac
19675 done
19676 rm -f $ac_rmfiles
19677 
19678 if { { ac_try="$ac_link_default"
19679 case "(($ac_try" in
19680   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19681   *) ac_try_echo=$ac_try;;
19682 esac
19683 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19684 $as_echo "$ac_try_echo"; } >&5
19685   (eval "$ac_link_default") 2>&5
19686   ac_status=$?
19687   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19688   test $ac_status = 0; }; then :
19689   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
19690 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
19691 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
19692 # so that the user can short-circuit this test for compilers unknown to
19693 # Autoconf.
19694 for ac_file in $ac_files ''
19695 do
19696   test -f "$ac_file" || continue
19697   case $ac_file in
19698     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
19699         ;;
19700     [ab].out )
19701         # We found the default executable, but exeext='' is most
19702         # certainly right.
19703         break;;
19704     *.* )
19705         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
19706         then :; else
19707            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
19708         fi
19709         # We set ac_cv_exeext here because the later test for it is not
19710         # safe: cross compilers may not add the suffix if given an `-o'
19711         # argument, so we may need to know it at that point already.
19712         # Even if this section looks crufty: it has the advantage of
19713         # actually working.
19714         break;;
19715     * )
19716         break;;
19717   esac
19718 done
19719 test "$ac_cv_exeext" = no && ac_cv_exeext=
19720 
19721 else
19722   ac_file=''
19723 fi
19724 if test -z "$ac_file"; then :
19725   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19726 $as_echo "no" >&6; }
19727 $as_echo "$as_me: failed program was:" >&5
19728 sed 's/^/| /' conftest.$ac_ext >&5
19729 
19730 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19731 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19732 as_fn_error 77 "C compiler cannot create executables
19733 See \`config.log' for more details" "$LINENO" 5; }
19734 else
19735   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19736 $as_echo "yes" >&6; }
19737 fi
19738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
19739 $as_echo_n "checking for C compiler default output file name... " >&6; }
19740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
19741 $as_echo "$ac_file" >&6; }
19742 ac_exeext=$ac_cv_exeext
19743 
19744 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
19745 ac_clean_files=$ac_clean_files_save
19746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
19747 $as_echo_n "checking for suffix of executables... " >&6; }
19748 if { { ac_try="$ac_link"
19749 case "(($ac_try" in
19750   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19751   *) ac_try_echo=$ac_try;;
19752 esac
19753 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19754 $as_echo "$ac_try_echo"; } >&5
19755   (eval "$ac_link") 2>&5
19756   ac_status=$?
19757   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19758   test $ac_status = 0; }; then :
19759   # If both `conftest.exe' and `conftest' are `present' (well, observable)
19760 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
19761 # work properly (i.e., refer to `conftest.exe'), while it won't with
19762 # `rm'.
19763 for ac_file in conftest.exe conftest conftest.*; do
19764   test -f "$ac_file" || continue
19765   case $ac_file in
19766     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
19767     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
19768           break;;
19769     * ) break;;
19770   esac
19771 done
19772 else
19773   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19774 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19775 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
19776 See \`config.log' for more details" "$LINENO" 5; }
19777 fi
19778 rm -f conftest conftest$ac_cv_exeext
19779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
19780 $as_echo "$ac_cv_exeext" >&6; }
19781 
19782 rm -f conftest.$ac_ext
19783 EXEEXT=$ac_cv_exeext
19784 ac_exeext=$EXEEXT
19785 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19786 /* end confdefs.h.  */
19787 #include <stdio.h>
19788 int
19789 main ()
19790 {
19791 FILE *f = fopen ("conftest.out", "w");
19792  return ferror (f) || fclose (f) != 0;
19793 
19794   ;
19795   return 0;
19796 }
19797 _ACEOF
19798 ac_clean_files="$ac_clean_files conftest.out"
19799 # Check that the compiler produces executables we can run.  If not, either
19800 # the compiler is broken, or we cross compile.
19801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
19802 $as_echo_n "checking whether we are cross compiling... " >&6; }
19803 if test "$cross_compiling" != yes; then
19804   { { ac_try="$ac_link"
19805 case "(($ac_try" in
19806   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19807   *) ac_try_echo=$ac_try;;
19808 esac
19809 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19810 $as_echo "$ac_try_echo"; } >&5
19811   (eval "$ac_link") 2>&5
19812   ac_status=$?
19813   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19814   test $ac_status = 0; }
19815   if { ac_try='./conftest$ac_cv_exeext'
19816   { { case "(($ac_try" in
19817   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19818   *) ac_try_echo=$ac_try;;
19819 esac
19820 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19821 $as_echo "$ac_try_echo"; } >&5
19822   (eval "$ac_try") 2>&5
19823   ac_status=$?
19824   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19825   test $ac_status = 0; }; }; then
19826     cross_compiling=no
19827   else
19828     if test "$cross_compiling" = maybe; then
19829         cross_compiling=yes
19830     else
19831         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19832 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19833 as_fn_error $? "cannot run C compiled programs.
19834 If you meant to cross compile, use \`--host'.
19835 See \`config.log' for more details" "$LINENO" 5; }
19836     fi
19837   fi
19838 fi
19839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
19840 $as_echo "$cross_compiling" >&6; }
19841 
19842 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
19843 ac_clean_files=$ac_clean_files_save
19844 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
19845 $as_echo_n "checking for suffix of object files... " >&6; }
19846 if ${ac_cv_objext+:} false; then :
19847   $as_echo_n "(cached) " >&6
19848 else
19849   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19850 /* end confdefs.h.  */
19851 
19852 int
19853 main ()
19854 {
19855 
19856   ;
19857   return 0;
19858 }
19859 _ACEOF
19860 rm -f conftest.o conftest.obj
19861 if { { ac_try="$ac_compile"
19862 case "(($ac_try" in
19863   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19864   *) ac_try_echo=$ac_try;;
19865 esac
19866 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19867 $as_echo "$ac_try_echo"; } >&5
19868   (eval "$ac_compile") 2>&5
19869   ac_status=$?
19870   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19871   test $ac_status = 0; }; then :
19872   for ac_file in conftest.o conftest.obj conftest.*; do
19873   test -f "$ac_file" || continue;
19874   case $ac_file in
19875     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
19876     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
19877        break;;
19878   esac
19879 done
19880 else
19881   $as_echo "$as_me: failed program was:" >&5
19882 sed 's/^/| /' conftest.$ac_ext >&5
19883 
19884 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19885 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19886 as_fn_error $? "cannot compute suffix of object files: cannot compile
19887 See \`config.log' for more details" "$LINENO" 5; }
19888 fi
19889 rm -f conftest.$ac_cv_objext conftest.$ac_ext
19890 fi
19891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
19892 $as_echo "$ac_cv_objext" >&6; }
19893 OBJEXT=$ac_cv_objext
19894 ac_objext=$OBJEXT
19895 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
19896 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
19897 if ${ac_cv_c_compiler_gnu+:} false; then :
19898   $as_echo_n "(cached) " >&6
19899 else
19900   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19901 /* end confdefs.h.  */
19902 
19903 int
19904 main ()
19905 {
19906 #ifndef __GNUC__
19907        choke me
19908 #endif
19909 
19910   ;
19911   return 0;
19912 }
19913 _ACEOF
19914 if ac_fn_c_try_compile "$LINENO"; then :
19915   ac_compiler_gnu=yes
19916 else
19917   ac_compiler_gnu=no
19918 fi
19919 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19920 ac_cv_c_compiler_gnu=$ac_compiler_gnu
19921 
19922 fi
19923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
19924 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
19925 if test $ac_compiler_gnu = yes; then
19926   GCC=yes
19927 else
19928   GCC=
19929 fi
19930 ac_test_CFLAGS=${CFLAGS+set}
19931 ac_save_CFLAGS=$CFLAGS
19932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
19933 $as_echo_n "checking whether $CC accepts -g... " >&6; }
19934 if ${ac_cv_prog_cc_g+:} false; then :
19935   $as_echo_n "(cached) " >&6
19936 else
19937   ac_save_c_werror_flag=$ac_c_werror_flag
19938    ac_c_werror_flag=yes
19939    ac_cv_prog_cc_g=no
19940    CFLAGS="-g"
19941    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19942 /* end confdefs.h.  */
19943 
19944 int
19945 main ()
19946 {
19947 
19948   ;
19949   return 0;
19950 }
19951 _ACEOF
19952 if ac_fn_c_try_compile "$LINENO"; then :
19953   ac_cv_prog_cc_g=yes
19954 else
19955   CFLAGS=""
19956       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19957 /* end confdefs.h.  */
19958 
19959 int
19960 main ()
19961 {
19962 
19963   ;
19964   return 0;
19965 }
19966 _ACEOF
19967 if ac_fn_c_try_compile "$LINENO"; then :
19968 
19969 else
19970   ac_c_werror_flag=$ac_save_c_werror_flag
19971          CFLAGS="-g"
19972          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19973 /* end confdefs.h.  */
19974 
19975 int
19976 main ()
19977 {
19978 
19979   ;
19980   return 0;
19981 }
19982 _ACEOF
19983 if ac_fn_c_try_compile "$LINENO"; then :
19984   ac_cv_prog_cc_g=yes
19985 fi
19986 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19987 fi
19988 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19989 fi
19990 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19991    ac_c_werror_flag=$ac_save_c_werror_flag
19992 fi
19993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
19994 $as_echo "$ac_cv_prog_cc_g" >&6; }
19995 if test "$ac_test_CFLAGS" = set; then
19996   CFLAGS=$ac_save_CFLAGS
19997 elif test $ac_cv_prog_cc_g = yes; then
19998   if test "$GCC" = yes; then
19999     CFLAGS="-g -O2"
20000   else
20001     CFLAGS="-g"
20002   fi
20003 else
20004   if test "$GCC" = yes; then
20005     CFLAGS="-O2"
20006   else
20007     CFLAGS=
20008   fi
20009 fi
20010 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
20011 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
20012 if ${ac_cv_prog_cc_c89+:} false; then :
20013   $as_echo_n "(cached) " >&6
20014 else
20015   ac_cv_prog_cc_c89=no
20016 ac_save_CC=$CC
20017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20018 /* end confdefs.h.  */
20019 #include <stdarg.h>
20020 #include <stdio.h>
20021 #include <sys/types.h>
20022 #include <sys/stat.h>
20023 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
20024 struct buf { int x; };
20025 FILE * (*rcsopen) (struct buf *, struct stat *, int);
20026 static char *e (p, i)
20027      char **p;
20028      int i;
20029 {
20030   return p[i];
20031 }
20032 static char *f (char * (*g) (char **, int), char **p, ...)
20033 {
20034   char *s;
20035   va_list v;
20036   va_start (v,p);
20037   s = g (p, va_arg (v,int));
20038   va_end (v);
20039   return s;
20040 }
20041 
20042 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
20043    function prototypes and stuff, but not '\xHH' hex character constants.
20044    These don't provoke an error unfortunately, instead are silently treated
20045    as 'x'.  The following induces an error, until -std is added to get
20046    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
20047    array size at least.  It's necessary to write '\x00'==0 to get something
20048    that's true only with -std.  */
20049 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
20050 
20051 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
20052    inside strings and character constants.  */
20053 #define FOO(x) 'x'
20054 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
20055 
20056 int test (int i, double x);
20057 struct s1 {int (*f) (int a);};
20058 struct s2 {int (*f) (double a);};
20059 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
20060 int argc;
20061 char **argv;
20062 int
20063 main ()
20064 {
20065 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
20066   ;
20067   return 0;
20068 }
20069 _ACEOF
20070 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
20071         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
20072 do
20073   CC="$ac_save_CC $ac_arg"
20074   if ac_fn_c_try_compile "$LINENO"; then :
20075   ac_cv_prog_cc_c89=$ac_arg
20076 fi
20077 rm -f core conftest.err conftest.$ac_objext
20078   test "x$ac_cv_prog_cc_c89" != "xno" && break
20079 done
20080 rm -f conftest.$ac_ext
20081 CC=$ac_save_CC
20082 
20083 fi
20084 # AC_CACHE_VAL
20085 case "x$ac_cv_prog_cc_c89" in
20086   x)
20087     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
20088 $as_echo "none needed" >&6; } ;;
20089   xno)
20090     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
20091 $as_echo "unsupported" >&6; } ;;
20092   *)
20093     CC="$CC $ac_cv_prog_cc_c89"
20094     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
20095 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
20096 esac
20097 if test "x$ac_cv_prog_cc_c89" != xno; then :
20098 
20099 fi
20100 
20101 ac_ext=cpp
20102 ac_cpp='$CXXCPP $CPPFLAGS'
20103 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20104 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20105 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20106 
20107 
20108 ### Locate C++ compiler (CXX)
20109 
20110 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20111   # Do not probe for CC on MacOSX.
20112   COMPILER_CHECK_LIST="cl g++"
20113 else
20114   COMPILER_CHECK_LIST="cl CC g++"
20115 fi
20116 
20117   COMPILER_NAME=C++
20118 
20119   CXX=
20120   # If TOOLS_DIR is set, check for all compiler names in there first
20121   # before checking the rest of the PATH.
20122   if test -n "$TOOLS_DIR"; then
20123     PATH_save="$PATH"
20124     PATH="$TOOLS_DIR"
20125     for ac_prog in $COMPILER_CHECK_LIST
20126 do
20127   # Extract the first word of "$ac_prog", so it can be a program name with args.
20128 set dummy $ac_prog; ac_word=$2
20129 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20130 $as_echo_n "checking for $ac_word... " >&6; }
20131 if ${ac_cv_path_TOOLS_DIR_CXX+:} false; then :
20132   $as_echo_n "(cached) " >&6
20133 else
20134   case $TOOLS_DIR_CXX in
20135   [\\/]* | ?:[\\/]*)
20136   ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
20137   ;;
20138   *)
20139   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20140 for as_dir in $PATH
20141 do
20142   IFS=$as_save_IFS
20143   test -z "$as_dir" && as_dir=.
20144     for ac_exec_ext in '' $ac_executable_extensions; do
20145   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20146     ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
20147     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20148     break 2
20149   fi
20150 done
20151   done
20152 IFS=$as_save_IFS
20153 
20154   ;;
20155 esac
20156 fi
20157 TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
20158 if test -n "$TOOLS_DIR_CXX"; then
20159   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
20160 $as_echo "$TOOLS_DIR_CXX" >&6; }
20161 else
20162   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20163 $as_echo "no" >&6; }
20164 fi
20165 
20166 
20167   test -n "$TOOLS_DIR_CXX" && break
20168 done
20169 
20170     CXX=$TOOLS_DIR_CXX
20171     PATH="$PATH_save"
20172   fi
20173 
20174   # AC_PATH_PROGS can't be run multiple times with the same variable,
20175   # so create a new name for this run.
20176   if test "x$CXX" = x; then
20177     for ac_prog in $COMPILER_CHECK_LIST
20178 do
20179   # Extract the first word of "$ac_prog", so it can be a program name with args.
20180 set dummy $ac_prog; ac_word=$2
20181 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20182 $as_echo_n "checking for $ac_word... " >&6; }
20183 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
20184   $as_echo_n "(cached) " >&6
20185 else
20186   case $POTENTIAL_CXX in
20187   [\\/]* | ?:[\\/]*)
20188   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
20189   ;;
20190   *)
20191   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20192 for as_dir in $PATH
20193 do
20194   IFS=$as_save_IFS
20195   test -z "$as_dir" && as_dir=.
20196     for ac_exec_ext in '' $ac_executable_extensions; do
20197   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20198     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
20199     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20200     break 2
20201   fi
20202 done
20203   done
20204 IFS=$as_save_IFS
20205 
20206   ;;
20207 esac
20208 fi
20209 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
20210 if test -n "$POTENTIAL_CXX"; then
20211   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
20212 $as_echo "$POTENTIAL_CXX" >&6; }
20213 else
20214   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20215 $as_echo "no" >&6; }
20216 fi
20217 
20218 
20219   test -n "$POTENTIAL_CXX" && break
20220 done
20221 
20222     CXX=$POTENTIAL_CXX
20223   fi
20224 
20225   if test "x$CXX" = x; then
20226 
20227     # Print a helpful message on how to acquire the necessary build dependency.
20228     # devkit is the help tag: freetyp2, cups, pulse, alsa etc
20229     MISSING_DEPENDENCY=devkit
20230     PKGHANDLER_COMMAND=
20231 
20232     case $PKGHANDLER in
20233         apt-get)
20234                 apt_help     $MISSING_DEPENDENCY ;;
20235     yum)
20236                 yum_help     $MISSING_DEPENDENCY ;;
20237         port)
20238                 port_help    $MISSING_DEPENDENCY ;;
20239         pkgutil)
20240                 pkgutil_help $MISSING_DEPENDENCY ;;
20241         pkgadd)
20242                 pkgadd_help  $MISSING_DEPENDENCY ;;
20243     * )
20244       break ;;
20245     esac
20246 
20247     if test "x$PKGHANDLER_COMMAND" != x; then
20248         HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
20249     fi
20250 
20251       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
20252   fi
20253 
20254   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20255 
20256   # First separate the path from the arguments. This will split at the first
20257   # space.
20258   complete="$CXX"
20259   path="${complete%% *}"
20260   tmp="$complete EOL"
20261   arguments="${tmp#* }"
20262 
20263   # Input might be given as Windows format, start by converting to
20264   # unix format.
20265   new_path=`$CYGPATH -u "$path"`
20266 
20267   # Now try to locate executable using which
20268   new_path=`$WHICH "$new_path" 2> /dev/null`
20269   # bat and cmd files are not always considered executable in cygwin causing which
20270   # to not find them
20271   if test "x$new_path" = x \
20272            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20273            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20274     new_path=`$CYGPATH -u "$path"`
20275   fi
20276   if test "x$new_path" = x; then
20277     # Oops. Which didn't find the executable.
20278     # The splitting of arguments from the executable at a space might have been incorrect,
20279     # since paths with space are more likely in Windows. Give it another try with the whole
20280     # argument.
20281     path="$complete"
20282     arguments="EOL"
20283     new_path=`$CYGPATH -u "$path"`
20284     new_path=`$WHICH "$new_path" 2> /dev/null`
20285     # bat and cmd files are not always considered executable in cygwin causing which
20286     # to not find them
20287     if test "x$new_path" = x \
20288              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20289              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20290       new_path=`$CYGPATH -u "$path"`
20291     fi
20292     if test "x$new_path" = x; then
20293       # It's still not found. Now this is an unrecoverable error.
20294       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20295 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20296       has_space=`$ECHO "$complete" | $GREP " "`
20297       if test "x$has_space" != x; then
20298         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20299 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20300       fi
20301       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20302     fi
20303   fi
20304 
20305   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20306   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20307   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20308   # "foo.exe" is OK but "foo" is an error.
20309   #
20310   # This test is therefore slightly more accurate than "test -f" to check for file precense.
20311   # It is also a way to make sure we got the proper file name for the real test later on.
20312   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20313   if test "x$test_shortpath" = x; then
20314     # Short path failed, file does not exist as specified.
20315     # Try adding .exe or .cmd
20316     if test -f "${new_path}.exe"; then
20317        input_to_shortpath="${new_path}.exe"
20318     elif test -f "${new_path}.cmd"; then
20319        input_to_shortpath="${new_path}.cmd"
20320     else
20321       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
20322 $as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
20323       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20324 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20325       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20326     fi
20327   else
20328     input_to_shortpath="$new_path"
20329   fi
20330 
20331   # Call helper function which possibly converts this using DOS-style short mode.
20332   # If so, the updated path is stored in $new_path.
20333   new_path="$input_to_shortpath"
20334 
20335   input_path="$input_to_shortpath"
20336   # Check if we need to convert this using DOS-style short mode. If the path
20337   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20338   # take no chances and rewrite it.
20339   # Note: m4 eats our [], so we need to use [ and ] instead.
20340   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20341   if test "x$has_forbidden_chars" != x; then
20342     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20343     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20344     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20345     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20346       # Going to short mode and back again did indeed matter. Since short mode is
20347       # case insensitive, let's make it lowercase to improve readability.
20348       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20349       # Now convert it back to Unix-stile (cygpath)
20350       input_path=`$CYGPATH -u "$shortmode_path"`
20351       new_path="$input_path"
20352     fi
20353   fi
20354 
20355   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20356   if test "x$test_cygdrive_prefix" = x; then
20357     # As a simple fix, exclude /usr/bin since it's not a real path.
20358     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20359       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20360       # a path prefixed by /cygdrive for fixpath to work.
20361       new_path="$CYGWIN_ROOT_PATH$input_path"
20362     fi
20363   fi
20364 
20365   # remove trailing .exe if any
20366   new_path="${new_path/%.exe/}"
20367 
20368   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20369 
20370   # First separate the path from the arguments. This will split at the first
20371   # space.
20372   complete="$CXX"
20373   path="${complete%% *}"
20374   tmp="$complete EOL"
20375   arguments="${tmp#* }"
20376 
20377   # Input might be given as Windows format, start by converting to
20378   # unix format.
20379   new_path="$path"
20380 
20381   windows_path="$new_path"
20382   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20383     unix_path=`$CYGPATH -u "$windows_path"`
20384     new_path="$unix_path"
20385   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20386     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20387     new_path="$unix_path"
20388   fi
20389 
20390 
20391   # Now try to locate executable using which
20392   new_path=`$WHICH "$new_path" 2> /dev/null`
20393 
20394   if test "x$new_path" = x; then
20395     # Oops. Which didn't find the executable.
20396     # The splitting of arguments from the executable at a space might have been incorrect,
20397     # since paths with space are more likely in Windows. Give it another try with the whole
20398     # argument.
20399     path="$complete"
20400     arguments="EOL"
20401     new_path="$path"
20402 
20403   windows_path="$new_path"
20404   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20405     unix_path=`$CYGPATH -u "$windows_path"`
20406     new_path="$unix_path"
20407   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20408     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20409     new_path="$unix_path"
20410   fi
20411 
20412 
20413     new_path=`$WHICH "$new_path" 2> /dev/null`
20414 
20415     if test "x$new_path" = x; then
20416       # It's still not found. Now this is an unrecoverable error.
20417       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20418 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20419       has_space=`$ECHO "$complete" | $GREP " "`
20420       if test "x$has_space" != x; then
20421         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20422 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20423       fi
20424       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20425     fi
20426   fi
20427 
20428   # Now new_path has a complete unix path to the binary
20429   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20430     # Keep paths in /bin as-is, but remove trailing .exe if any
20431     new_path="${new_path/%.exe/}"
20432     # Do not save /bin paths to all_fixpath_prefixes!
20433   else
20434     # Not in mixed or Windows style, start by that.
20435     new_path=`cmd //c echo $new_path`
20436 
20437   input_path="$new_path"
20438   # Check if we need to convert this using DOS-style short mode. If the path
20439   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20440   # take no chances and rewrite it.
20441   # Note: m4 eats our [], so we need to use [ and ] instead.
20442   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20443   if test "x$has_forbidden_chars" != x; then
20444     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20445     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20446   fi
20447 
20448     # Output is in $new_path
20449 
20450   windows_path="$new_path"
20451   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20452     unix_path=`$CYGPATH -u "$windows_path"`
20453     new_path="$unix_path"
20454   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20455     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20456     new_path="$unix_path"
20457   fi
20458 
20459     # remove trailing .exe if any
20460     new_path="${new_path/%.exe/}"
20461 
20462     # Save the first 10 bytes of this path to the storage, so fixpath can work.
20463     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20464   fi
20465 
20466   else
20467     # We're on a posix platform. Hooray! :)
20468     # First separate the path from the arguments. This will split at the first
20469     # space.
20470     complete="$CXX"
20471     path="${complete%% *}"
20472     tmp="$complete EOL"
20473     arguments="${tmp#* }"
20474 
20475     # Cannot rely on the command "which" here since it doesn't always work.
20476     is_absolute_path=`$ECHO "$path" | $GREP ^/`
20477     if test -z "$is_absolute_path"; then
20478       # Path to executable is not absolute. Find it.
20479       IFS_save="$IFS"
20480       IFS=:
20481       for p in $PATH; do
20482         if test -f "$p/$path" && test -x "$p/$path"; then
20483           new_path="$p/$path"
20484           break
20485         fi
20486       done
20487       IFS="$IFS_save"
20488     else
20489       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
20490 $as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
20491       new_path="$path"
20492     fi
20493 
20494     if test "x$new_path" = x; then
20495         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20496 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20497         has_space=`$ECHO "$complete" | $GREP " "`
20498         if test "x$has_space" != x; then
20499           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20500 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20501         fi
20502         as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20503       fi
20504   fi
20505 
20506       # Now join together the path and the arguments once again
20507       if test "x$arguments" != xEOL; then
20508         new_complete="$new_path ${arguments% *}"
20509       else
20510         new_complete="$new_path"
20511       fi
20512 
20513   if test "x$complete" != "x$new_complete"; then
20514       CXX="$new_complete"
20515       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
20516 $as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
20517     fi
20518 
20519   { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
20520 $as_echo_n "checking resolved symbolic links for CXX... " >&6; }
20521   TEST_COMPILER="$CXX"
20522 
20523     if test "x$OPENJDK_BUILD_OS" != xwindows; then
20524         # Follow a chain of symbolic links. Use readlink
20525         # where it exists, else fall back to horribly
20526         # complicated shell code.
20527         if test "x$READLINK_TESTED" != yes; then
20528             # On MacOSX there is a readlink tool with a different
20529             # purpose than the GNU readlink tool. Check the found readlink.
20530             ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20531             if test "x$ISGNU" = x; then
20532                  # A readlink that we do not know how to use.
20533                  # Are there other non-GNU readlinks out there?
20534                  READLINK_TESTED=yes
20535                  READLINK=
20536             fi
20537         fi
20538 
20539         if test "x$READLINK" != x; then
20540             TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
20541         else
20542             # Save the current directory for restoring afterwards
20543             STARTDIR=$PWD
20544             COUNTER=0
20545             sym_link_dir=`$DIRNAME $TEST_COMPILER`
20546             sym_link_file=`$BASENAME $TEST_COMPILER`
20547             # Use the system pwd and not the shell builtin to resolve directory symlinks
20548             cd $sym_link_dir
20549             cd `$THEPWDCMD`
20550             sym_link_dir=`$THEPWDCMD`
20551             # Resolve file symlinks
20552             while test $COUNTER -lt 20; do
20553                 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20554                 if test "x$ISLINK" == x; then
20555                     # This is not a symbolic link! We are done!
20556                     break
20557                 fi
20558                 # Again resolve directory symlinks since the target of the just found
20559                 # link could be in a different directory
20560                 cd `$DIRNAME $ISLINK`
20561                 sym_link_dir=`$THEPWDCMD`
20562                 sym_link_file=`$BASENAME $ISLINK`
20563                 let COUNTER=COUNTER+1
20564             done
20565             cd $STARTDIR
20566             TEST_COMPILER=$sym_link_dir/$sym_link_file
20567         fi
20568     fi
20569 
20570   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
20571 $as_echo "$TEST_COMPILER" >&6; }
20572   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
20573 $as_echo_n "checking if CXX is disguised ccache... " >&6; }
20574 
20575   COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
20576   if test "x$COMPILER_BASENAME" = "xccache"; then
20577     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
20578 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
20579     # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
20580     # We want to control ccache invocation ourselves, so ignore this cc and try
20581     # searching again.
20582 
20583     # Remove the path to the fake ccache cc from the PATH
20584     RETRY_COMPILER_SAVED_PATH="$PATH"
20585     COMPILER_DIRNAME=`$DIRNAME $CXX`
20586     PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
20587 
20588     # Try again looking for our compiler
20589     if test -n "$ac_tool_prefix"; then
20590   for ac_prog in $COMPILER_CHECK_LIST
20591   do
20592     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20593 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20594 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20595 $as_echo_n "checking for $ac_word... " >&6; }
20596 if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
20597   $as_echo_n "(cached) " >&6
20598 else
20599   if test -n "$PROPER_COMPILER_CXX"; then
20600   ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
20601 else
20602 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20603 for as_dir in $PATH
20604 do
20605   IFS=$as_save_IFS
20606   test -z "$as_dir" && as_dir=.
20607     for ac_exec_ext in '' $ac_executable_extensions; do
20608   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20609     ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
20610     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20611     break 2
20612   fi
20613 done
20614   done
20615 IFS=$as_save_IFS
20616 
20617 fi
20618 fi
20619 PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
20620 if test -n "$PROPER_COMPILER_CXX"; then
20621   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
20622 $as_echo "$PROPER_COMPILER_CXX" >&6; }
20623 else
20624   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20625 $as_echo "no" >&6; }
20626 fi
20627 
20628 
20629     test -n "$PROPER_COMPILER_CXX" && break
20630   done
20631 fi
20632 if test -z "$PROPER_COMPILER_CXX"; then
20633   ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
20634   for ac_prog in $COMPILER_CHECK_LIST
20635 do
20636   # Extract the first word of "$ac_prog", so it can be a program name with args.
20637 set dummy $ac_prog; ac_word=$2
20638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20639 $as_echo_n "checking for $ac_word... " >&6; }
20640 if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
20641   $as_echo_n "(cached) " >&6
20642 else
20643   if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20644   ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
20645 else
20646 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20647 for as_dir in $PATH
20648 do
20649   IFS=$as_save_IFS
20650   test -z "$as_dir" && as_dir=.
20651     for ac_exec_ext in '' $ac_executable_extensions; do
20652   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20653     ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
20654     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20655     break 2
20656   fi
20657 done
20658   done
20659 IFS=$as_save_IFS
20660 
20661 fi
20662 fi
20663 ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
20664 if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20665   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
20666 $as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
20667 else
20668   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20669 $as_echo "no" >&6; }
20670 fi
20671 
20672 
20673   test -n "$ac_ct_PROPER_COMPILER_CXX" && break
20674 done
20675 
20676   if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
20677     PROPER_COMPILER_CXX=""
20678   else
20679     case $cross_compiling:$ac_tool_warned in
20680 yes:)
20681 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20682 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20683 ac_tool_warned=yes ;;
20684 esac
20685     PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
20686   fi
20687 fi
20688 
20689 
20690   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20691 
20692   # First separate the path from the arguments. This will split at the first
20693   # space.
20694   complete="$PROPER_COMPILER_CXX"
20695   path="${complete%% *}"
20696   tmp="$complete EOL"
20697   arguments="${tmp#* }"
20698 
20699   # Input might be given as Windows format, start by converting to
20700   # unix format.
20701   new_path=`$CYGPATH -u "$path"`
20702 
20703   # Now try to locate executable using which
20704   new_path=`$WHICH "$new_path" 2> /dev/null`
20705   # bat and cmd files are not always considered executable in cygwin causing which
20706   # to not find them
20707   if test "x$new_path" = x \
20708            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20709            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20710     new_path=`$CYGPATH -u "$path"`
20711   fi
20712   if test "x$new_path" = x; then
20713     # Oops. Which didn't find the executable.
20714     # The splitting of arguments from the executable at a space might have been incorrect,
20715     # since paths with space are more likely in Windows. Give it another try with the whole
20716     # argument.
20717     path="$complete"
20718     arguments="EOL"
20719     new_path=`$CYGPATH -u "$path"`
20720     new_path=`$WHICH "$new_path" 2> /dev/null`
20721     # bat and cmd files are not always considered executable in cygwin causing which
20722     # to not find them
20723     if test "x$new_path" = x \
20724              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20725              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20726       new_path=`$CYGPATH -u "$path"`
20727     fi
20728     if test "x$new_path" = x; then
20729       # It's still not found. Now this is an unrecoverable error.
20730       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20731 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20732       has_space=`$ECHO "$complete" | $GREP " "`
20733       if test "x$has_space" != x; then
20734         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20735 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20736       fi
20737       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20738     fi
20739   fi
20740 
20741   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20742   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20743   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20744   # "foo.exe" is OK but "foo" is an error.
20745   #
20746   # This test is therefore slightly more accurate than "test -f" to check for file precense.
20747   # It is also a way to make sure we got the proper file name for the real test later on.
20748   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20749   if test "x$test_shortpath" = x; then
20750     # Short path failed, file does not exist as specified.
20751     # Try adding .exe or .cmd
20752     if test -f "${new_path}.exe"; then
20753        input_to_shortpath="${new_path}.exe"
20754     elif test -f "${new_path}.cmd"; then
20755        input_to_shortpath="${new_path}.cmd"
20756     else
20757       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
20758 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
20759       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20760 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20761       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20762     fi
20763   else
20764     input_to_shortpath="$new_path"
20765   fi
20766 
20767   # Call helper function which possibly converts this using DOS-style short mode.
20768   # If so, the updated path is stored in $new_path.
20769   new_path="$input_to_shortpath"
20770 
20771   input_path="$input_to_shortpath"
20772   # Check if we need to convert this using DOS-style short mode. If the path
20773   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20774   # take no chances and rewrite it.
20775   # Note: m4 eats our [], so we need to use [ and ] instead.
20776   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20777   if test "x$has_forbidden_chars" != x; then
20778     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20779     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20780     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20781     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20782       # Going to short mode and back again did indeed matter. Since short mode is
20783       # case insensitive, let's make it lowercase to improve readability.
20784       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20785       # Now convert it back to Unix-stile (cygpath)
20786       input_path=`$CYGPATH -u "$shortmode_path"`
20787       new_path="$input_path"
20788     fi
20789   fi
20790 
20791   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20792   if test "x$test_cygdrive_prefix" = x; then
20793     # As a simple fix, exclude /usr/bin since it's not a real path.
20794     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20795       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20796       # a path prefixed by /cygdrive for fixpath to work.
20797       new_path="$CYGWIN_ROOT_PATH$input_path"
20798     fi
20799   fi
20800 
20801   # remove trailing .exe if any
20802   new_path="${new_path/%.exe/}"
20803 
20804   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20805 
20806   # First separate the path from the arguments. This will split at the first
20807   # space.
20808   complete="$PROPER_COMPILER_CXX"
20809   path="${complete%% *}"
20810   tmp="$complete EOL"
20811   arguments="${tmp#* }"
20812 
20813   # Input might be given as Windows format, start by converting to
20814   # unix format.
20815   new_path="$path"
20816 
20817   windows_path="$new_path"
20818   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20819     unix_path=`$CYGPATH -u "$windows_path"`
20820     new_path="$unix_path"
20821   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20822     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20823     new_path="$unix_path"
20824   fi
20825 
20826 
20827   # Now try to locate executable using which
20828   new_path=`$WHICH "$new_path" 2> /dev/null`
20829 
20830   if test "x$new_path" = x; then
20831     # Oops. Which didn't find the executable.
20832     # The splitting of arguments from the executable at a space might have been incorrect,
20833     # since paths with space are more likely in Windows. Give it another try with the whole
20834     # argument.
20835     path="$complete"
20836     arguments="EOL"
20837     new_path="$path"
20838 
20839   windows_path="$new_path"
20840   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20841     unix_path=`$CYGPATH -u "$windows_path"`
20842     new_path="$unix_path"
20843   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20844     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20845     new_path="$unix_path"
20846   fi
20847 
20848 
20849     new_path=`$WHICH "$new_path" 2> /dev/null`
20850 
20851     if test "x$new_path" = x; then
20852       # It's still not found. Now this is an unrecoverable error.
20853       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20854 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20855       has_space=`$ECHO "$complete" | $GREP " "`
20856       if test "x$has_space" != x; then
20857         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20858 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20859       fi
20860       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20861     fi
20862   fi
20863 
20864   # Now new_path has a complete unix path to the binary
20865   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20866     # Keep paths in /bin as-is, but remove trailing .exe if any
20867     new_path="${new_path/%.exe/}"
20868     # Do not save /bin paths to all_fixpath_prefixes!
20869   else
20870     # Not in mixed or Windows style, start by that.
20871     new_path=`cmd //c echo $new_path`
20872 
20873   input_path="$new_path"
20874   # Check if we need to convert this using DOS-style short mode. If the path
20875   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20876   # take no chances and rewrite it.
20877   # Note: m4 eats our [], so we need to use [ and ] instead.
20878   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20879   if test "x$has_forbidden_chars" != x; then
20880     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20881     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20882   fi
20883 
20884     # Output is in $new_path
20885 
20886   windows_path="$new_path"
20887   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20888     unix_path=`$CYGPATH -u "$windows_path"`
20889     new_path="$unix_path"
20890   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20891     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20892     new_path="$unix_path"
20893   fi
20894 
20895     # remove trailing .exe if any
20896     new_path="${new_path/%.exe/}"
20897 
20898     # Save the first 10 bytes of this path to the storage, so fixpath can work.
20899     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20900   fi
20901 
20902   else
20903     # We're on a posix platform. Hooray! :)
20904     # First separate the path from the arguments. This will split at the first
20905     # space.
20906     complete="$PROPER_COMPILER_CXX"
20907     path="${complete%% *}"
20908     tmp="$complete EOL"
20909     arguments="${tmp#* }"
20910 
20911     # Cannot rely on the command "which" here since it doesn't always work.
20912     is_absolute_path=`$ECHO "$path" | $GREP ^/`
20913     if test -z "$is_absolute_path"; then
20914       # Path to executable is not absolute. Find it.
20915       IFS_save="$IFS"
20916       IFS=:
20917       for p in $PATH; do
20918         if test -f "$p/$path" && test -x "$p/$path"; then
20919           new_path="$p/$path"
20920           break
20921         fi
20922       done
20923       IFS="$IFS_save"
20924     else
20925       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
20926 $as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
20927       new_path="$path"
20928     fi
20929 
20930     if test "x$new_path" = x; then
20931         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20932 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20933         has_space=`$ECHO "$complete" | $GREP " "`
20934         if test "x$has_space" != x; then
20935           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20936 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20937         fi
20938         as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20939       fi
20940   fi
20941 
20942       # Now join together the path and the arguments once again
20943       if test "x$arguments" != xEOL; then
20944         new_complete="$new_path ${arguments% *}"
20945       else
20946         new_complete="$new_path"
20947       fi
20948 
20949   if test "x$complete" != "x$new_complete"; then
20950       PROPER_COMPILER_CXX="$new_complete"
20951       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
20952 $as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
20953     fi
20954 
20955     PATH="$RETRY_COMPILER_SAVED_PATH"
20956 
20957     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
20958 $as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
20959 
20960     if test "x$OPENJDK_BUILD_OS" != xwindows; then
20961         # Follow a chain of symbolic links. Use readlink
20962         # where it exists, else fall back to horribly
20963         # complicated shell code.
20964         if test "x$READLINK_TESTED" != yes; then
20965             # On MacOSX there is a readlink tool with a different
20966             # purpose than the GNU readlink tool. Check the found readlink.
20967             ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20968             if test "x$ISGNU" = x; then
20969                  # A readlink that we do not know how to use.
20970                  # Are there other non-GNU readlinks out there?
20971                  READLINK_TESTED=yes
20972                  READLINK=
20973             fi
20974         fi
20975 
20976         if test "x$READLINK" != x; then
20977             PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
20978         else
20979             # Save the current directory for restoring afterwards
20980             STARTDIR=$PWD
20981             COUNTER=0
20982             sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
20983             sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
20984             # Use the system pwd and not the shell builtin to resolve directory symlinks
20985             cd $sym_link_dir
20986             cd `$THEPWDCMD`
20987             sym_link_dir=`$THEPWDCMD`
20988             # Resolve file symlinks
20989             while test $COUNTER -lt 20; do
20990                 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20991                 if test "x$ISLINK" == x; then
20992                     # This is not a symbolic link! We are done!
20993                     break
20994                 fi
20995                 # Again resolve directory symlinks since the target of the just found
20996                 # link could be in a different directory
20997                 cd `$DIRNAME $ISLINK`
20998                 sym_link_dir=`$THEPWDCMD`
20999                 sym_link_file=`$BASENAME $ISLINK`
21000                 let COUNTER=COUNTER+1
21001             done
21002             cd $STARTDIR
21003             PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
21004         fi
21005     fi
21006 
21007     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21008 $as_echo "$PROPER_COMPILER_CXX" >&6; }
21009     CXX="$PROPER_COMPILER_CXX"
21010   else
21011     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
21012 $as_echo "no, keeping CXX" >&6; }
21013     CXX="$TEST_COMPILER"
21014   fi
21015 
21016   COMPILER=$CXX
21017   COMPILER_NAME=$COMPILER_NAME
21018 
21019   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
21020     # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
21021     COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
21022     $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
21023     if test $? -ne 0; then
21024       GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21025 
21026       { $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
21027 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
21028       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
21029 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
21030       as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21031     else
21032       COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
21033       COMPILER_VENDOR="Sun Studio"
21034     fi
21035   elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
21036     # First line typically looks something like:
21037     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
21038     COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
21039     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
21040     COMPILER_VENDOR="Microsoft CL.EXE"
21041     COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
21042     if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
21043       if test "x$COMPILER_CPU_TEST" != "x80x86"; then
21044         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
21045       fi
21046     elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
21047       if test "x$COMPILER_CPU_TEST" != "xx64"; then
21048         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
21049       fi
21050     fi
21051   else
21052     COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21053     # Check that this is likely to be GCC.
21054     $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
21055     if test $? -ne 0; then
21056       { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
21057 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
21058       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
21059 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
21060       as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21061     fi
21062 
21063     # First line typically looks something like:
21064     # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
21065     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
21066     COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
21067   fi
21068   # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
21069   CXX_VERSION="$COMPILER_VERSION"
21070   # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
21071   CXX_VENDOR="$COMPILER_VENDOR"
21072 
21073   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
21074 $as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
21075 
21076 
21077 # Now that we have resolved CXX ourself, let autoconf have it's go at it
21078 ac_ext=cpp
21079 ac_cpp='$CXXCPP $CPPFLAGS'
21080 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21081 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21082 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21083 if test -z "$CXX"; then
21084   if test -n "$CCC"; then
21085     CXX=$CCC
21086   else
21087     if test -n "$ac_tool_prefix"; then
21088   for ac_prog in $CXX
21089   do
21090     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21091 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21092 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21093 $as_echo_n "checking for $ac_word... " >&6; }
21094 if ${ac_cv_prog_CXX+:} false; then :
21095   $as_echo_n "(cached) " >&6
21096 else
21097   if test -n "$CXX"; then
21098   ac_cv_prog_CXX="$CXX" # Let the user override the test.
21099 else
21100 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21101 for as_dir in $PATH
21102 do
21103   IFS=$as_save_IFS
21104   test -z "$as_dir" && as_dir=.
21105     for ac_exec_ext in '' $ac_executable_extensions; do
21106   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21107     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
21108     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21109     break 2
21110   fi
21111 done
21112   done
21113 IFS=$as_save_IFS
21114 
21115 fi
21116 fi
21117 CXX=$ac_cv_prog_CXX
21118 if test -n "$CXX"; then
21119   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
21120 $as_echo "$CXX" >&6; }
21121 else
21122   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21123 $as_echo "no" >&6; }
21124 fi
21125 
21126 
21127     test -n "$CXX" && break
21128   done
21129 fi
21130 if test -z "$CXX"; then
21131   ac_ct_CXX=$CXX
21132   for ac_prog in $CXX
21133 do
21134   # Extract the first word of "$ac_prog", so it can be a program name with args.
21135 set dummy $ac_prog; ac_word=$2
21136 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21137 $as_echo_n "checking for $ac_word... " >&6; }
21138 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
21139   $as_echo_n "(cached) " >&6
21140 else
21141   if test -n "$ac_ct_CXX"; then
21142   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
21143 else
21144 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21145 for as_dir in $PATH
21146 do
21147   IFS=$as_save_IFS
21148   test -z "$as_dir" && as_dir=.
21149     for ac_exec_ext in '' $ac_executable_extensions; do
21150   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21151     ac_cv_prog_ac_ct_CXX="$ac_prog"
21152     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21153     break 2
21154   fi
21155 done
21156   done
21157 IFS=$as_save_IFS
21158 
21159 fi
21160 fi
21161 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
21162 if test -n "$ac_ct_CXX"; then
21163   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
21164 $as_echo "$ac_ct_CXX" >&6; }
21165 else
21166   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21167 $as_echo "no" >&6; }
21168 fi
21169 
21170 
21171   test -n "$ac_ct_CXX" && break
21172 done
21173 
21174   if test "x$ac_ct_CXX" = x; then
21175     CXX="g++"
21176   else
21177     case $cross_compiling:$ac_tool_warned in
21178 yes:)
21179 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21180 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21181 ac_tool_warned=yes ;;
21182 esac
21183     CXX=$ac_ct_CXX
21184   fi
21185 fi
21186 
21187   fi
21188 fi
21189 # Provide some information about the compiler.
21190 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
21191 set X $ac_compile
21192 ac_compiler=$2
21193 for ac_option in --version -v -V -qversion; do
21194   { { ac_try="$ac_compiler $ac_option >&5"
21195 case "(($ac_try" in
21196   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21197   *) ac_try_echo=$ac_try;;
21198 esac
21199 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21200 $as_echo "$ac_try_echo"; } >&5
21201   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21202   ac_status=$?
21203   if test -s conftest.err; then
21204     sed '10a\
21205 ... rest of stderr output deleted ...
21206          10q' conftest.err >conftest.er1
21207     cat conftest.er1 >&5
21208   fi
21209   rm -f conftest.er1 conftest.err
21210   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21211   test $ac_status = 0; }
21212 done
21213 
21214 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
21215 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
21216 if ${ac_cv_cxx_compiler_gnu+:} false; then :
21217   $as_echo_n "(cached) " >&6
21218 else
21219   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21220 /* end confdefs.h.  */
21221 
21222 int
21223 main ()
21224 {
21225 #ifndef __GNUC__
21226        choke me
21227 #endif
21228 
21229   ;
21230   return 0;
21231 }
21232 _ACEOF
21233 if ac_fn_cxx_try_compile "$LINENO"; then :
21234   ac_compiler_gnu=yes
21235 else
21236   ac_compiler_gnu=no
21237 fi
21238 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21239 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
21240 
21241 fi
21242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
21243 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
21244 if test $ac_compiler_gnu = yes; then
21245   GXX=yes
21246 else
21247   GXX=
21248 fi
21249 ac_test_CXXFLAGS=${CXXFLAGS+set}
21250 ac_save_CXXFLAGS=$CXXFLAGS
21251 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
21252 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
21253 if ${ac_cv_prog_cxx_g+:} false; then :
21254   $as_echo_n "(cached) " >&6
21255 else
21256   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
21257    ac_cxx_werror_flag=yes
21258    ac_cv_prog_cxx_g=no
21259    CXXFLAGS="-g"
21260    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21261 /* end confdefs.h.  */
21262 
21263 int
21264 main ()
21265 {
21266 
21267   ;
21268   return 0;
21269 }
21270 _ACEOF
21271 if ac_fn_cxx_try_compile "$LINENO"; then :
21272   ac_cv_prog_cxx_g=yes
21273 else
21274   CXXFLAGS=""
21275       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21276 /* end confdefs.h.  */
21277 
21278 int
21279 main ()
21280 {
21281 
21282   ;
21283   return 0;
21284 }
21285 _ACEOF
21286 if ac_fn_cxx_try_compile "$LINENO"; then :
21287 
21288 else
21289   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21290          CXXFLAGS="-g"
21291          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21292 /* end confdefs.h.  */
21293 
21294 int
21295 main ()
21296 {
21297 
21298   ;
21299   return 0;
21300 }
21301 _ACEOF
21302 if ac_fn_cxx_try_compile "$LINENO"; then :
21303   ac_cv_prog_cxx_g=yes
21304 fi
21305 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21306 fi
21307 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21308 fi
21309 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21310    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21311 fi
21312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
21313 $as_echo "$ac_cv_prog_cxx_g" >&6; }
21314 if test "$ac_test_CXXFLAGS" = set; then
21315   CXXFLAGS=$ac_save_CXXFLAGS
21316 elif test $ac_cv_prog_cxx_g = yes; then
21317   if test "$GXX" = yes; then
21318     CXXFLAGS="-g -O2"
21319   else
21320     CXXFLAGS="-g"
21321   fi
21322 else
21323   if test "$GXX" = yes; then
21324     CXXFLAGS="-O2"
21325   else
21326     CXXFLAGS=
21327   fi
21328 fi
21329 ac_ext=cpp
21330 ac_cpp='$CXXCPP $CPPFLAGS'
21331 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21332 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21333 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21334 
21335 
21336 ### Locate other tools
21337 
21338 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21339     ac_ext=m
21340 ac_cpp='$OBJCPP $CPPFLAGS'
21341 ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21342 ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21343 ac_compiler_gnu=$ac_cv_objc_compiler_gnu
21344 if test -n "$ac_tool_prefix"; then
21345   for ac_prog in gcc objcc objc cc CC
21346   do
21347     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21348 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21350 $as_echo_n "checking for $ac_word... " >&6; }
21351 if ${ac_cv_prog_OBJC+:} false; then :
21352   $as_echo_n "(cached) " >&6
21353 else
21354   if test -n "$OBJC"; then
21355   ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
21356 else
21357 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21358 for as_dir in $PATH
21359 do
21360   IFS=$as_save_IFS
21361   test -z "$as_dir" && as_dir=.
21362     for ac_exec_ext in '' $ac_executable_extensions; do
21363   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21364     ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
21365     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21366     break 2
21367   fi
21368 done
21369   done
21370 IFS=$as_save_IFS
21371 
21372 fi
21373 fi
21374 OBJC=$ac_cv_prog_OBJC
21375 if test -n "$OBJC"; then
21376   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
21377 $as_echo "$OBJC" >&6; }
21378 else
21379   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21380 $as_echo "no" >&6; }
21381 fi
21382 
21383 
21384     test -n "$OBJC" && break
21385   done
21386 fi
21387 if test -z "$OBJC"; then
21388   ac_ct_OBJC=$OBJC
21389   for ac_prog in gcc objcc objc cc CC
21390 do
21391   # Extract the first word of "$ac_prog", so it can be a program name with args.
21392 set dummy $ac_prog; ac_word=$2
21393 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21394 $as_echo_n "checking for $ac_word... " >&6; }
21395 if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
21396   $as_echo_n "(cached) " >&6
21397 else
21398   if test -n "$ac_ct_OBJC"; then
21399   ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
21400 else
21401 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21402 for as_dir in $PATH
21403 do
21404   IFS=$as_save_IFS
21405   test -z "$as_dir" && as_dir=.
21406     for ac_exec_ext in '' $ac_executable_extensions; do
21407   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21408     ac_cv_prog_ac_ct_OBJC="$ac_prog"
21409     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21410     break 2
21411   fi
21412 done
21413   done
21414 IFS=$as_save_IFS
21415 
21416 fi
21417 fi
21418 ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
21419 if test -n "$ac_ct_OBJC"; then
21420   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
21421 $as_echo "$ac_ct_OBJC" >&6; }
21422 else
21423   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21424 $as_echo "no" >&6; }
21425 fi
21426 
21427 
21428   test -n "$ac_ct_OBJC" && break
21429 done
21430 
21431   if test "x$ac_ct_OBJC" = x; then
21432     OBJC="gcc"
21433   else
21434     case $cross_compiling:$ac_tool_warned in
21435 yes:)
21436 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21437 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21438 ac_tool_warned=yes ;;
21439 esac
21440     OBJC=$ac_ct_OBJC
21441   fi
21442 fi
21443 
21444 # Provide some information about the compiler.
21445 $as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
21446 set X $ac_compile
21447 ac_compiler=$2
21448 for ac_option in --version -v -V -qversion; do
21449   { { ac_try="$ac_compiler $ac_option >&5"
21450 case "(($ac_try" in
21451   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21452   *) ac_try_echo=$ac_try;;
21453 esac
21454 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21455 $as_echo "$ac_try_echo"; } >&5
21456   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21457   ac_status=$?
21458   if test -s conftest.err; then
21459     sed '10a\
21460 ... rest of stderr output deleted ...
21461          10q' conftest.err >conftest.er1
21462     cat conftest.er1 >&5
21463   fi
21464   rm -f conftest.er1 conftest.err
21465   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21466   test $ac_status = 0; }
21467 done
21468 
21469 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
21470 $as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
21471 if ${ac_cv_objc_compiler_gnu+:} false; then :
21472   $as_echo_n "(cached) " >&6
21473 else
21474   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21475 /* end confdefs.h.  */
21476 
21477 int
21478 main ()
21479 {
21480 #ifndef __GNUC__
21481        choke me
21482 #endif
21483 
21484   ;
21485   return 0;
21486 }
21487 _ACEOF
21488 if ac_fn_objc_try_compile "$LINENO"; then :
21489   ac_compiler_gnu=yes
21490 else
21491   ac_compiler_gnu=no
21492 fi
21493 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21494 ac_cv_objc_compiler_gnu=$ac_compiler_gnu
21495 
21496 fi
21497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
21498 $as_echo "$ac_cv_objc_compiler_gnu" >&6; }
21499 if test $ac_compiler_gnu = yes; then
21500   GOBJC=yes
21501 else
21502   GOBJC=
21503 fi
21504 ac_test_OBJCFLAGS=${OBJCFLAGS+set}
21505 ac_save_OBJCFLAGS=$OBJCFLAGS
21506 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
21507 $as_echo_n "checking whether $OBJC accepts -g... " >&6; }
21508 if ${ac_cv_prog_objc_g+:} false; then :
21509   $as_echo_n "(cached) " >&6
21510 else
21511   ac_save_objc_werror_flag=$ac_objc_werror_flag
21512    ac_objc_werror_flag=yes
21513    ac_cv_prog_objc_g=no
21514    OBJCFLAGS="-g"
21515    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21516 /* end confdefs.h.  */
21517 
21518 int
21519 main ()
21520 {
21521 
21522   ;
21523   return 0;
21524 }
21525 _ACEOF
21526 if ac_fn_objc_try_compile "$LINENO"; then :
21527   ac_cv_prog_objc_g=yes
21528 else
21529   OBJCFLAGS=""
21530       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21531 /* end confdefs.h.  */
21532 
21533 int
21534 main ()
21535 {
21536 
21537   ;
21538   return 0;
21539 }
21540 _ACEOF
21541 if ac_fn_objc_try_compile "$LINENO"; then :
21542 
21543 else
21544   ac_objc_werror_flag=$ac_save_objc_werror_flag
21545          OBJCFLAGS="-g"
21546          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21547 /* end confdefs.h.  */
21548 
21549 int
21550 main ()
21551 {
21552 
21553   ;
21554   return 0;
21555 }
21556 _ACEOF
21557 if ac_fn_objc_try_compile "$LINENO"; then :
21558   ac_cv_prog_objc_g=yes
21559 fi
21560 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21561 fi
21562 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21563 fi
21564 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21565    ac_objc_werror_flag=$ac_save_objc_werror_flag
21566 fi
21567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
21568 $as_echo "$ac_cv_prog_objc_g" >&6; }
21569 if test "$ac_test_OBJCFLAGS" = set; then
21570   OBJCFLAGS=$ac_save_OBJCFLAGS
21571 elif test $ac_cv_prog_objc_g = yes; then
21572   if test "$GOBJC" = yes; then
21573     OBJCFLAGS="-g -O2"
21574   else
21575     OBJCFLAGS="-g"
21576   fi
21577 else
21578   if test "$GOBJC" = yes; then
21579     OBJCFLAGS="-O2"
21580   else
21581     OBJCFLAGS=
21582   fi
21583 fi
21584 ac_ext=cpp
21585 ac_cpp='$CXXCPP $CPPFLAGS'
21586 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21587 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21588 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21589 
21590 
21591   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21592 
21593   # First separate the path from the arguments. This will split at the first
21594   # space.
21595   complete="$OBJC"
21596   path="${complete%% *}"
21597   tmp="$complete EOL"
21598   arguments="${tmp#* }"
21599 
21600   # Input might be given as Windows format, start by converting to
21601   # unix format.
21602   new_path=`$CYGPATH -u "$path"`
21603 
21604   # Now try to locate executable using which
21605   new_path=`$WHICH "$new_path" 2> /dev/null`
21606   # bat and cmd files are not always considered executable in cygwin causing which
21607   # to not find them
21608   if test "x$new_path" = x \
21609            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21610            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21611     new_path=`$CYGPATH -u "$path"`
21612   fi
21613   if test "x$new_path" = x; then
21614     # Oops. Which didn't find the executable.
21615     # The splitting of arguments from the executable at a space might have been incorrect,
21616     # since paths with space are more likely in Windows. Give it another try with the whole
21617     # argument.
21618     path="$complete"
21619     arguments="EOL"
21620     new_path=`$CYGPATH -u "$path"`
21621     new_path=`$WHICH "$new_path" 2> /dev/null`
21622     # bat and cmd files are not always considered executable in cygwin causing which
21623     # to not find them
21624     if test "x$new_path" = x \
21625              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21626              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21627       new_path=`$CYGPATH -u "$path"`
21628     fi
21629     if test "x$new_path" = x; then
21630       # It's still not found. Now this is an unrecoverable error.
21631       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21632 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21633       has_space=`$ECHO "$complete" | $GREP " "`
21634       if test "x$has_space" != x; then
21635         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21636 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21637       fi
21638       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21639     fi
21640   fi
21641 
21642   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21643   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21644   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21645   # "foo.exe" is OK but "foo" is an error.
21646   #
21647   # This test is therefore slightly more accurate than "test -f" to check for file precense.
21648   # It is also a way to make sure we got the proper file name for the real test later on.
21649   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21650   if test "x$test_shortpath" = x; then
21651     # Short path failed, file does not exist as specified.
21652     # Try adding .exe or .cmd
21653     if test -f "${new_path}.exe"; then
21654        input_to_shortpath="${new_path}.exe"
21655     elif test -f "${new_path}.cmd"; then
21656        input_to_shortpath="${new_path}.cmd"
21657     else
21658       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
21659 $as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
21660       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21661 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21662       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21663     fi
21664   else
21665     input_to_shortpath="$new_path"
21666   fi
21667 
21668   # Call helper function which possibly converts this using DOS-style short mode.
21669   # If so, the updated path is stored in $new_path.
21670   new_path="$input_to_shortpath"
21671 
21672   input_path="$input_to_shortpath"
21673   # Check if we need to convert this using DOS-style short mode. If the path
21674   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21675   # take no chances and rewrite it.
21676   # Note: m4 eats our [], so we need to use [ and ] instead.
21677   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21678   if test "x$has_forbidden_chars" != x; then
21679     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21680     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21681     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21682     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21683       # Going to short mode and back again did indeed matter. Since short mode is
21684       # case insensitive, let's make it lowercase to improve readability.
21685       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21686       # Now convert it back to Unix-stile (cygpath)
21687       input_path=`$CYGPATH -u "$shortmode_path"`
21688       new_path="$input_path"
21689     fi
21690   fi
21691 
21692   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21693   if test "x$test_cygdrive_prefix" = x; then
21694     # As a simple fix, exclude /usr/bin since it's not a real path.
21695     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21696       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21697       # a path prefixed by /cygdrive for fixpath to work.
21698       new_path="$CYGWIN_ROOT_PATH$input_path"
21699     fi
21700   fi
21701 
21702   # remove trailing .exe if any
21703   new_path="${new_path/%.exe/}"
21704 
21705   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21706 
21707   # First separate the path from the arguments. This will split at the first
21708   # space.
21709   complete="$OBJC"
21710   path="${complete%% *}"
21711   tmp="$complete EOL"
21712   arguments="${tmp#* }"
21713 
21714   # Input might be given as Windows format, start by converting to
21715   # unix format.
21716   new_path="$path"
21717 
21718   windows_path="$new_path"
21719   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21720     unix_path=`$CYGPATH -u "$windows_path"`
21721     new_path="$unix_path"
21722   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21723     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21724     new_path="$unix_path"
21725   fi
21726 
21727 
21728   # Now try to locate executable using which
21729   new_path=`$WHICH "$new_path" 2> /dev/null`
21730 
21731   if test "x$new_path" = x; then
21732     # Oops. Which didn't find the executable.
21733     # The splitting of arguments from the executable at a space might have been incorrect,
21734     # since paths with space are more likely in Windows. Give it another try with the whole
21735     # argument.
21736     path="$complete"
21737     arguments="EOL"
21738     new_path="$path"
21739 
21740   windows_path="$new_path"
21741   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21742     unix_path=`$CYGPATH -u "$windows_path"`
21743     new_path="$unix_path"
21744   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21745     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21746     new_path="$unix_path"
21747   fi
21748 
21749 
21750     new_path=`$WHICH "$new_path" 2> /dev/null`
21751 
21752     if test "x$new_path" = x; then
21753       # It's still not found. Now this is an unrecoverable error.
21754       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21755 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21756       has_space=`$ECHO "$complete" | $GREP " "`
21757       if test "x$has_space" != x; then
21758         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21759 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21760       fi
21761       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21762     fi
21763   fi
21764 
21765   # Now new_path has a complete unix path to the binary
21766   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21767     # Keep paths in /bin as-is, but remove trailing .exe if any
21768     new_path="${new_path/%.exe/}"
21769     # Do not save /bin paths to all_fixpath_prefixes!
21770   else
21771     # Not in mixed or Windows style, start by that.
21772     new_path=`cmd //c echo $new_path`
21773 
21774   input_path="$new_path"
21775   # Check if we need to convert this using DOS-style short mode. If the path
21776   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21777   # take no chances and rewrite it.
21778   # Note: m4 eats our [], so we need to use [ and ] instead.
21779   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21780   if test "x$has_forbidden_chars" != x; then
21781     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21782     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21783   fi
21784 
21785     # Output is in $new_path
21786 
21787   windows_path="$new_path"
21788   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21789     unix_path=`$CYGPATH -u "$windows_path"`
21790     new_path="$unix_path"
21791   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21792     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21793     new_path="$unix_path"
21794   fi
21795 
21796     # remove trailing .exe if any
21797     new_path="${new_path/%.exe/}"
21798 
21799     # Save the first 10 bytes of this path to the storage, so fixpath can work.
21800     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21801   fi
21802 
21803   else
21804     # We're on a posix platform. Hooray! :)
21805     # First separate the path from the arguments. This will split at the first
21806     # space.
21807     complete="$OBJC"
21808     path="${complete%% *}"
21809     tmp="$complete EOL"
21810     arguments="${tmp#* }"
21811 
21812     # Cannot rely on the command "which" here since it doesn't always work.
21813     is_absolute_path=`$ECHO "$path" | $GREP ^/`
21814     if test -z "$is_absolute_path"; then
21815       # Path to executable is not absolute. Find it.
21816       IFS_save="$IFS"
21817       IFS=:
21818       for p in $PATH; do
21819         if test -f "$p/$path" && test -x "$p/$path"; then
21820           new_path="$p/$path"
21821           break
21822         fi
21823       done
21824       IFS="$IFS_save"
21825     else
21826       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
21827 $as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
21828       new_path="$path"
21829     fi
21830 
21831     if test "x$new_path" = x; then
21832         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21833 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21834         has_space=`$ECHO "$complete" | $GREP " "`
21835         if test "x$has_space" != x; then
21836           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21837 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21838         fi
21839         as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21840       fi
21841   fi
21842 
21843       # Now join together the path and the arguments once again
21844       if test "x$arguments" != xEOL; then
21845         new_complete="$new_path ${arguments% *}"
21846       else
21847         new_complete="$new_path"
21848       fi
21849 
21850   if test "x$complete" != "x$new_complete"; then
21851       OBJC="$new_complete"
21852       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
21853 $as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
21854     fi
21855 
21856 else
21857     OBJC=
21858 fi
21859 
21860 # Restore the flags to the user specified values.
21861 # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
21862 CFLAGS="$ORG_CFLAGS"
21863 CXXFLAGS="$ORG_CXXFLAGS"
21864 OBJCFLAGS="$ORG_OBJCFLAGS"
21865 
21866 LD="$CC"
21867 LDEXE="$CC"
21868 LDCXX="$CXX"
21869 LDEXECXX="$CXX"
21870 
21871 # LDEXE is the linker to use, when creating executables.
21872 
21873 # Linking C++ libraries.
21874 
21875 # Linking C++ executables.
21876 
21877 
21878 if test "x$OPENJDK_TARGET_OS" != xwindows; then
21879     if test -n "$ac_tool_prefix"; then
21880   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
21881 set dummy ${ac_tool_prefix}ar; ac_word=$2
21882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21883 $as_echo_n "checking for $ac_word... " >&6; }
21884 if ${ac_cv_prog_AR+:} false; then :
21885   $as_echo_n "(cached) " >&6
21886 else
21887   if test -n "$AR"; then
21888   ac_cv_prog_AR="$AR" # Let the user override the test.
21889 else
21890 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21891 for as_dir in $PATH
21892 do
21893   IFS=$as_save_IFS
21894   test -z "$as_dir" && as_dir=.
21895     for ac_exec_ext in '' $ac_executable_extensions; do
21896   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21897     ac_cv_prog_AR="${ac_tool_prefix}ar"
21898     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21899     break 2
21900   fi
21901 done
21902   done
21903 IFS=$as_save_IFS
21904 
21905 fi
21906 fi
21907 AR=$ac_cv_prog_AR
21908 if test -n "$AR"; then
21909   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
21910 $as_echo "$AR" >&6; }
21911 else
21912   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21913 $as_echo "no" >&6; }
21914 fi
21915 
21916 
21917 fi
21918 if test -z "$ac_cv_prog_AR"; then
21919   ac_ct_AR=$AR
21920   # Extract the first word of "ar", so it can be a program name with args.
21921 set dummy ar; ac_word=$2
21922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21923 $as_echo_n "checking for $ac_word... " >&6; }
21924 if ${ac_cv_prog_ac_ct_AR+:} false; then :
21925   $as_echo_n "(cached) " >&6
21926 else
21927   if test -n "$ac_ct_AR"; then
21928   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
21929 else
21930 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21931 for as_dir in $PATH
21932 do
21933   IFS=$as_save_IFS
21934   test -z "$as_dir" && as_dir=.
21935     for ac_exec_ext in '' $ac_executable_extensions; do
21936   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21937     ac_cv_prog_ac_ct_AR="ar"
21938     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21939     break 2
21940   fi
21941 done
21942   done
21943 IFS=$as_save_IFS
21944 
21945 fi
21946 fi
21947 ac_ct_AR=$ac_cv_prog_ac_ct_AR
21948 if test -n "$ac_ct_AR"; then
21949   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
21950 $as_echo "$ac_ct_AR" >&6; }
21951 else
21952   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21953 $as_echo "no" >&6; }
21954 fi
21955 
21956   if test "x$ac_ct_AR" = x; then
21957     AR=""
21958   else
21959     case $cross_compiling:$ac_tool_warned in
21960 yes:)
21961 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21962 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21963 ac_tool_warned=yes ;;
21964 esac
21965     AR=$ac_ct_AR
21966   fi
21967 else
21968   AR="$ac_cv_prog_AR"
21969 fi
21970 
21971 
21972   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21973 
21974   # First separate the path from the arguments. This will split at the first
21975   # space.
21976   complete="$AR"
21977   path="${complete%% *}"
21978   tmp="$complete EOL"
21979   arguments="${tmp#* }"
21980 
21981   # Input might be given as Windows format, start by converting to
21982   # unix format.
21983   new_path=`$CYGPATH -u "$path"`
21984 
21985   # Now try to locate executable using which
21986   new_path=`$WHICH "$new_path" 2> /dev/null`
21987   # bat and cmd files are not always considered executable in cygwin causing which
21988   # to not find them
21989   if test "x$new_path" = x \
21990            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21991            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21992     new_path=`$CYGPATH -u "$path"`
21993   fi
21994   if test "x$new_path" = x; then
21995     # Oops. Which didn't find the executable.
21996     # The splitting of arguments from the executable at a space might have been incorrect,
21997     # since paths with space are more likely in Windows. Give it another try with the whole
21998     # argument.
21999     path="$complete"
22000     arguments="EOL"
22001     new_path=`$CYGPATH -u "$path"`
22002     new_path=`$WHICH "$new_path" 2> /dev/null`
22003     # bat and cmd files are not always considered executable in cygwin causing which
22004     # to not find them
22005     if test "x$new_path" = x \
22006              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22007              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22008       new_path=`$CYGPATH -u "$path"`
22009     fi
22010     if test "x$new_path" = x; then
22011       # It's still not found. Now this is an unrecoverable error.
22012       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22013 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22014       has_space=`$ECHO "$complete" | $GREP " "`
22015       if test "x$has_space" != x; then
22016         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22017 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22018       fi
22019       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22020     fi
22021   fi
22022 
22023   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22024   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22025   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22026   # "foo.exe" is OK but "foo" is an error.
22027   #
22028   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22029   # It is also a way to make sure we got the proper file name for the real test later on.
22030   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22031   if test "x$test_shortpath" = x; then
22032     # Short path failed, file does not exist as specified.
22033     # Try adding .exe or .cmd
22034     if test -f "${new_path}.exe"; then
22035        input_to_shortpath="${new_path}.exe"
22036     elif test -f "${new_path}.cmd"; then
22037        input_to_shortpath="${new_path}.cmd"
22038     else
22039       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
22040 $as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
22041       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22042 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22043       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22044     fi
22045   else
22046     input_to_shortpath="$new_path"
22047   fi
22048 
22049   # Call helper function which possibly converts this using DOS-style short mode.
22050   # If so, the updated path is stored in $new_path.
22051   new_path="$input_to_shortpath"
22052 
22053   input_path="$input_to_shortpath"
22054   # Check if we need to convert this using DOS-style short mode. If the path
22055   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22056   # take no chances and rewrite it.
22057   # Note: m4 eats our [], so we need to use [ and ] instead.
22058   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22059   if test "x$has_forbidden_chars" != x; then
22060     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22061     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22062     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22063     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22064       # Going to short mode and back again did indeed matter. Since short mode is
22065       # case insensitive, let's make it lowercase to improve readability.
22066       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22067       # Now convert it back to Unix-stile (cygpath)
22068       input_path=`$CYGPATH -u "$shortmode_path"`
22069       new_path="$input_path"
22070     fi
22071   fi
22072 
22073   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22074   if test "x$test_cygdrive_prefix" = x; then
22075     # As a simple fix, exclude /usr/bin since it's not a real path.
22076     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22077       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22078       # a path prefixed by /cygdrive for fixpath to work.
22079       new_path="$CYGWIN_ROOT_PATH$input_path"
22080     fi
22081   fi
22082 
22083   # remove trailing .exe if any
22084   new_path="${new_path/%.exe/}"
22085 
22086   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22087 
22088   # First separate the path from the arguments. This will split at the first
22089   # space.
22090   complete="$AR"
22091   path="${complete%% *}"
22092   tmp="$complete EOL"
22093   arguments="${tmp#* }"
22094 
22095   # Input might be given as Windows format, start by converting to
22096   # unix format.
22097   new_path="$path"
22098 
22099   windows_path="$new_path"
22100   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22101     unix_path=`$CYGPATH -u "$windows_path"`
22102     new_path="$unix_path"
22103   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22104     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22105     new_path="$unix_path"
22106   fi
22107 
22108 
22109   # Now try to locate executable using which
22110   new_path=`$WHICH "$new_path" 2> /dev/null`
22111 
22112   if test "x$new_path" = x; then
22113     # Oops. Which didn't find the executable.
22114     # The splitting of arguments from the executable at a space might have been incorrect,
22115     # since paths with space are more likely in Windows. Give it another try with the whole
22116     # argument.
22117     path="$complete"
22118     arguments="EOL"
22119     new_path="$path"
22120 
22121   windows_path="$new_path"
22122   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22123     unix_path=`$CYGPATH -u "$windows_path"`
22124     new_path="$unix_path"
22125   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22126     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22127     new_path="$unix_path"
22128   fi
22129 
22130 
22131     new_path=`$WHICH "$new_path" 2> /dev/null`
22132 
22133     if test "x$new_path" = x; then
22134       # It's still not found. Now this is an unrecoverable error.
22135       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22136 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22137       has_space=`$ECHO "$complete" | $GREP " "`
22138       if test "x$has_space" != x; then
22139         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22140 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22141       fi
22142       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22143     fi
22144   fi
22145 
22146   # Now new_path has a complete unix path to the binary
22147   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22148     # Keep paths in /bin as-is, but remove trailing .exe if any
22149     new_path="${new_path/%.exe/}"
22150     # Do not save /bin paths to all_fixpath_prefixes!
22151   else
22152     # Not in mixed or Windows style, start by that.
22153     new_path=`cmd //c echo $new_path`
22154 
22155   input_path="$new_path"
22156   # Check if we need to convert this using DOS-style short mode. If the path
22157   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22158   # take no chances and rewrite it.
22159   # Note: m4 eats our [], so we need to use [ and ] instead.
22160   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22161   if test "x$has_forbidden_chars" != x; then
22162     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22163     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22164   fi
22165 
22166     # Output is in $new_path
22167 
22168   windows_path="$new_path"
22169   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22170     unix_path=`$CYGPATH -u "$windows_path"`
22171     new_path="$unix_path"
22172   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22173     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22174     new_path="$unix_path"
22175   fi
22176 
22177     # remove trailing .exe if any
22178     new_path="${new_path/%.exe/}"
22179 
22180     # Save the first 10 bytes of this path to the storage, so fixpath can work.
22181     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22182   fi
22183 
22184   else
22185     # We're on a posix platform. Hooray! :)
22186     # First separate the path from the arguments. This will split at the first
22187     # space.
22188     complete="$AR"
22189     path="${complete%% *}"
22190     tmp="$complete EOL"
22191     arguments="${tmp#* }"
22192 
22193     # Cannot rely on the command "which" here since it doesn't always work.
22194     is_absolute_path=`$ECHO "$path" | $GREP ^/`
22195     if test -z "$is_absolute_path"; then
22196       # Path to executable is not absolute. Find it.
22197       IFS_save="$IFS"
22198       IFS=:
22199       for p in $PATH; do
22200         if test -f "$p/$path" && test -x "$p/$path"; then
22201           new_path="$p/$path"
22202           break
22203         fi
22204       done
22205       IFS="$IFS_save"
22206     else
22207       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
22208 $as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
22209       new_path="$path"
22210     fi
22211 
22212     if test "x$new_path" = x; then
22213         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22214 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22215         has_space=`$ECHO "$complete" | $GREP " "`
22216         if test "x$has_space" != x; then
22217           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22218 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22219         fi
22220         as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22221       fi
22222   fi
22223 
22224       # Now join together the path and the arguments once again
22225       if test "x$arguments" != xEOL; then
22226         new_complete="$new_path ${arguments% *}"
22227       else
22228         new_complete="$new_path"
22229       fi
22230 
22231   if test "x$complete" != "x$new_complete"; then
22232       AR="$new_complete"
22233       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
22234 $as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
22235     fi
22236 
22237 fi
22238 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
22239     ARFLAGS="-r"
22240 else
22241     ARFLAGS=""
22242 fi
22243 
22244 
22245 # For hotspot, we need these in Windows mixed path; other platforms keep them the same
22246 HOTSPOT_CXX="$CXX"
22247 HOTSPOT_LD="$LD"
22248 
22249 
22250 
22251 COMPILER_NAME=gcc
22252 COMPILER_TYPE=CC
22253 if test "x$OPENJDK_TARGET_OS" = xwindows; then :
22254 
22255     # For now, assume that we are always compiling using cl.exe.
22256     CC_OUT_OPTION=-Fo
22257     EXE_OUT_OPTION=-out:
22258     LD_OUT_OPTION=-out:
22259     AR_OUT_OPTION=-out:
22260     # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
22261     # program for something completely different.
22262     # Extract the first word of "link", so it can be a program name with args.
22263 set dummy link; ac_word=$2
22264 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22265 $as_echo_n "checking for $ac_word... " >&6; }
22266 if ${ac_cv_prog_WINLD+:} false; then :
22267   $as_echo_n "(cached) " >&6
22268 else
22269   if test -n "$WINLD"; then
22270   ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
22271 else
22272   ac_prog_rejected=no
22273 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22274 for as_dir in $PATH
22275 do
22276   IFS=$as_save_IFS
22277   test -z "$as_dir" && as_dir=.
22278     for ac_exec_ext in '' $ac_executable_extensions; do
22279   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22280     if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
22281        ac_prog_rejected=yes
22282        continue
22283      fi
22284     ac_cv_prog_WINLD="link"
22285     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22286     break 2
22287   fi
22288 done
22289   done
22290 IFS=$as_save_IFS
22291 
22292 if test $ac_prog_rejected = yes; then
22293   # We found a bogon in the path, so make sure we never use it.
22294   set dummy $ac_cv_prog_WINLD
22295   shift
22296   if test $# != 0; then
22297     # We chose a different compiler from the bogus one.
22298     # However, it has the same basename, so the bogon will be chosen
22299     # first if we set WINLD to just the basename; use the full file name.
22300     shift
22301     ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
22302   fi
22303 fi
22304 fi
22305 fi
22306 WINLD=$ac_cv_prog_WINLD
22307 if test -n "$WINLD"; then
22308   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
22309 $as_echo "$WINLD" >&6; }
22310 else
22311   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22312 $as_echo "no" >&6; }
22313 fi
22314 
22315 
22316     # Since we must ignore the first found link, WINLD will contain
22317     # the full path to the link.exe program.
22318 
22319   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22320 
22321   # First separate the path from the arguments. This will split at the first
22322   # space.
22323   complete="$WINLD"
22324   path="${complete%% *}"
22325   tmp="$complete EOL"
22326   arguments="${tmp#* }"
22327 
22328   # Input might be given as Windows format, start by converting to
22329   # unix format.
22330   new_path=`$CYGPATH -u "$path"`
22331 
22332   # Now try to locate executable using which
22333   new_path=`$WHICH "$new_path" 2> /dev/null`
22334   # bat and cmd files are not always considered executable in cygwin causing which
22335   # to not find them
22336   if test "x$new_path" = x \
22337            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22338            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22339     new_path=`$CYGPATH -u "$path"`
22340   fi
22341   if test "x$new_path" = x; then
22342     # Oops. Which didn't find the executable.
22343     # The splitting of arguments from the executable at a space might have been incorrect,
22344     # since paths with space are more likely in Windows. Give it another try with the whole
22345     # argument.
22346     path="$complete"
22347     arguments="EOL"
22348     new_path=`$CYGPATH -u "$path"`
22349     new_path=`$WHICH "$new_path" 2> /dev/null`
22350     # bat and cmd files are not always considered executable in cygwin causing which
22351     # to not find them
22352     if test "x$new_path" = x \
22353              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22354              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22355       new_path=`$CYGPATH -u "$path"`
22356     fi
22357     if test "x$new_path" = x; then
22358       # It's still not found. Now this is an unrecoverable error.
22359       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22360 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22361       has_space=`$ECHO "$complete" | $GREP " "`
22362       if test "x$has_space" != x; then
22363         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22364 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22365       fi
22366       as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22367     fi
22368   fi
22369 
22370   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22371   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22372   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22373   # "foo.exe" is OK but "foo" is an error.
22374   #
22375   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22376   # It is also a way to make sure we got the proper file name for the real test later on.
22377   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22378   if test "x$test_shortpath" = x; then
22379     # Short path failed, file does not exist as specified.
22380     # Try adding .exe or .cmd
22381     if test -f "${new_path}.exe"; then
22382        input_to_shortpath="${new_path}.exe"
22383     elif test -f "${new_path}.cmd"; then
22384        input_to_shortpath="${new_path}.cmd"
22385     else
22386       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
22387 $as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
22388       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22389 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22390       as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22391     fi
22392   else
22393     input_to_shortpath="$new_path"
22394   fi
22395 
22396   # Call helper function which possibly converts this using DOS-style short mode.
22397   # If so, the updated path is stored in $new_path.
22398   new_path="$input_to_shortpath"
22399 
22400   input_path="$input_to_shortpath"
22401   # Check if we need to convert this using DOS-style short mode. If the path
22402   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22403   # take no chances and rewrite it.
22404   # Note: m4 eats our [], so we need to use [ and ] instead.
22405   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22406   if test "x$has_forbidden_chars" != x; then
22407     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22408     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22409     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22410     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22411       # Going to short mode and back again did indeed matter. Since short mode is
22412       # case insensitive, let's make it lowercase to improve readability.
22413       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22414       # Now convert it back to Unix-stile (cygpath)
22415       input_path=`$CYGPATH -u "$shortmode_path"`
22416       new_path="$input_path"
22417     fi
22418   fi
22419 
22420   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22421   if test "x$test_cygdrive_prefix" = x; then
22422     # As a simple fix, exclude /usr/bin since it's not a real path.
22423     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22424       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22425       # a path prefixed by /cygdrive for fixpath to work.
22426       new_path="$CYGWIN_ROOT_PATH$input_path"
22427     fi
22428   fi
22429 
22430   # remove trailing .exe if any
22431   new_path="${new_path/%.exe/}"
22432 
22433   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22434 
22435   # First separate the path from the arguments. This will split at the first
22436   # space.
22437   complete="$WINLD"
22438   path="${complete%% *}"
22439   tmp="$complete EOL"
22440   arguments="${tmp#* }"
22441 
22442   # Input might be given as Windows format, start by converting to
22443   # unix format.
22444   new_path="$path"
22445 
22446   windows_path="$new_path"
22447   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22448     unix_path=`$CYGPATH -u "$windows_path"`
22449     new_path="$unix_path"
22450   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22451     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22452     new_path="$unix_path"
22453   fi
22454 
22455 
22456   # Now try to locate executable using which
22457   new_path=`$WHICH "$new_path" 2> /dev/null`
22458 
22459   if test "x$new_path" = x; then
22460     # Oops. Which didn't find the executable.
22461     # The splitting of arguments from the executable at a space might have been incorrect,
22462     # since paths with space are more likely in Windows. Give it another try with the whole
22463     # argument.
22464     path="$complete"
22465     arguments="EOL"
22466     new_path="$path"
22467 
22468   windows_path="$new_path"
22469   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22470     unix_path=`$CYGPATH -u "$windows_path"`
22471     new_path="$unix_path"
22472   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22473     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22474     new_path="$unix_path"
22475   fi
22476 
22477 
22478     new_path=`$WHICH "$new_path" 2> /dev/null`
22479 
22480     if test "x$new_path" = x; then
22481       # It's still not found. Now this is an unrecoverable error.
22482       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22483 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22484       has_space=`$ECHO "$complete" | $GREP " "`
22485       if test "x$has_space" != x; then
22486         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22487 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22488       fi
22489       as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22490     fi
22491   fi
22492 
22493   # Now new_path has a complete unix path to the binary
22494   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22495     # Keep paths in /bin as-is, but remove trailing .exe if any
22496     new_path="${new_path/%.exe/}"
22497     # Do not save /bin paths to all_fixpath_prefixes!
22498   else
22499     # Not in mixed or Windows style, start by that.
22500     new_path=`cmd //c echo $new_path`
22501 
22502   input_path="$new_path"
22503   # Check if we need to convert this using DOS-style short mode. If the path
22504   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22505   # take no chances and rewrite it.
22506   # Note: m4 eats our [], so we need to use [ and ] instead.
22507   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22508   if test "x$has_forbidden_chars" != x; then
22509     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22510     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22511   fi
22512 
22513     # Output is in $new_path
22514 
22515   windows_path="$new_path"
22516   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22517     unix_path=`$CYGPATH -u "$windows_path"`
22518     new_path="$unix_path"
22519   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22520     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22521     new_path="$unix_path"
22522   fi
22523 
22524     # remove trailing .exe if any
22525     new_path="${new_path/%.exe/}"
22526 
22527     # Save the first 10 bytes of this path to the storage, so fixpath can work.
22528     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22529   fi
22530 
22531   else
22532     # We're on a posix platform. Hooray! :)
22533     # First separate the path from the arguments. This will split at the first
22534     # space.
22535     complete="$WINLD"
22536     path="${complete%% *}"
22537     tmp="$complete EOL"
22538     arguments="${tmp#* }"
22539 
22540     # Cannot rely on the command "which" here since it doesn't always work.
22541     is_absolute_path=`$ECHO "$path" | $GREP ^/`
22542     if test -z "$is_absolute_path"; then
22543       # Path to executable is not absolute. Find it.
22544       IFS_save="$IFS"
22545       IFS=:
22546       for p in $PATH; do
22547         if test -f "$p/$path" && test -x "$p/$path"; then
22548           new_path="$p/$path"
22549           break
22550         fi
22551       done
22552       IFS="$IFS_save"
22553     else
22554       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
22555 $as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
22556       new_path="$path"
22557     fi
22558 
22559     if test "x$new_path" = x; then
22560         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22561 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22562         has_space=`$ECHO "$complete" | $GREP " "`
22563         if test "x$has_space" != x; then
22564           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22565 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22566         fi
22567         as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22568       fi
22569   fi
22570 
22571       # Now join together the path and the arguments once again
22572       if test "x$arguments" != xEOL; then
22573         new_complete="$new_path ${arguments% *}"
22574       else
22575         new_complete="$new_path"
22576       fi
22577 
22578   if test "x$complete" != "x$new_complete"; then
22579       WINLD="$new_complete"
22580       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
22581 $as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
22582     fi
22583 
22584     printf "Windows linker was found at $WINLD\n"
22585     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
22586 $as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
22587     "$WINLD" --version > /dev/null
22588     if test $? -eq 0 ; then
22589       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22590 $as_echo "no" >&6; }
22591       as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
22592     else
22593       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22594 $as_echo "yes" >&6; }
22595     fi
22596     LD="$WINLD"
22597     LDEXE="$WINLD"
22598     LDCXX="$WINLD"
22599     LDEXECXX="$WINLD"
22600 
22601     # Extract the first word of "mt", so it can be a program name with args.
22602 set dummy mt; ac_word=$2
22603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22604 $as_echo_n "checking for $ac_word... " >&6; }
22605 if ${ac_cv_prog_MT+:} false; then :
22606   $as_echo_n "(cached) " >&6
22607 else
22608   if test -n "$MT"; then
22609   ac_cv_prog_MT="$MT" # Let the user override the test.
22610 else
22611   ac_prog_rejected=no
22612 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22613 for as_dir in $PATH
22614 do
22615   IFS=$as_save_IFS
22616   test -z "$as_dir" && as_dir=.
22617     for ac_exec_ext in '' $ac_executable_extensions; do
22618   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22619     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
22620        ac_prog_rejected=yes
22621        continue
22622      fi
22623     ac_cv_prog_MT="mt"
22624     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22625     break 2
22626   fi
22627 done
22628   done
22629 IFS=$as_save_IFS
22630 
22631 if test $ac_prog_rejected = yes; then
22632   # We found a bogon in the path, so make sure we never use it.
22633   set dummy $ac_cv_prog_MT
22634   shift
22635   if test $# != 0; then
22636     # We chose a different compiler from the bogus one.
22637     # However, it has the same basename, so the bogon will be chosen
22638     # first if we set MT to just the basename; use the full file name.
22639     shift
22640     ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
22641   fi
22642 fi
22643 fi
22644 fi
22645 MT=$ac_cv_prog_MT
22646 if test -n "$MT"; then
22647   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
22648 $as_echo "$MT" >&6; }
22649 else
22650   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22651 $as_echo "no" >&6; }
22652 fi
22653 
22654 
22655 
22656   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22657 
22658   # First separate the path from the arguments. This will split at the first
22659   # space.
22660   complete="$MT"
22661   path="${complete%% *}"
22662   tmp="$complete EOL"
22663   arguments="${tmp#* }"
22664 
22665   # Input might be given as Windows format, start by converting to
22666   # unix format.
22667   new_path=`$CYGPATH -u "$path"`
22668 
22669   # Now try to locate executable using which
22670   new_path=`$WHICH "$new_path" 2> /dev/null`
22671   # bat and cmd files are not always considered executable in cygwin causing which
22672   # to not find them
22673   if test "x$new_path" = x \
22674            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22675            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22676     new_path=`$CYGPATH -u "$path"`
22677   fi
22678   if test "x$new_path" = x; then
22679     # Oops. Which didn't find the executable.
22680     # The splitting of arguments from the executable at a space might have been incorrect,
22681     # since paths with space are more likely in Windows. Give it another try with the whole
22682     # argument.
22683     path="$complete"
22684     arguments="EOL"
22685     new_path=`$CYGPATH -u "$path"`
22686     new_path=`$WHICH "$new_path" 2> /dev/null`
22687     # bat and cmd files are not always considered executable in cygwin causing which
22688     # to not find them
22689     if test "x$new_path" = x \
22690              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22691              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22692       new_path=`$CYGPATH -u "$path"`
22693     fi
22694     if test "x$new_path" = x; then
22695       # It's still not found. Now this is an unrecoverable error.
22696       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22697 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22698       has_space=`$ECHO "$complete" | $GREP " "`
22699       if test "x$has_space" != x; then
22700         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22701 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22702       fi
22703       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22704     fi
22705   fi
22706 
22707   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22708   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22709   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22710   # "foo.exe" is OK but "foo" is an error.
22711   #
22712   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22713   # It is also a way to make sure we got the proper file name for the real test later on.
22714   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22715   if test "x$test_shortpath" = x; then
22716     # Short path failed, file does not exist as specified.
22717     # Try adding .exe or .cmd
22718     if test -f "${new_path}.exe"; then
22719        input_to_shortpath="${new_path}.exe"
22720     elif test -f "${new_path}.cmd"; then
22721        input_to_shortpath="${new_path}.cmd"
22722     else
22723       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
22724 $as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
22725       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22726 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22727       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22728     fi
22729   else
22730     input_to_shortpath="$new_path"
22731   fi
22732 
22733   # Call helper function which possibly converts this using DOS-style short mode.
22734   # If so, the updated path is stored in $new_path.
22735   new_path="$input_to_shortpath"
22736 
22737   input_path="$input_to_shortpath"
22738   # Check if we need to convert this using DOS-style short mode. If the path
22739   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22740   # take no chances and rewrite it.
22741   # Note: m4 eats our [], so we need to use [ and ] instead.
22742   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22743   if test "x$has_forbidden_chars" != x; then
22744     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22745     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22746     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22747     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22748       # Going to short mode and back again did indeed matter. Since short mode is
22749       # case insensitive, let's make it lowercase to improve readability.
22750       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22751       # Now convert it back to Unix-stile (cygpath)
22752       input_path=`$CYGPATH -u "$shortmode_path"`
22753       new_path="$input_path"
22754     fi
22755   fi
22756 
22757   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22758   if test "x$test_cygdrive_prefix" = x; then
22759     # As a simple fix, exclude /usr/bin since it's not a real path.
22760     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22761       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22762       # a path prefixed by /cygdrive for fixpath to work.
22763       new_path="$CYGWIN_ROOT_PATH$input_path"
22764     fi
22765   fi
22766 
22767   # remove trailing .exe if any
22768   new_path="${new_path/%.exe/}"
22769 
22770   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22771 
22772   # First separate the path from the arguments. This will split at the first
22773   # space.
22774   complete="$MT"
22775   path="${complete%% *}"
22776   tmp="$complete EOL"
22777   arguments="${tmp#* }"
22778 
22779   # Input might be given as Windows format, start by converting to
22780   # unix format.
22781   new_path="$path"
22782 
22783   windows_path="$new_path"
22784   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22785     unix_path=`$CYGPATH -u "$windows_path"`
22786     new_path="$unix_path"
22787   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22788     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22789     new_path="$unix_path"
22790   fi
22791 
22792 
22793   # Now try to locate executable using which
22794   new_path=`$WHICH "$new_path" 2> /dev/null`
22795 
22796   if test "x$new_path" = x; then
22797     # Oops. Which didn't find the executable.
22798     # The splitting of arguments from the executable at a space might have been incorrect,
22799     # since paths with space are more likely in Windows. Give it another try with the whole
22800     # argument.
22801     path="$complete"
22802     arguments="EOL"
22803     new_path="$path"
22804 
22805   windows_path="$new_path"
22806   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22807     unix_path=`$CYGPATH -u "$windows_path"`
22808     new_path="$unix_path"
22809   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22810     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22811     new_path="$unix_path"
22812   fi
22813 
22814 
22815     new_path=`$WHICH "$new_path" 2> /dev/null`
22816 
22817     if test "x$new_path" = x; then
22818       # It's still not found. Now this is an unrecoverable error.
22819       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22820 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22821       has_space=`$ECHO "$complete" | $GREP " "`
22822       if test "x$has_space" != x; then
22823         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22824 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22825       fi
22826       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22827     fi
22828   fi
22829 
22830   # Now new_path has a complete unix path to the binary
22831   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22832     # Keep paths in /bin as-is, but remove trailing .exe if any
22833     new_path="${new_path/%.exe/}"
22834     # Do not save /bin paths to all_fixpath_prefixes!
22835   else
22836     # Not in mixed or Windows style, start by that.
22837     new_path=`cmd //c echo $new_path`
22838 
22839   input_path="$new_path"
22840   # Check if we need to convert this using DOS-style short mode. If the path
22841   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22842   # take no chances and rewrite it.
22843   # Note: m4 eats our [], so we need to use [ and ] instead.
22844   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22845   if test "x$has_forbidden_chars" != x; then
22846     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22847     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22848   fi
22849 
22850     # Output is in $new_path
22851 
22852   windows_path="$new_path"
22853   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22854     unix_path=`$CYGPATH -u "$windows_path"`
22855     new_path="$unix_path"
22856   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22857     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22858     new_path="$unix_path"
22859   fi
22860 
22861     # remove trailing .exe if any
22862     new_path="${new_path/%.exe/}"
22863 
22864     # Save the first 10 bytes of this path to the storage, so fixpath can work.
22865     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22866   fi
22867 
22868   else
22869     # We're on a posix platform. Hooray! :)
22870     # First separate the path from the arguments. This will split at the first
22871     # space.
22872     complete="$MT"
22873     path="${complete%% *}"
22874     tmp="$complete EOL"
22875     arguments="${tmp#* }"
22876 
22877     # Cannot rely on the command "which" here since it doesn't always work.
22878     is_absolute_path=`$ECHO "$path" | $GREP ^/`
22879     if test -z "$is_absolute_path"; then
22880       # Path to executable is not absolute. Find it.
22881       IFS_save="$IFS"
22882       IFS=:
22883       for p in $PATH; do
22884         if test -f "$p/$path" && test -x "$p/$path"; then
22885           new_path="$p/$path"
22886           break
22887         fi
22888       done
22889       IFS="$IFS_save"
22890     else
22891       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
22892 $as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
22893       new_path="$path"
22894     fi
22895 
22896     if test "x$new_path" = x; then
22897         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22898 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22899         has_space=`$ECHO "$complete" | $GREP " "`
22900         if test "x$has_space" != x; then
22901           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22902 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22903         fi
22904         as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22905       fi
22906   fi
22907 
22908       # Now join together the path and the arguments once again
22909       if test "x$arguments" != xEOL; then
22910         new_complete="$new_path ${arguments% *}"
22911       else
22912         new_complete="$new_path"
22913       fi
22914 
22915   if test "x$complete" != "x$new_complete"; then
22916       MT="$new_complete"
22917       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
22918 $as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
22919     fi
22920 
22921     # The resource compiler
22922     # Extract the first word of "rc", so it can be a program name with args.
22923 set dummy rc; ac_word=$2
22924 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22925 $as_echo_n "checking for $ac_word... " >&6; }
22926 if ${ac_cv_prog_RC+:} false; then :
22927   $as_echo_n "(cached) " >&6
22928 else
22929   if test -n "$RC"; then
22930   ac_cv_prog_RC="$RC" # Let the user override the test.
22931 else
22932   ac_prog_rejected=no
22933 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22934 for as_dir in $PATH
22935 do
22936   IFS=$as_save_IFS
22937   test -z "$as_dir" && as_dir=.
22938     for ac_exec_ext in '' $ac_executable_extensions; do
22939   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22940     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
22941        ac_prog_rejected=yes
22942        continue
22943      fi
22944     ac_cv_prog_RC="rc"
22945     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22946     break 2
22947   fi
22948 done
22949   done
22950 IFS=$as_save_IFS
22951 
22952 if test $ac_prog_rejected = yes; then
22953   # We found a bogon in the path, so make sure we never use it.
22954   set dummy $ac_cv_prog_RC
22955   shift
22956   if test $# != 0; then
22957     # We chose a different compiler from the bogus one.
22958     # However, it has the same basename, so the bogon will be chosen
22959     # first if we set RC to just the basename; use the full file name.
22960     shift
22961     ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
22962   fi
22963 fi
22964 fi
22965 fi
22966 RC=$ac_cv_prog_RC
22967 if test -n "$RC"; then
22968   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
22969 $as_echo "$RC" >&6; }
22970 else
22971   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22972 $as_echo "no" >&6; }
22973 fi
22974 
22975 
22976 
22977   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22978 
22979   # First separate the path from the arguments. This will split at the first
22980   # space.
22981   complete="$RC"
22982   path="${complete%% *}"
22983   tmp="$complete EOL"
22984   arguments="${tmp#* }"
22985 
22986   # Input might be given as Windows format, start by converting to
22987   # unix format.
22988   new_path=`$CYGPATH -u "$path"`
22989 
22990   # Now try to locate executable using which
22991   new_path=`$WHICH "$new_path" 2> /dev/null`
22992   # bat and cmd files are not always considered executable in cygwin causing which
22993   # to not find them
22994   if test "x$new_path" = x \
22995            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22996            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22997     new_path=`$CYGPATH -u "$path"`
22998   fi
22999   if test "x$new_path" = x; then
23000     # Oops. Which didn't find the executable.
23001     # The splitting of arguments from the executable at a space might have been incorrect,
23002     # since paths with space are more likely in Windows. Give it another try with the whole
23003     # argument.
23004     path="$complete"
23005     arguments="EOL"
23006     new_path=`$CYGPATH -u "$path"`
23007     new_path=`$WHICH "$new_path" 2> /dev/null`
23008     # bat and cmd files are not always considered executable in cygwin causing which
23009     # to not find them
23010     if test "x$new_path" = x \
23011              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23012              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23013       new_path=`$CYGPATH -u "$path"`
23014     fi
23015     if test "x$new_path" = x; then
23016       # It's still not found. Now this is an unrecoverable error.
23017       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23018 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23019       has_space=`$ECHO "$complete" | $GREP " "`
23020       if test "x$has_space" != x; then
23021         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23022 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23023       fi
23024       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23025     fi
23026   fi
23027 
23028   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23029   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23030   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23031   # "foo.exe" is OK but "foo" is an error.
23032   #
23033   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23034   # It is also a way to make sure we got the proper file name for the real test later on.
23035   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23036   if test "x$test_shortpath" = x; then
23037     # Short path failed, file does not exist as specified.
23038     # Try adding .exe or .cmd
23039     if test -f "${new_path}.exe"; then
23040        input_to_shortpath="${new_path}.exe"
23041     elif test -f "${new_path}.cmd"; then
23042        input_to_shortpath="${new_path}.cmd"
23043     else
23044       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
23045 $as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
23046       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23047 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23048       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23049     fi
23050   else
23051     input_to_shortpath="$new_path"
23052   fi
23053 
23054   # Call helper function which possibly converts this using DOS-style short mode.
23055   # If so, the updated path is stored in $new_path.
23056   new_path="$input_to_shortpath"
23057 
23058   input_path="$input_to_shortpath"
23059   # Check if we need to convert this using DOS-style short mode. If the path
23060   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23061   # take no chances and rewrite it.
23062   # Note: m4 eats our [], so we need to use [ and ] instead.
23063   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23064   if test "x$has_forbidden_chars" != x; then
23065     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23066     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23067     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23068     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23069       # Going to short mode and back again did indeed matter. Since short mode is
23070       # case insensitive, let's make it lowercase to improve readability.
23071       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23072       # Now convert it back to Unix-stile (cygpath)
23073       input_path=`$CYGPATH -u "$shortmode_path"`
23074       new_path="$input_path"
23075     fi
23076   fi
23077 
23078   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23079   if test "x$test_cygdrive_prefix" = x; then
23080     # As a simple fix, exclude /usr/bin since it's not a real path.
23081     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23082       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23083       # a path prefixed by /cygdrive for fixpath to work.
23084       new_path="$CYGWIN_ROOT_PATH$input_path"
23085     fi
23086   fi
23087 
23088   # remove trailing .exe if any
23089   new_path="${new_path/%.exe/}"
23090 
23091   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23092 
23093   # First separate the path from the arguments. This will split at the first
23094   # space.
23095   complete="$RC"
23096   path="${complete%% *}"
23097   tmp="$complete EOL"
23098   arguments="${tmp#* }"
23099 
23100   # Input might be given as Windows format, start by converting to
23101   # unix format.
23102   new_path="$path"
23103 
23104   windows_path="$new_path"
23105   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23106     unix_path=`$CYGPATH -u "$windows_path"`
23107     new_path="$unix_path"
23108   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23109     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23110     new_path="$unix_path"
23111   fi
23112 
23113 
23114   # Now try to locate executable using which
23115   new_path=`$WHICH "$new_path" 2> /dev/null`
23116 
23117   if test "x$new_path" = x; then
23118     # Oops. Which didn't find the executable.
23119     # The splitting of arguments from the executable at a space might have been incorrect,
23120     # since paths with space are more likely in Windows. Give it another try with the whole
23121     # argument.
23122     path="$complete"
23123     arguments="EOL"
23124     new_path="$path"
23125 
23126   windows_path="$new_path"
23127   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23128     unix_path=`$CYGPATH -u "$windows_path"`
23129     new_path="$unix_path"
23130   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23131     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23132     new_path="$unix_path"
23133   fi
23134 
23135 
23136     new_path=`$WHICH "$new_path" 2> /dev/null`
23137 
23138     if test "x$new_path" = x; then
23139       # It's still not found. Now this is an unrecoverable error.
23140       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23141 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23142       has_space=`$ECHO "$complete" | $GREP " "`
23143       if test "x$has_space" != x; then
23144         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23145 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23146       fi
23147       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23148     fi
23149   fi
23150 
23151   # Now new_path has a complete unix path to the binary
23152   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23153     # Keep paths in /bin as-is, but remove trailing .exe if any
23154     new_path="${new_path/%.exe/}"
23155     # Do not save /bin paths to all_fixpath_prefixes!
23156   else
23157     # Not in mixed or Windows style, start by that.
23158     new_path=`cmd //c echo $new_path`
23159 
23160   input_path="$new_path"
23161   # Check if we need to convert this using DOS-style short mode. If the path
23162   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23163   # take no chances and rewrite it.
23164   # Note: m4 eats our [], so we need to use [ and ] instead.
23165   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23166   if test "x$has_forbidden_chars" != x; then
23167     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23168     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23169   fi
23170 
23171     # Output is in $new_path
23172 
23173   windows_path="$new_path"
23174   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23175     unix_path=`$CYGPATH -u "$windows_path"`
23176     new_path="$unix_path"
23177   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23178     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23179     new_path="$unix_path"
23180   fi
23181 
23182     # remove trailing .exe if any
23183     new_path="${new_path/%.exe/}"
23184 
23185     # Save the first 10 bytes of this path to the storage, so fixpath can work.
23186     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23187   fi
23188 
23189   else
23190     # We're on a posix platform. Hooray! :)
23191     # First separate the path from the arguments. This will split at the first
23192     # space.
23193     complete="$RC"
23194     path="${complete%% *}"
23195     tmp="$complete EOL"
23196     arguments="${tmp#* }"
23197 
23198     # Cannot rely on the command "which" here since it doesn't always work.
23199     is_absolute_path=`$ECHO "$path" | $GREP ^/`
23200     if test -z "$is_absolute_path"; then
23201       # Path to executable is not absolute. Find it.
23202       IFS_save="$IFS"
23203       IFS=:
23204       for p in $PATH; do
23205         if test -f "$p/$path" && test -x "$p/$path"; then
23206           new_path="$p/$path"
23207           break
23208         fi
23209       done
23210       IFS="$IFS_save"
23211     else
23212       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
23213 $as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
23214       new_path="$path"
23215     fi
23216 
23217     if test "x$new_path" = x; then
23218         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23219 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23220         has_space=`$ECHO "$complete" | $GREP " "`
23221         if test "x$has_space" != x; then
23222           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23223 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23224         fi
23225         as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23226       fi
23227   fi
23228 
23229       # Now join together the path and the arguments once again
23230       if test "x$arguments" != xEOL; then
23231         new_complete="$new_path ${arguments% *}"
23232       else
23233         new_complete="$new_path"
23234       fi
23235 
23236   if test "x$complete" != "x$new_complete"; then
23237       RC="$new_complete"
23238       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
23239 $as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
23240     fi
23241 
23242 
23243     # For hotspot, we need these in Windows mixed path,
23244     # so rewrite them all. Need added .exe suffix.
23245     HOTSPOT_CXX="$CXX.exe"
23246     HOTSPOT_LD="$LD.exe"
23247     HOTSPOT_MT="$MT.exe"
23248     HOTSPOT_RC="$RC.exe"
23249 
23250   unix_path="$HOTSPOT_CXX"
23251   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23252     windows_path=`$CYGPATH -m "$unix_path"`
23253     HOTSPOT_CXX="$windows_path"
23254   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23255     windows_path=`cmd //c echo $unix_path`
23256     HOTSPOT_CXX="$windows_path"
23257   fi
23258 
23259 
23260   unix_path="$HOTSPOT_LD"
23261   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23262     windows_path=`$CYGPATH -m "$unix_path"`
23263     HOTSPOT_LD="$windows_path"
23264   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23265     windows_path=`cmd //c echo $unix_path`
23266     HOTSPOT_LD="$windows_path"
23267   fi
23268 
23269 
23270   unix_path="$HOTSPOT_MT"
23271   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23272     windows_path=`$CYGPATH -m "$unix_path"`
23273     HOTSPOT_MT="$windows_path"
23274   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23275     windows_path=`cmd //c echo $unix_path`
23276     HOTSPOT_MT="$windows_path"
23277   fi
23278 
23279 
23280   unix_path="$HOTSPOT_RC"
23281   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23282     windows_path=`$CYGPATH -m "$unix_path"`
23283     HOTSPOT_RC="$windows_path"
23284   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23285     windows_path=`cmd //c echo $unix_path`
23286     HOTSPOT_RC="$windows_path"
23287   fi
23288 
23289 
23290 
23291 
23292     RC_FLAGS="-nologo -l 0x409 -r"
23293     if test "x$VARIANT" = xOPT; then :
23294 
23295         RC_FLAGS="$RC_FLAGS -d NDEBUG"
23296 
23297 fi
23298     JDK_UPDATE_VERSION_NOTNULL=$JDK_UPDATE_VERSION
23299     if test "x$JDK_UPDATE_VERSION" = x; then :
23300 
23301         JDK_UPDATE_VERSION_NOTNULL=0
23302 
23303 fi
23304     RC_FLAGS="$RC_FLAGS -d \"JDK_BUILD_ID=$FULL_VERSION\""
23305     RC_FLAGS="$RC_FLAGS -d \"JDK_COMPANY=$COMPANY_NAME\""
23306     RC_FLAGS="$RC_FLAGS -d \"JDK_COMPONENT=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME binary\""
23307     RC_FLAGS="$RC_FLAGS -d \"JDK_VER=$JDK_MINOR_VERSION.$JDK_MICRO_VERSION.$JDK_UPDATE_VERSION_NOTNULL.$COOKED_BUILD_NUMBER\""
23308     RC_FLAGS="$RC_FLAGS -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\""
23309     RC_FLAGS="$RC_FLAGS -d \"JDK_NAME=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME $JDK_MINOR_VERSION $JDK_UPDATE_META_TAG\""
23310     RC_FLAGS="$RC_FLAGS -d \"JDK_FVER=$JDK_MINOR_VERSION,$JDK_MICRO_VERSION,$JDK_UPDATE_VERSION_NOTNULL,$COOKED_BUILD_NUMBER\""
23311 
23312     # lib.exe is used to create static libraries.
23313     # Extract the first word of "lib", so it can be a program name with args.
23314 set dummy lib; ac_word=$2
23315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23316 $as_echo_n "checking for $ac_word... " >&6; }
23317 if ${ac_cv_prog_WINAR+:} false; then :
23318   $as_echo_n "(cached) " >&6
23319 else
23320   if test -n "$WINAR"; then
23321   ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
23322 else
23323 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23324 for as_dir in $PATH
23325 do
23326   IFS=$as_save_IFS
23327   test -z "$as_dir" && as_dir=.
23328     for ac_exec_ext in '' $ac_executable_extensions; do
23329   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23330     ac_cv_prog_WINAR="lib"
23331     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23332     break 2
23333   fi
23334 done
23335   done
23336 IFS=$as_save_IFS
23337 
23338 fi
23339 fi
23340 WINAR=$ac_cv_prog_WINAR
23341 if test -n "$WINAR"; then
23342   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
23343 $as_echo "$WINAR" >&6; }
23344 else
23345   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23346 $as_echo "no" >&6; }
23347 fi
23348 
23349 
23350 
23351   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23352 
23353   # First separate the path from the arguments. This will split at the first
23354   # space.
23355   complete="$WINAR"
23356   path="${complete%% *}"
23357   tmp="$complete EOL"
23358   arguments="${tmp#* }"
23359 
23360   # Input might be given as Windows format, start by converting to
23361   # unix format.
23362   new_path=`$CYGPATH -u "$path"`
23363 
23364   # Now try to locate executable using which
23365   new_path=`$WHICH "$new_path" 2> /dev/null`
23366   # bat and cmd files are not always considered executable in cygwin causing which
23367   # to not find them
23368   if test "x$new_path" = x \
23369            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23370            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23371     new_path=`$CYGPATH -u "$path"`
23372   fi
23373   if test "x$new_path" = x; then
23374     # Oops. Which didn't find the executable.
23375     # The splitting of arguments from the executable at a space might have been incorrect,
23376     # since paths with space are more likely in Windows. Give it another try with the whole
23377     # argument.
23378     path="$complete"
23379     arguments="EOL"
23380     new_path=`$CYGPATH -u "$path"`
23381     new_path=`$WHICH "$new_path" 2> /dev/null`
23382     # bat and cmd files are not always considered executable in cygwin causing which
23383     # to not find them
23384     if test "x$new_path" = x \
23385              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23386              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23387       new_path=`$CYGPATH -u "$path"`
23388     fi
23389     if test "x$new_path" = x; then
23390       # It's still not found. Now this is an unrecoverable error.
23391       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23392 $as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23393       has_space=`$ECHO "$complete" | $GREP " "`
23394       if test "x$has_space" != x; then
23395         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23396 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23397       fi
23398       as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23399     fi
23400   fi
23401 
23402   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23403   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23404   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23405   # "foo.exe" is OK but "foo" is an error.
23406   #
23407   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23408   # It is also a way to make sure we got the proper file name for the real test later on.
23409   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23410   if test "x$test_shortpath" = x; then
23411     # Short path failed, file does not exist as specified.
23412     # Try adding .exe or .cmd
23413     if test -f "${new_path}.exe"; then
23414        input_to_shortpath="${new_path}.exe"
23415     elif test -f "${new_path}.cmd"; then
23416        input_to_shortpath="${new_path}.cmd"
23417     else
23418       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
23419 $as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
23420       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23421 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23422       as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23423     fi
23424   else
23425     input_to_shortpath="$new_path"
23426   fi
23427 
23428   # Call helper function which possibly converts this using DOS-style short mode.
23429   # If so, the updated path is stored in $new_path.
23430   new_path="$input_to_shortpath"
23431 
23432   input_path="$input_to_shortpath"
23433   # Check if we need to convert this using DOS-style short mode. If the path
23434   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23435   # take no chances and rewrite it.
23436   # Note: m4 eats our [], so we need to use [ and ] instead.
23437   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23438   if test "x$has_forbidden_chars" != x; then
23439     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23440     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23441     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23442     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23443       # Going to short mode and back again did indeed matter. Since short mode is
23444       # case insensitive, let's make it lowercase to improve readability.
23445       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23446       # Now convert it back to Unix-stile (cygpath)
23447       input_path=`$CYGPATH -u "$shortmode_path"`
23448       new_path="$input_path"
23449     fi
23450   fi
23451 
23452   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23453   if test "x$test_cygdrive_prefix" = x; then
23454     # As a simple fix, exclude /usr/bin since it's not a real path.
23455     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23456       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23457       # a path prefixed by /cygdrive for fixpath to work.
23458       new_path="$CYGWIN_ROOT_PATH$input_path"
23459     fi
23460   fi
23461 
23462   # remove trailing .exe if any
23463   new_path="${new_path/%.exe/}"
23464 
23465   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23466 
23467   # First separate the path from the arguments. This will split at the first
23468   # space.
23469   complete="$WINAR"
23470   path="${complete%% *}"
23471   tmp="$complete EOL"
23472   arguments="${tmp#* }"
23473 
23474   # Input might be given as Windows format, start by converting to
23475   # unix format.
23476   new_path="$path"
23477 
23478   windows_path="$new_path"
23479   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23480     unix_path=`$CYGPATH -u "$windows_path"`
23481     new_path="$unix_path"
23482   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23483     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23484     new_path="$unix_path"
23485   fi
23486 
23487 
23488   # Now try to locate executable using which
23489   new_path=`$WHICH "$new_path" 2> /dev/null`
23490 
23491   if test "x$new_path" = x; then
23492     # Oops. Which didn't find the executable.
23493     # The splitting of arguments from the executable at a space might have been incorrect,
23494     # since paths with space are more likely in Windows. Give it another try with the whole
23495     # argument.
23496     path="$complete"
23497     arguments="EOL"
23498     new_path="$path"
23499 
23500   windows_path="$new_path"
23501   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23502     unix_path=`$CYGPATH -u "$windows_path"`
23503     new_path="$unix_path"
23504   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23505     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23506     new_path="$unix_path"
23507   fi
23508 
23509 
23510     new_path=`$WHICH "$new_path" 2> /dev/null`
23511 
23512     if test "x$new_path" = x; then
23513       # It's still not found. Now this is an unrecoverable error.
23514       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23515 $as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23516       has_space=`$ECHO "$complete" | $GREP " "`
23517       if test "x$has_space" != x; then
23518         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23519 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23520       fi
23521       as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23522     fi
23523   fi
23524 
23525   # Now new_path has a complete unix path to the binary
23526   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23527     # Keep paths in /bin as-is, but remove trailing .exe if any
23528     new_path="${new_path/%.exe/}"
23529     # Do not save /bin paths to all_fixpath_prefixes!
23530   else
23531     # Not in mixed or Windows style, start by that.
23532     new_path=`cmd //c echo $new_path`
23533 
23534   input_path="$new_path"
23535   # Check if we need to convert this using DOS-style short mode. If the path
23536   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23537   # take no chances and rewrite it.
23538   # Note: m4 eats our [], so we need to use [ and ] instead.
23539   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23540   if test "x$has_forbidden_chars" != x; then
23541     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23542     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23543   fi
23544 
23545     # Output is in $new_path
23546 
23547   windows_path="$new_path"
23548   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23549     unix_path=`$CYGPATH -u "$windows_path"`
23550     new_path="$unix_path"
23551   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23552     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23553     new_path="$unix_path"
23554   fi
23555 
23556     # remove trailing .exe if any
23557     new_path="${new_path/%.exe/}"
23558 
23559     # Save the first 10 bytes of this path to the storage, so fixpath can work.
23560     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23561   fi
23562 
23563   else
23564     # We're on a posix platform. Hooray! :)
23565     # First separate the path from the arguments. This will split at the first
23566     # space.
23567     complete="$WINAR"
23568     path="${complete%% *}"
23569     tmp="$complete EOL"
23570     arguments="${tmp#* }"
23571 
23572     # Cannot rely on the command "which" here since it doesn't always work.
23573     is_absolute_path=`$ECHO "$path" | $GREP ^/`
23574     if test -z "$is_absolute_path"; then
23575       # Path to executable is not absolute. Find it.
23576       IFS_save="$IFS"
23577       IFS=:
23578       for p in $PATH; do
23579         if test -f "$p/$path" && test -x "$p/$path"; then
23580           new_path="$p/$path"
23581           break
23582         fi
23583       done
23584       IFS="$IFS_save"
23585     else
23586       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
23587 $as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
23588       new_path="$path"
23589     fi
23590 
23591     if test "x$new_path" = x; then
23592         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23593 $as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23594         has_space=`$ECHO "$complete" | $GREP " "`
23595         if test "x$has_space" != x; then
23596           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23597 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23598         fi
23599         as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23600       fi
23601   fi
23602 
23603       # Now join together the path and the arguments once again
23604       if test "x$arguments" != xEOL; then
23605         new_complete="$new_path ${arguments% *}"
23606       else
23607         new_complete="$new_path"
23608       fi
23609 
23610   if test "x$complete" != "x$new_complete"; then
23611       WINAR="$new_complete"
23612       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
23613 $as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
23614     fi
23615 
23616     AR="$WINAR"
23617     ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
23618 
23619     # Extract the first word of "dumpbin", so it can be a program name with args.
23620 set dummy dumpbin; ac_word=$2
23621 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23622 $as_echo_n "checking for $ac_word... " >&6; }
23623 if ${ac_cv_prog_DUMPBIN+:} false; then :
23624   $as_echo_n "(cached) " >&6
23625 else
23626   if test -n "$DUMPBIN"; then
23627   ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
23628 else
23629 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23630 for as_dir in $PATH
23631 do
23632   IFS=$as_save_IFS
23633   test -z "$as_dir" && as_dir=.
23634     for ac_exec_ext in '' $ac_executable_extensions; do
23635   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23636     ac_cv_prog_DUMPBIN="dumpbin"
23637     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23638     break 2
23639   fi
23640 done
23641   done
23642 IFS=$as_save_IFS
23643 
23644 fi
23645 fi
23646 DUMPBIN=$ac_cv_prog_DUMPBIN
23647 if test -n "$DUMPBIN"; then
23648   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
23649 $as_echo "$DUMPBIN" >&6; }
23650 else
23651   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23652 $as_echo "no" >&6; }
23653 fi
23654 
23655 
23656 
23657   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23658 
23659   # First separate the path from the arguments. This will split at the first
23660   # space.
23661   complete="$DUMPBIN"
23662   path="${complete%% *}"
23663   tmp="$complete EOL"
23664   arguments="${tmp#* }"
23665 
23666   # Input might be given as Windows format, start by converting to
23667   # unix format.
23668   new_path=`$CYGPATH -u "$path"`
23669 
23670   # Now try to locate executable using which
23671   new_path=`$WHICH "$new_path" 2> /dev/null`
23672   # bat and cmd files are not always considered executable in cygwin causing which
23673   # to not find them
23674   if test "x$new_path" = x \
23675            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23676            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23677     new_path=`$CYGPATH -u "$path"`
23678   fi
23679   if test "x$new_path" = x; then
23680     # Oops. Which didn't find the executable.
23681     # The splitting of arguments from the executable at a space might have been incorrect,
23682     # since paths with space are more likely in Windows. Give it another try with the whole
23683     # argument.
23684     path="$complete"
23685     arguments="EOL"
23686     new_path=`$CYGPATH -u "$path"`
23687     new_path=`$WHICH "$new_path" 2> /dev/null`
23688     # bat and cmd files are not always considered executable in cygwin causing which
23689     # to not find them
23690     if test "x$new_path" = x \
23691              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23692              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23693       new_path=`$CYGPATH -u "$path"`
23694     fi
23695     if test "x$new_path" = x; then
23696       # It's still not found. Now this is an unrecoverable error.
23697       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23698 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23699       has_space=`$ECHO "$complete" | $GREP " "`
23700       if test "x$has_space" != x; then
23701         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23702 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23703       fi
23704       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23705     fi
23706   fi
23707 
23708   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23709   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23710   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23711   # "foo.exe" is OK but "foo" is an error.
23712   #
23713   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23714   # It is also a way to make sure we got the proper file name for the real test later on.
23715   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23716   if test "x$test_shortpath" = x; then
23717     # Short path failed, file does not exist as specified.
23718     # Try adding .exe or .cmd
23719     if test -f "${new_path}.exe"; then
23720        input_to_shortpath="${new_path}.exe"
23721     elif test -f "${new_path}.cmd"; then
23722        input_to_shortpath="${new_path}.cmd"
23723     else
23724       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
23725 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
23726       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23727 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23728       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23729     fi
23730   else
23731     input_to_shortpath="$new_path"
23732   fi
23733 
23734   # Call helper function which possibly converts this using DOS-style short mode.
23735   # If so, the updated path is stored in $new_path.
23736   new_path="$input_to_shortpath"
23737 
23738   input_path="$input_to_shortpath"
23739   # Check if we need to convert this using DOS-style short mode. If the path
23740   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23741   # take no chances and rewrite it.
23742   # Note: m4 eats our [], so we need to use [ and ] instead.
23743   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23744   if test "x$has_forbidden_chars" != x; then
23745     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23746     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23747     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23748     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23749       # Going to short mode and back again did indeed matter. Since short mode is
23750       # case insensitive, let's make it lowercase to improve readability.
23751       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23752       # Now convert it back to Unix-stile (cygpath)
23753       input_path=`$CYGPATH -u "$shortmode_path"`
23754       new_path="$input_path"
23755     fi
23756   fi
23757 
23758   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23759   if test "x$test_cygdrive_prefix" = x; then
23760     # As a simple fix, exclude /usr/bin since it's not a real path.
23761     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23762       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23763       # a path prefixed by /cygdrive for fixpath to work.
23764       new_path="$CYGWIN_ROOT_PATH$input_path"
23765     fi
23766   fi
23767 
23768   # remove trailing .exe if any
23769   new_path="${new_path/%.exe/}"
23770 
23771   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23772 
23773   # First separate the path from the arguments. This will split at the first
23774   # space.
23775   complete="$DUMPBIN"
23776   path="${complete%% *}"
23777   tmp="$complete EOL"
23778   arguments="${tmp#* }"
23779 
23780   # Input might be given as Windows format, start by converting to
23781   # unix format.
23782   new_path="$path"
23783 
23784   windows_path="$new_path"
23785   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23786     unix_path=`$CYGPATH -u "$windows_path"`
23787     new_path="$unix_path"
23788   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23789     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23790     new_path="$unix_path"
23791   fi
23792 
23793 
23794   # Now try to locate executable using which
23795   new_path=`$WHICH "$new_path" 2> /dev/null`
23796 
23797   if test "x$new_path" = x; then
23798     # Oops. Which didn't find the executable.
23799     # The splitting of arguments from the executable at a space might have been incorrect,
23800     # since paths with space are more likely in Windows. Give it another try with the whole
23801     # argument.
23802     path="$complete"
23803     arguments="EOL"
23804     new_path="$path"
23805 
23806   windows_path="$new_path"
23807   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23808     unix_path=`$CYGPATH -u "$windows_path"`
23809     new_path="$unix_path"
23810   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23811     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23812     new_path="$unix_path"
23813   fi
23814 
23815 
23816     new_path=`$WHICH "$new_path" 2> /dev/null`
23817 
23818     if test "x$new_path" = x; then
23819       # It's still not found. Now this is an unrecoverable error.
23820       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23821 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23822       has_space=`$ECHO "$complete" | $GREP " "`
23823       if test "x$has_space" != x; then
23824         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23825 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23826       fi
23827       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23828     fi
23829   fi
23830 
23831   # Now new_path has a complete unix path to the binary
23832   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23833     # Keep paths in /bin as-is, but remove trailing .exe if any
23834     new_path="${new_path/%.exe/}"
23835     # Do not save /bin paths to all_fixpath_prefixes!
23836   else
23837     # Not in mixed or Windows style, start by that.
23838     new_path=`cmd //c echo $new_path`
23839 
23840   input_path="$new_path"
23841   # Check if we need to convert this using DOS-style short mode. If the path
23842   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23843   # take no chances and rewrite it.
23844   # Note: m4 eats our [], so we need to use [ and ] instead.
23845   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23846   if test "x$has_forbidden_chars" != x; then
23847     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23848     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23849   fi
23850 
23851     # Output is in $new_path
23852 
23853   windows_path="$new_path"
23854   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23855     unix_path=`$CYGPATH -u "$windows_path"`
23856     new_path="$unix_path"
23857   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23858     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23859     new_path="$unix_path"
23860   fi
23861 
23862     # remove trailing .exe if any
23863     new_path="${new_path/%.exe/}"
23864 
23865     # Save the first 10 bytes of this path to the storage, so fixpath can work.
23866     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23867   fi
23868 
23869   else
23870     # We're on a posix platform. Hooray! :)
23871     # First separate the path from the arguments. This will split at the first
23872     # space.
23873     complete="$DUMPBIN"
23874     path="${complete%% *}"
23875     tmp="$complete EOL"
23876     arguments="${tmp#* }"
23877 
23878     # Cannot rely on the command "which" here since it doesn't always work.
23879     is_absolute_path=`$ECHO "$path" | $GREP ^/`
23880     if test -z "$is_absolute_path"; then
23881       # Path to executable is not absolute. Find it.
23882       IFS_save="$IFS"
23883       IFS=:
23884       for p in $PATH; do
23885         if test -f "$p/$path" && test -x "$p/$path"; then
23886           new_path="$p/$path"
23887           break
23888         fi
23889       done
23890       IFS="$IFS_save"
23891     else
23892       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5
23893 $as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;}
23894       new_path="$path"
23895     fi
23896 
23897     if test "x$new_path" = x; then
23898         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23899 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23900         has_space=`$ECHO "$complete" | $GREP " "`
23901         if test "x$has_space" != x; then
23902           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23903 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23904         fi
23905         as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23906       fi
23907   fi
23908 
23909       # Now join together the path and the arguments once again
23910       if test "x$arguments" != xEOL; then
23911         new_complete="$new_path ${arguments% *}"
23912       else
23913         new_complete="$new_path"
23914       fi
23915 
23916   if test "x$complete" != "x$new_complete"; then
23917       DUMPBIN="$new_complete"
23918       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
23919 $as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
23920     fi
23921 
23922 
23923     COMPILER_TYPE=CL
23924     CCXXFLAGS="$CCXXFLAGS -nologo"
23925 
23926 fi
23927 
23928 
23929 
23930 ac_ext=c
23931 ac_cpp='$CPP $CPPFLAGS'
23932 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23933 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23934 ac_compiler_gnu=$ac_cv_c_compiler_gnu
23935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
23936 $as_echo_n "checking how to run the C preprocessor... " >&6; }
23937 # On Suns, sometimes $CPP names a directory.
23938 if test -n "$CPP" && test -d "$CPP"; then
23939   CPP=
23940 fi
23941 if test -z "$CPP"; then
23942   if ${ac_cv_prog_CPP+:} false; then :
23943   $as_echo_n "(cached) " >&6
23944 else
23945       # Double quotes because CPP needs to be expanded
23946     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
23947     do
23948       ac_preproc_ok=false
23949 for ac_c_preproc_warn_flag in '' yes
23950 do
23951   # Use a header file that comes with gcc, so configuring glibc
23952   # with a fresh cross-compiler works.
23953   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23954   # <limits.h> exists even on freestanding compilers.
23955   # On the NeXT, cc -E runs the code through the compiler's parser,
23956   # not just through cpp. "Syntax error" is here to catch this case.
23957   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23958 /* end confdefs.h.  */
23959 #ifdef __STDC__
23960 # include <limits.h>
23961 #else
23962 # include <assert.h>
23963 #endif
23964                      Syntax error
23965 _ACEOF
23966 if ac_fn_c_try_cpp "$LINENO"; then :
23967 
23968 else
23969   # Broken: fails on valid input.
23970 continue
23971 fi
23972 rm -f conftest.err conftest.i conftest.$ac_ext
23973 
23974   # OK, works on sane cases.  Now check whether nonexistent headers
23975   # can be detected and how.
23976   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23977 /* end confdefs.h.  */
23978 #include <ac_nonexistent.h>
23979 _ACEOF
23980 if ac_fn_c_try_cpp "$LINENO"; then :
23981   # Broken: success on invalid input.
23982 continue
23983 else
23984   # Passes both tests.
23985 ac_preproc_ok=:
23986 break
23987 fi
23988 rm -f conftest.err conftest.i conftest.$ac_ext
23989 
23990 done
23991 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23992 rm -f conftest.i conftest.err conftest.$ac_ext
23993 if $ac_preproc_ok; then :
23994   break
23995 fi
23996 
23997     done
23998     ac_cv_prog_CPP=$CPP
23999 
24000 fi
24001   CPP=$ac_cv_prog_CPP
24002 else
24003   ac_cv_prog_CPP=$CPP
24004 fi
24005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
24006 $as_echo "$CPP" >&6; }
24007 ac_preproc_ok=false
24008 for ac_c_preproc_warn_flag in '' yes
24009 do
24010   # Use a header file that comes with gcc, so configuring glibc
24011   # with a fresh cross-compiler works.
24012   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24013   # <limits.h> exists even on freestanding compilers.
24014   # On the NeXT, cc -E runs the code through the compiler's parser,
24015   # not just through cpp. "Syntax error" is here to catch this case.
24016   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24017 /* end confdefs.h.  */
24018 #ifdef __STDC__
24019 # include <limits.h>
24020 #else
24021 # include <assert.h>
24022 #endif
24023                      Syntax error
24024 _ACEOF
24025 if ac_fn_c_try_cpp "$LINENO"; then :
24026 
24027 else
24028   # Broken: fails on valid input.
24029 continue
24030 fi
24031 rm -f conftest.err conftest.i conftest.$ac_ext
24032 
24033   # OK, works on sane cases.  Now check whether nonexistent headers
24034   # can be detected and how.
24035   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24036 /* end confdefs.h.  */
24037 #include <ac_nonexistent.h>
24038 _ACEOF
24039 if ac_fn_c_try_cpp "$LINENO"; then :
24040   # Broken: success on invalid input.
24041 continue
24042 else
24043   # Passes both tests.
24044 ac_preproc_ok=:
24045 break
24046 fi
24047 rm -f conftest.err conftest.i conftest.$ac_ext
24048 
24049 done
24050 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24051 rm -f conftest.i conftest.err conftest.$ac_ext
24052 if $ac_preproc_ok; then :
24053 
24054 else
24055   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24056 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24057 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
24058 See \`config.log' for more details" "$LINENO" 5; }
24059 fi
24060 
24061 ac_ext=cpp
24062 ac_cpp='$CXXCPP $CPPFLAGS'
24063 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24064 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24065 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24066 
24067 
24068   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24069 
24070   # First separate the path from the arguments. This will split at the first
24071   # space.
24072   complete="$CPP"
24073   path="${complete%% *}"
24074   tmp="$complete EOL"
24075   arguments="${tmp#* }"
24076 
24077   # Input might be given as Windows format, start by converting to
24078   # unix format.
24079   new_path=`$CYGPATH -u "$path"`
24080 
24081   # Now try to locate executable using which
24082   new_path=`$WHICH "$new_path" 2> /dev/null`
24083   # bat and cmd files are not always considered executable in cygwin causing which
24084   # to not find them
24085   if test "x$new_path" = x \
24086            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24087            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24088     new_path=`$CYGPATH -u "$path"`
24089   fi
24090   if test "x$new_path" = x; then
24091     # Oops. Which didn't find the executable.
24092     # The splitting of arguments from the executable at a space might have been incorrect,
24093     # since paths with space are more likely in Windows. Give it another try with the whole
24094     # argument.
24095     path="$complete"
24096     arguments="EOL"
24097     new_path=`$CYGPATH -u "$path"`
24098     new_path=`$WHICH "$new_path" 2> /dev/null`
24099     # bat and cmd files are not always considered executable in cygwin causing which
24100     # to not find them
24101     if test "x$new_path" = x \
24102              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24103              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24104       new_path=`$CYGPATH -u "$path"`
24105     fi
24106     if test "x$new_path" = x; then
24107       # It's still not found. Now this is an unrecoverable error.
24108       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24109 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24110       has_space=`$ECHO "$complete" | $GREP " "`
24111       if test "x$has_space" != x; then
24112         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24113 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24114       fi
24115       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24116     fi
24117   fi
24118 
24119   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24120   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24121   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24122   # "foo.exe" is OK but "foo" is an error.
24123   #
24124   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24125   # It is also a way to make sure we got the proper file name for the real test later on.
24126   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24127   if test "x$test_shortpath" = x; then
24128     # Short path failed, file does not exist as specified.
24129     # Try adding .exe or .cmd
24130     if test -f "${new_path}.exe"; then
24131        input_to_shortpath="${new_path}.exe"
24132     elif test -f "${new_path}.cmd"; then
24133        input_to_shortpath="${new_path}.cmd"
24134     else
24135       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
24136 $as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
24137       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24138 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24139       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24140     fi
24141   else
24142     input_to_shortpath="$new_path"
24143   fi
24144 
24145   # Call helper function which possibly converts this using DOS-style short mode.
24146   # If so, the updated path is stored in $new_path.
24147   new_path="$input_to_shortpath"
24148 
24149   input_path="$input_to_shortpath"
24150   # Check if we need to convert this using DOS-style short mode. If the path
24151   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24152   # take no chances and rewrite it.
24153   # Note: m4 eats our [], so we need to use [ and ] instead.
24154   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24155   if test "x$has_forbidden_chars" != x; then
24156     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24157     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24158     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24159     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24160       # Going to short mode and back again did indeed matter. Since short mode is
24161       # case insensitive, let's make it lowercase to improve readability.
24162       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24163       # Now convert it back to Unix-stile (cygpath)
24164       input_path=`$CYGPATH -u "$shortmode_path"`
24165       new_path="$input_path"
24166     fi
24167   fi
24168 
24169   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24170   if test "x$test_cygdrive_prefix" = x; then
24171     # As a simple fix, exclude /usr/bin since it's not a real path.
24172     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24173       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24174       # a path prefixed by /cygdrive for fixpath to work.
24175       new_path="$CYGWIN_ROOT_PATH$input_path"
24176     fi
24177   fi
24178 
24179   # remove trailing .exe if any
24180   new_path="${new_path/%.exe/}"
24181 
24182   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24183 
24184   # First separate the path from the arguments. This will split at the first
24185   # space.
24186   complete="$CPP"
24187   path="${complete%% *}"
24188   tmp="$complete EOL"
24189   arguments="${tmp#* }"
24190 
24191   # Input might be given as Windows format, start by converting to
24192   # unix format.
24193   new_path="$path"
24194 
24195   windows_path="$new_path"
24196   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24197     unix_path=`$CYGPATH -u "$windows_path"`
24198     new_path="$unix_path"
24199   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24200     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24201     new_path="$unix_path"
24202   fi
24203 
24204 
24205   # Now try to locate executable using which
24206   new_path=`$WHICH "$new_path" 2> /dev/null`
24207 
24208   if test "x$new_path" = x; then
24209     # Oops. Which didn't find the executable.
24210     # The splitting of arguments from the executable at a space might have been incorrect,
24211     # since paths with space are more likely in Windows. Give it another try with the whole
24212     # argument.
24213     path="$complete"
24214     arguments="EOL"
24215     new_path="$path"
24216 
24217   windows_path="$new_path"
24218   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24219     unix_path=`$CYGPATH -u "$windows_path"`
24220     new_path="$unix_path"
24221   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24222     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24223     new_path="$unix_path"
24224   fi
24225 
24226 
24227     new_path=`$WHICH "$new_path" 2> /dev/null`
24228 
24229     if test "x$new_path" = x; then
24230       # It's still not found. Now this is an unrecoverable error.
24231       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24232 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24233       has_space=`$ECHO "$complete" | $GREP " "`
24234       if test "x$has_space" != x; then
24235         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24236 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24237       fi
24238       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24239     fi
24240   fi
24241 
24242   # Now new_path has a complete unix path to the binary
24243   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24244     # Keep paths in /bin as-is, but remove trailing .exe if any
24245     new_path="${new_path/%.exe/}"
24246     # Do not save /bin paths to all_fixpath_prefixes!
24247   else
24248     # Not in mixed or Windows style, start by that.
24249     new_path=`cmd //c echo $new_path`
24250 
24251   input_path="$new_path"
24252   # Check if we need to convert this using DOS-style short mode. If the path
24253   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24254   # take no chances and rewrite it.
24255   # Note: m4 eats our [], so we need to use [ and ] instead.
24256   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24257   if test "x$has_forbidden_chars" != x; then
24258     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24259     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24260   fi
24261 
24262     # Output is in $new_path
24263 
24264   windows_path="$new_path"
24265   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24266     unix_path=`$CYGPATH -u "$windows_path"`
24267     new_path="$unix_path"
24268   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24269     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24270     new_path="$unix_path"
24271   fi
24272 
24273     # remove trailing .exe if any
24274     new_path="${new_path/%.exe/}"
24275 
24276     # Save the first 10 bytes of this path to the storage, so fixpath can work.
24277     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24278   fi
24279 
24280   else
24281     # We're on a posix platform. Hooray! :)
24282     # First separate the path from the arguments. This will split at the first
24283     # space.
24284     complete="$CPP"
24285     path="${complete%% *}"
24286     tmp="$complete EOL"
24287     arguments="${tmp#* }"
24288 
24289     # Cannot rely on the command "which" here since it doesn't always work.
24290     is_absolute_path=`$ECHO "$path" | $GREP ^/`
24291     if test -z "$is_absolute_path"; then
24292       # Path to executable is not absolute. Find it.
24293       IFS_save="$IFS"
24294       IFS=:
24295       for p in $PATH; do
24296         if test -f "$p/$path" && test -x "$p/$path"; then
24297           new_path="$p/$path"
24298           break
24299         fi
24300       done
24301       IFS="$IFS_save"
24302     else
24303       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5
24304 $as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;}
24305       new_path="$path"
24306     fi
24307 
24308     if test "x$new_path" = x; then
24309         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24310 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24311         has_space=`$ECHO "$complete" | $GREP " "`
24312         if test "x$has_space" != x; then
24313           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24314 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24315         fi
24316         as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24317       fi
24318   fi
24319 
24320       # Now join together the path and the arguments once again
24321       if test "x$arguments" != xEOL; then
24322         new_complete="$new_path ${arguments% *}"
24323       else
24324         new_complete="$new_path"
24325       fi
24326 
24327   if test "x$complete" != "x$new_complete"; then
24328       CPP="$new_complete"
24329       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
24330 $as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
24331     fi
24332 
24333 
24334 ac_ext=cpp
24335 ac_cpp='$CXXCPP $CPPFLAGS'
24336 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24337 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24338 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24339 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
24340 $as_echo_n "checking how to run the C++ preprocessor... " >&6; }
24341 if test -z "$CXXCPP"; then
24342   if ${ac_cv_prog_CXXCPP+:} false; then :
24343   $as_echo_n "(cached) " >&6
24344 else
24345       # Double quotes because CXXCPP needs to be expanded
24346     for CXXCPP in "$CXX -E" "/lib/cpp"
24347     do
24348       ac_preproc_ok=false
24349 for ac_cxx_preproc_warn_flag in '' yes
24350 do
24351   # Use a header file that comes with gcc, so configuring glibc
24352   # with a fresh cross-compiler works.
24353   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24354   # <limits.h> exists even on freestanding compilers.
24355   # On the NeXT, cc -E runs the code through the compiler's parser,
24356   # not just through cpp. "Syntax error" is here to catch this case.
24357   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24358 /* end confdefs.h.  */
24359 #ifdef __STDC__
24360 # include <limits.h>
24361 #else
24362 # include <assert.h>
24363 #endif
24364                      Syntax error
24365 _ACEOF
24366 if ac_fn_cxx_try_cpp "$LINENO"; then :
24367 
24368 else
24369   # Broken: fails on valid input.
24370 continue
24371 fi
24372 rm -f conftest.err conftest.i conftest.$ac_ext
24373 
24374   # OK, works on sane cases.  Now check whether nonexistent headers
24375   # can be detected and how.
24376   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24377 /* end confdefs.h.  */
24378 #include <ac_nonexistent.h>
24379 _ACEOF
24380 if ac_fn_cxx_try_cpp "$LINENO"; then :
24381   # Broken: success on invalid input.
24382 continue
24383 else
24384   # Passes both tests.
24385 ac_preproc_ok=:
24386 break
24387 fi
24388 rm -f conftest.err conftest.i conftest.$ac_ext
24389 
24390 done
24391 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24392 rm -f conftest.i conftest.err conftest.$ac_ext
24393 if $ac_preproc_ok; then :
24394   break
24395 fi
24396 
24397     done
24398     ac_cv_prog_CXXCPP=$CXXCPP
24399 
24400 fi
24401   CXXCPP=$ac_cv_prog_CXXCPP
24402 else
24403   ac_cv_prog_CXXCPP=$CXXCPP
24404 fi
24405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
24406 $as_echo "$CXXCPP" >&6; }
24407 ac_preproc_ok=false
24408 for ac_cxx_preproc_warn_flag in '' yes
24409 do
24410   # Use a header file that comes with gcc, so configuring glibc
24411   # with a fresh cross-compiler works.
24412   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24413   # <limits.h> exists even on freestanding compilers.
24414   # On the NeXT, cc -E runs the code through the compiler's parser,
24415   # not just through cpp. "Syntax error" is here to catch this case.
24416   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24417 /* end confdefs.h.  */
24418 #ifdef __STDC__
24419 # include <limits.h>
24420 #else
24421 # include <assert.h>
24422 #endif
24423                      Syntax error
24424 _ACEOF
24425 if ac_fn_cxx_try_cpp "$LINENO"; then :
24426 
24427 else
24428   # Broken: fails on valid input.
24429 continue
24430 fi
24431 rm -f conftest.err conftest.i conftest.$ac_ext
24432 
24433   # OK, works on sane cases.  Now check whether nonexistent headers
24434   # can be detected and how.
24435   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24436 /* end confdefs.h.  */
24437 #include <ac_nonexistent.h>
24438 _ACEOF
24439 if ac_fn_cxx_try_cpp "$LINENO"; then :
24440   # Broken: success on invalid input.
24441 continue
24442 else
24443   # Passes both tests.
24444 ac_preproc_ok=:
24445 break
24446 fi
24447 rm -f conftest.err conftest.i conftest.$ac_ext
24448 
24449 done
24450 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24451 rm -f conftest.i conftest.err conftest.$ac_ext
24452 if $ac_preproc_ok; then :
24453 
24454 else
24455   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24456 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24457 as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
24458 See \`config.log' for more details" "$LINENO" 5; }
24459 fi
24460 
24461 ac_ext=cpp
24462 ac_cpp='$CXXCPP $CPPFLAGS'
24463 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24464 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24465 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24466 
24467 
24468   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24469 
24470   # First separate the path from the arguments. This will split at the first
24471   # space.
24472   complete="$CXXCPP"
24473   path="${complete%% *}"
24474   tmp="$complete EOL"
24475   arguments="${tmp#* }"
24476 
24477   # Input might be given as Windows format, start by converting to
24478   # unix format.
24479   new_path=`$CYGPATH -u "$path"`
24480 
24481   # Now try to locate executable using which
24482   new_path=`$WHICH "$new_path" 2> /dev/null`
24483   # bat and cmd files are not always considered executable in cygwin causing which
24484   # to not find them
24485   if test "x$new_path" = x \
24486            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24487            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24488     new_path=`$CYGPATH -u "$path"`
24489   fi
24490   if test "x$new_path" = x; then
24491     # Oops. Which didn't find the executable.
24492     # The splitting of arguments from the executable at a space might have been incorrect,
24493     # since paths with space are more likely in Windows. Give it another try with the whole
24494     # argument.
24495     path="$complete"
24496     arguments="EOL"
24497     new_path=`$CYGPATH -u "$path"`
24498     new_path=`$WHICH "$new_path" 2> /dev/null`
24499     # bat and cmd files are not always considered executable in cygwin causing which
24500     # to not find them
24501     if test "x$new_path" = x \
24502              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24503              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24504       new_path=`$CYGPATH -u "$path"`
24505     fi
24506     if test "x$new_path" = x; then
24507       # It's still not found. Now this is an unrecoverable error.
24508       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24509 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24510       has_space=`$ECHO "$complete" | $GREP " "`
24511       if test "x$has_space" != x; then
24512         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24513 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24514       fi
24515       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24516     fi
24517   fi
24518 
24519   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24520   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24521   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24522   # "foo.exe" is OK but "foo" is an error.
24523   #
24524   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24525   # It is also a way to make sure we got the proper file name for the real test later on.
24526   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24527   if test "x$test_shortpath" = x; then
24528     # Short path failed, file does not exist as specified.
24529     # Try adding .exe or .cmd
24530     if test -f "${new_path}.exe"; then
24531        input_to_shortpath="${new_path}.exe"
24532     elif test -f "${new_path}.cmd"; then
24533        input_to_shortpath="${new_path}.cmd"
24534     else
24535       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
24536 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
24537       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24538 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24539       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24540     fi
24541   else
24542     input_to_shortpath="$new_path"
24543   fi
24544 
24545   # Call helper function which possibly converts this using DOS-style short mode.
24546   # If so, the updated path is stored in $new_path.
24547   new_path="$input_to_shortpath"
24548 
24549   input_path="$input_to_shortpath"
24550   # Check if we need to convert this using DOS-style short mode. If the path
24551   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24552   # take no chances and rewrite it.
24553   # Note: m4 eats our [], so we need to use [ and ] instead.
24554   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24555   if test "x$has_forbidden_chars" != x; then
24556     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24557     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24558     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24559     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24560       # Going to short mode and back again did indeed matter. Since short mode is
24561       # case insensitive, let's make it lowercase to improve readability.
24562       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24563       # Now convert it back to Unix-stile (cygpath)
24564       input_path=`$CYGPATH -u "$shortmode_path"`
24565       new_path="$input_path"
24566     fi
24567   fi
24568 
24569   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24570   if test "x$test_cygdrive_prefix" = x; then
24571     # As a simple fix, exclude /usr/bin since it's not a real path.
24572     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24573       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24574       # a path prefixed by /cygdrive for fixpath to work.
24575       new_path="$CYGWIN_ROOT_PATH$input_path"
24576     fi
24577   fi
24578 
24579   # remove trailing .exe if any
24580   new_path="${new_path/%.exe/}"
24581 
24582   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24583 
24584   # First separate the path from the arguments. This will split at the first
24585   # space.
24586   complete="$CXXCPP"
24587   path="${complete%% *}"
24588   tmp="$complete EOL"
24589   arguments="${tmp#* }"
24590 
24591   # Input might be given as Windows format, start by converting to
24592   # unix format.
24593   new_path="$path"
24594 
24595   windows_path="$new_path"
24596   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24597     unix_path=`$CYGPATH -u "$windows_path"`
24598     new_path="$unix_path"
24599   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24600     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24601     new_path="$unix_path"
24602   fi
24603 
24604 
24605   # Now try to locate executable using which
24606   new_path=`$WHICH "$new_path" 2> /dev/null`
24607 
24608   if test "x$new_path" = x; then
24609     # Oops. Which didn't find the executable.
24610     # The splitting of arguments from the executable at a space might have been incorrect,
24611     # since paths with space are more likely in Windows. Give it another try with the whole
24612     # argument.
24613     path="$complete"
24614     arguments="EOL"
24615     new_path="$path"
24616 
24617   windows_path="$new_path"
24618   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24619     unix_path=`$CYGPATH -u "$windows_path"`
24620     new_path="$unix_path"
24621   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24622     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24623     new_path="$unix_path"
24624   fi
24625 
24626 
24627     new_path=`$WHICH "$new_path" 2> /dev/null`
24628 
24629     if test "x$new_path" = x; then
24630       # It's still not found. Now this is an unrecoverable error.
24631       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24632 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24633       has_space=`$ECHO "$complete" | $GREP " "`
24634       if test "x$has_space" != x; then
24635         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24636 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24637       fi
24638       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24639     fi
24640   fi
24641 
24642   # Now new_path has a complete unix path to the binary
24643   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24644     # Keep paths in /bin as-is, but remove trailing .exe if any
24645     new_path="${new_path/%.exe/}"
24646     # Do not save /bin paths to all_fixpath_prefixes!
24647   else
24648     # Not in mixed or Windows style, start by that.
24649     new_path=`cmd //c echo $new_path`
24650 
24651   input_path="$new_path"
24652   # Check if we need to convert this using DOS-style short mode. If the path
24653   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24654   # take no chances and rewrite it.
24655   # Note: m4 eats our [], so we need to use [ and ] instead.
24656   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24657   if test "x$has_forbidden_chars" != x; then
24658     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24659     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24660   fi
24661 
24662     # Output is in $new_path
24663 
24664   windows_path="$new_path"
24665   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24666     unix_path=`$CYGPATH -u "$windows_path"`
24667     new_path="$unix_path"
24668   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24669     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24670     new_path="$unix_path"
24671   fi
24672 
24673     # remove trailing .exe if any
24674     new_path="${new_path/%.exe/}"
24675 
24676     # Save the first 10 bytes of this path to the storage, so fixpath can work.
24677     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24678   fi
24679 
24680   else
24681     # We're on a posix platform. Hooray! :)
24682     # First separate the path from the arguments. This will split at the first
24683     # space.
24684     complete="$CXXCPP"
24685     path="${complete%% *}"
24686     tmp="$complete EOL"
24687     arguments="${tmp#* }"
24688 
24689     # Cannot rely on the command "which" here since it doesn't always work.
24690     is_absolute_path=`$ECHO "$path" | $GREP ^/`
24691     if test -z "$is_absolute_path"; then
24692       # Path to executable is not absolute. Find it.
24693       IFS_save="$IFS"
24694       IFS=:
24695       for p in $PATH; do
24696         if test -f "$p/$path" && test -x "$p/$path"; then
24697           new_path="$p/$path"
24698           break
24699         fi
24700       done
24701       IFS="$IFS_save"
24702     else
24703       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5
24704 $as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;}
24705       new_path="$path"
24706     fi
24707 
24708     if test "x$new_path" = x; then
24709         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24710 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24711         has_space=`$ECHO "$complete" | $GREP " "`
24712         if test "x$has_space" != x; then
24713           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24714 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24715         fi
24716         as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24717       fi
24718   fi
24719 
24720       # Now join together the path and the arguments once again
24721       if test "x$arguments" != xEOL; then
24722         new_complete="$new_path ${arguments% *}"
24723       else
24724         new_complete="$new_path"
24725       fi
24726 
24727   if test "x$complete" != "x$new_complete"; then
24728       CXXCPP="$new_complete"
24729       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
24730 $as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
24731     fi
24732 
24733 
24734 if test "x$COMPILE_TYPE" != "xcross"; then
24735     # If we are not cross compiling, use the same compilers for
24736     # building the build platform executables. The cross-compilation
24737     # case needed to be done earlier, but this can only be done after
24738     # the native tools have been localized.
24739     BUILD_CC="$CC"
24740     BUILD_CXX="$CXX"
24741     BUILD_LD="$LD"
24742 fi
24743 
24744 # for solaris we really need solaris tools, and not gnu equivalent
24745 #   these seems to normally reside in /usr/ccs/bin so add that to path before
24746 #   starting to probe
24747 #
24748 #   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
24749 #         so that it can be overriden --with-tools-dir
24750 if test "x$OPENJDK_BUILD_OS" = xsolaris; then
24751     PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
24752 fi
24753 
24754 # Find the right assembler.
24755 if test "x$OPENJDK_TARGET_OS" = xsolaris; then
24756     # Extract the first word of "as", so it can be a program name with args.
24757 set dummy as; ac_word=$2
24758 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24759 $as_echo_n "checking for $ac_word... " >&6; }
24760 if ${ac_cv_path_AS+:} false; then :
24761   $as_echo_n "(cached) " >&6
24762 else
24763   case $AS in
24764   [\\/]* | ?:[\\/]*)
24765   ac_cv_path_AS="$AS" # Let the user override the test with a path.
24766   ;;
24767   *)
24768   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24769 for as_dir in $PATH
24770 do
24771   IFS=$as_save_IFS
24772   test -z "$as_dir" && as_dir=.
24773     for ac_exec_ext in '' $ac_executable_extensions; do
24774   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24775     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
24776     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24777     break 2
24778   fi
24779 done
24780   done
24781 IFS=$as_save_IFS
24782 
24783   ;;
24784 esac
24785 fi
24786 AS=$ac_cv_path_AS
24787 if test -n "$AS"; then
24788   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
24789 $as_echo "$AS" >&6; }
24790 else
24791   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24792 $as_echo "no" >&6; }
24793 fi
24794 
24795 
24796 
24797   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24798 
24799   # First separate the path from the arguments. This will split at the first
24800   # space.
24801   complete="$AS"
24802   path="${complete%% *}"
24803   tmp="$complete EOL"
24804   arguments="${tmp#* }"
24805 
24806   # Input might be given as Windows format, start by converting to
24807   # unix format.
24808   new_path=`$CYGPATH -u "$path"`
24809 
24810   # Now try to locate executable using which
24811   new_path=`$WHICH "$new_path" 2> /dev/null`
24812   # bat and cmd files are not always considered executable in cygwin causing which
24813   # to not find them
24814   if test "x$new_path" = x \
24815            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24816            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24817     new_path=`$CYGPATH -u "$path"`
24818   fi
24819   if test "x$new_path" = x; then
24820     # Oops. Which didn't find the executable.
24821     # The splitting of arguments from the executable at a space might have been incorrect,
24822     # since paths with space are more likely in Windows. Give it another try with the whole
24823     # argument.
24824     path="$complete"
24825     arguments="EOL"
24826     new_path=`$CYGPATH -u "$path"`
24827     new_path=`$WHICH "$new_path" 2> /dev/null`
24828     # bat and cmd files are not always considered executable in cygwin causing which
24829     # to not find them
24830     if test "x$new_path" = x \
24831              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24832              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24833       new_path=`$CYGPATH -u "$path"`
24834     fi
24835     if test "x$new_path" = x; then
24836       # It's still not found. Now this is an unrecoverable error.
24837       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
24838 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24839       has_space=`$ECHO "$complete" | $GREP " "`
24840       if test "x$has_space" != x; then
24841         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24842 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24843       fi
24844       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24845     fi
24846   fi
24847 
24848   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24849   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24850   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24851   # "foo.exe" is OK but "foo" is an error.
24852   #
24853   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24854   # It is also a way to make sure we got the proper file name for the real test later on.
24855   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24856   if test "x$test_shortpath" = x; then
24857     # Short path failed, file does not exist as specified.
24858     # Try adding .exe or .cmd
24859     if test -f "${new_path}.exe"; then
24860        input_to_shortpath="${new_path}.exe"
24861     elif test -f "${new_path}.cmd"; then
24862        input_to_shortpath="${new_path}.cmd"
24863     else
24864       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
24865 $as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
24866       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24867 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24868       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24869     fi
24870   else
24871     input_to_shortpath="$new_path"
24872   fi
24873 
24874   # Call helper function which possibly converts this using DOS-style short mode.
24875   # If so, the updated path is stored in $new_path.
24876   new_path="$input_to_shortpath"
24877 
24878   input_path="$input_to_shortpath"
24879   # Check if we need to convert this using DOS-style short mode. If the path
24880   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24881   # take no chances and rewrite it.
24882   # Note: m4 eats our [], so we need to use [ and ] instead.
24883   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24884   if test "x$has_forbidden_chars" != x; then
24885     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24886     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24887     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24888     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24889       # Going to short mode and back again did indeed matter. Since short mode is
24890       # case insensitive, let's make it lowercase to improve readability.
24891       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24892       # Now convert it back to Unix-stile (cygpath)
24893       input_path=`$CYGPATH -u "$shortmode_path"`
24894       new_path="$input_path"
24895     fi
24896   fi
24897 
24898   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24899   if test "x$test_cygdrive_prefix" = x; then
24900     # As a simple fix, exclude /usr/bin since it's not a real path.
24901     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24902       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24903       # a path prefixed by /cygdrive for fixpath to work.
24904       new_path="$CYGWIN_ROOT_PATH$input_path"
24905     fi
24906   fi
24907 
24908   # remove trailing .exe if any
24909   new_path="${new_path/%.exe/}"
24910 
24911   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24912 
24913   # First separate the path from the arguments. This will split at the first
24914   # space.
24915   complete="$AS"
24916   path="${complete%% *}"
24917   tmp="$complete EOL"
24918   arguments="${tmp#* }"
24919 
24920   # Input might be given as Windows format, start by converting to
24921   # unix format.
24922   new_path="$path"
24923 
24924   windows_path="$new_path"
24925   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24926     unix_path=`$CYGPATH -u "$windows_path"`
24927     new_path="$unix_path"
24928   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24929     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24930     new_path="$unix_path"
24931   fi
24932 
24933 
24934   # Now try to locate executable using which
24935   new_path=`$WHICH "$new_path" 2> /dev/null`
24936 
24937   if test "x$new_path" = x; then
24938     # Oops. Which didn't find the executable.
24939     # The splitting of arguments from the executable at a space might have been incorrect,
24940     # since paths with space are more likely in Windows. Give it another try with the whole
24941     # argument.
24942     path="$complete"
24943     arguments="EOL"
24944     new_path="$path"
24945 
24946   windows_path="$new_path"
24947   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24948     unix_path=`$CYGPATH -u "$windows_path"`
24949     new_path="$unix_path"
24950   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24951     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24952     new_path="$unix_path"
24953   fi
24954 
24955 
24956     new_path=`$WHICH "$new_path" 2> /dev/null`
24957 
24958     if test "x$new_path" = x; then
24959       # It's still not found. Now this is an unrecoverable error.
24960       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
24961 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24962       has_space=`$ECHO "$complete" | $GREP " "`
24963       if test "x$has_space" != x; then
24964         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24965 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24966       fi
24967       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24968     fi
24969   fi
24970 
24971   # Now new_path has a complete unix path to the binary
24972   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24973     # Keep paths in /bin as-is, but remove trailing .exe if any
24974     new_path="${new_path/%.exe/}"
24975     # Do not save /bin paths to all_fixpath_prefixes!
24976   else
24977     # Not in mixed or Windows style, start by that.
24978     new_path=`cmd //c echo $new_path`
24979 
24980   input_path="$new_path"
24981   # Check if we need to convert this using DOS-style short mode. If the path
24982   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24983   # take no chances and rewrite it.
24984   # Note: m4 eats our [], so we need to use [ and ] instead.
24985   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24986   if test "x$has_forbidden_chars" != x; then
24987     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24988     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24989   fi
24990 
24991     # Output is in $new_path
24992 
24993   windows_path="$new_path"
24994   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24995     unix_path=`$CYGPATH -u "$windows_path"`
24996     new_path="$unix_path"
24997   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24998     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24999     new_path="$unix_path"
25000   fi
25001 
25002     # remove trailing .exe if any
25003     new_path="${new_path/%.exe/}"
25004 
25005     # Save the first 10 bytes of this path to the storage, so fixpath can work.
25006     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25007   fi
25008 
25009   else
25010     # We're on a posix platform. Hooray! :)
25011     # First separate the path from the arguments. This will split at the first
25012     # space.
25013     complete="$AS"
25014     path="${complete%% *}"
25015     tmp="$complete EOL"
25016     arguments="${tmp#* }"
25017 
25018     # Cannot rely on the command "which" here since it doesn't always work.
25019     is_absolute_path=`$ECHO "$path" | $GREP ^/`
25020     if test -z "$is_absolute_path"; then
25021       # Path to executable is not absolute. Find it.
25022       IFS_save="$IFS"
25023       IFS=:
25024       for p in $PATH; do
25025         if test -f "$p/$path" && test -x "$p/$path"; then
25026           new_path="$p/$path"
25027           break
25028         fi
25029       done
25030       IFS="$IFS_save"
25031     else
25032       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5
25033 $as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;}
25034       new_path="$path"
25035     fi
25036 
25037     if test "x$new_path" = x; then
25038         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25039 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25040         has_space=`$ECHO "$complete" | $GREP " "`
25041         if test "x$has_space" != x; then
25042           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25043 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25044         fi
25045         as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25046       fi
25047   fi
25048 
25049       # Now join together the path and the arguments once again
25050       if test "x$arguments" != xEOL; then
25051         new_complete="$new_path ${arguments% *}"
25052       else
25053         new_complete="$new_path"
25054       fi
25055 
25056   if test "x$complete" != "x$new_complete"; then
25057       AS="$new_complete"
25058       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
25059 $as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
25060     fi
25061 
25062 else
25063     AS="$CC -c"
25064 fi
25065 
25066 
25067 if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25068     for ac_prog in gnm nm
25069 do
25070   # Extract the first word of "$ac_prog", so it can be a program name with args.
25071 set dummy $ac_prog; ac_word=$2
25072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25073 $as_echo_n "checking for $ac_word... " >&6; }
25074 if ${ac_cv_path_NM+:} false; then :
25075   $as_echo_n "(cached) " >&6
25076 else
25077   case $NM in
25078   [\\/]* | ?:[\\/]*)
25079   ac_cv_path_NM="$NM" # Let the user override the test with a path.
25080   ;;
25081   *)
25082   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25083 for as_dir in $PATH
25084 do
25085   IFS=$as_save_IFS
25086   test -z "$as_dir" && as_dir=.
25087     for ac_exec_ext in '' $ac_executable_extensions; do
25088   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25089     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
25090     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25091     break 2
25092   fi
25093 done
25094   done
25095 IFS=$as_save_IFS
25096 
25097   ;;
25098 esac
25099 fi
25100 NM=$ac_cv_path_NM
25101 if test -n "$NM"; then
25102   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
25103 $as_echo "$NM" >&6; }
25104 else
25105   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25106 $as_echo "no" >&6; }
25107 fi
25108 
25109 
25110   test -n "$NM" && break
25111 done
25112 
25113 
25114   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25115 
25116   # First separate the path from the arguments. This will split at the first
25117   # space.
25118   complete="$NM"
25119   path="${complete%% *}"
25120   tmp="$complete EOL"
25121   arguments="${tmp#* }"
25122 
25123   # Input might be given as Windows format, start by converting to
25124   # unix format.
25125   new_path=`$CYGPATH -u "$path"`
25126 
25127   # Now try to locate executable using which
25128   new_path=`$WHICH "$new_path" 2> /dev/null`
25129   # bat and cmd files are not always considered executable in cygwin causing which
25130   # to not find them
25131   if test "x$new_path" = x \
25132            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25133            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25134     new_path=`$CYGPATH -u "$path"`
25135   fi
25136   if test "x$new_path" = x; then
25137     # Oops. Which didn't find the executable.
25138     # The splitting of arguments from the executable at a space might have been incorrect,
25139     # since paths with space are more likely in Windows. Give it another try with the whole
25140     # argument.
25141     path="$complete"
25142     arguments="EOL"
25143     new_path=`$CYGPATH -u "$path"`
25144     new_path=`$WHICH "$new_path" 2> /dev/null`
25145     # bat and cmd files are not always considered executable in cygwin causing which
25146     # to not find them
25147     if test "x$new_path" = x \
25148              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25149              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25150       new_path=`$CYGPATH -u "$path"`
25151     fi
25152     if test "x$new_path" = x; then
25153       # It's still not found. Now this is an unrecoverable error.
25154       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25155 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25156       has_space=`$ECHO "$complete" | $GREP " "`
25157       if test "x$has_space" != x; then
25158         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25159 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25160       fi
25161       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25162     fi
25163   fi
25164 
25165   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25166   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25167   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25168   # "foo.exe" is OK but "foo" is an error.
25169   #
25170   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25171   # It is also a way to make sure we got the proper file name for the real test later on.
25172   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25173   if test "x$test_shortpath" = x; then
25174     # Short path failed, file does not exist as specified.
25175     # Try adding .exe or .cmd
25176     if test -f "${new_path}.exe"; then
25177        input_to_shortpath="${new_path}.exe"
25178     elif test -f "${new_path}.cmd"; then
25179        input_to_shortpath="${new_path}.cmd"
25180     else
25181       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
25182 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
25183       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25184 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25185       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25186     fi
25187   else
25188     input_to_shortpath="$new_path"
25189   fi
25190 
25191   # Call helper function which possibly converts this using DOS-style short mode.
25192   # If so, the updated path is stored in $new_path.
25193   new_path="$input_to_shortpath"
25194 
25195   input_path="$input_to_shortpath"
25196   # Check if we need to convert this using DOS-style short mode. If the path
25197   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25198   # take no chances and rewrite it.
25199   # Note: m4 eats our [], so we need to use [ and ] instead.
25200   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25201   if test "x$has_forbidden_chars" != x; then
25202     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25203     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25204     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25205     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25206       # Going to short mode and back again did indeed matter. Since short mode is
25207       # case insensitive, let's make it lowercase to improve readability.
25208       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25209       # Now convert it back to Unix-stile (cygpath)
25210       input_path=`$CYGPATH -u "$shortmode_path"`
25211       new_path="$input_path"
25212     fi
25213   fi
25214 
25215   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25216   if test "x$test_cygdrive_prefix" = x; then
25217     # As a simple fix, exclude /usr/bin since it's not a real path.
25218     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25219       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25220       # a path prefixed by /cygdrive for fixpath to work.
25221       new_path="$CYGWIN_ROOT_PATH$input_path"
25222     fi
25223   fi
25224 
25225   # remove trailing .exe if any
25226   new_path="${new_path/%.exe/}"
25227 
25228   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25229 
25230   # First separate the path from the arguments. This will split at the first
25231   # space.
25232   complete="$NM"
25233   path="${complete%% *}"
25234   tmp="$complete EOL"
25235   arguments="${tmp#* }"
25236 
25237   # Input might be given as Windows format, start by converting to
25238   # unix format.
25239   new_path="$path"
25240 
25241   windows_path="$new_path"
25242   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25243     unix_path=`$CYGPATH -u "$windows_path"`
25244     new_path="$unix_path"
25245   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25246     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25247     new_path="$unix_path"
25248   fi
25249 
25250 
25251   # Now try to locate executable using which
25252   new_path=`$WHICH "$new_path" 2> /dev/null`
25253 
25254   if test "x$new_path" = x; then
25255     # Oops. Which didn't find the executable.
25256     # The splitting of arguments from the executable at a space might have been incorrect,
25257     # since paths with space are more likely in Windows. Give it another try with the whole
25258     # argument.
25259     path="$complete"
25260     arguments="EOL"
25261     new_path="$path"
25262 
25263   windows_path="$new_path"
25264   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25265     unix_path=`$CYGPATH -u "$windows_path"`
25266     new_path="$unix_path"
25267   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25268     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25269     new_path="$unix_path"
25270   fi
25271 
25272 
25273     new_path=`$WHICH "$new_path" 2> /dev/null`
25274 
25275     if test "x$new_path" = x; then
25276       # It's still not found. Now this is an unrecoverable error.
25277       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25278 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25279       has_space=`$ECHO "$complete" | $GREP " "`
25280       if test "x$has_space" != x; then
25281         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25282 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25283       fi
25284       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25285     fi
25286   fi
25287 
25288   # Now new_path has a complete unix path to the binary
25289   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25290     # Keep paths in /bin as-is, but remove trailing .exe if any
25291     new_path="${new_path/%.exe/}"
25292     # Do not save /bin paths to all_fixpath_prefixes!
25293   else
25294     # Not in mixed or Windows style, start by that.
25295     new_path=`cmd //c echo $new_path`
25296 
25297   input_path="$new_path"
25298   # Check if we need to convert this using DOS-style short mode. If the path
25299   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25300   # take no chances and rewrite it.
25301   # Note: m4 eats our [], so we need to use [ and ] instead.
25302   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25303   if test "x$has_forbidden_chars" != x; then
25304     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25305     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25306   fi
25307 
25308     # Output is in $new_path
25309 
25310   windows_path="$new_path"
25311   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25312     unix_path=`$CYGPATH -u "$windows_path"`
25313     new_path="$unix_path"
25314   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25315     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25316     new_path="$unix_path"
25317   fi
25318 
25319     # remove trailing .exe if any
25320     new_path="${new_path/%.exe/}"
25321 
25322     # Save the first 10 bytes of this path to the storage, so fixpath can work.
25323     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25324   fi
25325 
25326   else
25327     # We're on a posix platform. Hooray! :)
25328     # First separate the path from the arguments. This will split at the first
25329     # space.
25330     complete="$NM"
25331     path="${complete%% *}"
25332     tmp="$complete EOL"
25333     arguments="${tmp#* }"
25334 
25335     # Cannot rely on the command "which" here since it doesn't always work.
25336     is_absolute_path=`$ECHO "$path" | $GREP ^/`
25337     if test -z "$is_absolute_path"; then
25338       # Path to executable is not absolute. Find it.
25339       IFS_save="$IFS"
25340       IFS=:
25341       for p in $PATH; do
25342         if test -f "$p/$path" && test -x "$p/$path"; then
25343           new_path="$p/$path"
25344           break
25345         fi
25346       done
25347       IFS="$IFS_save"
25348     else
25349       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
25350 $as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
25351       new_path="$path"
25352     fi
25353 
25354     if test "x$new_path" = x; then
25355         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25356 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25357         has_space=`$ECHO "$complete" | $GREP " "`
25358         if test "x$has_space" != x; then
25359           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25360 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25361         fi
25362         as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25363       fi
25364   fi
25365 
25366       # Now join together the path and the arguments once again
25367       if test "x$arguments" != xEOL; then
25368         new_complete="$new_path ${arguments% *}"
25369       else
25370         new_complete="$new_path"
25371       fi
25372 
25373   if test "x$complete" != "x$new_complete"; then
25374       NM="$new_complete"
25375       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
25376 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
25377     fi
25378 
25379     # Extract the first word of "strip", so it can be a program name with args.
25380 set dummy strip; ac_word=$2
25381 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25382 $as_echo_n "checking for $ac_word... " >&6; }
25383 if ${ac_cv_path_STRIP+:} false; then :
25384   $as_echo_n "(cached) " >&6
25385 else
25386   case $STRIP in
25387   [\\/]* | ?:[\\/]*)
25388   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
25389   ;;
25390   *)
25391   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25392 for as_dir in $PATH
25393 do
25394   IFS=$as_save_IFS
25395   test -z "$as_dir" && as_dir=.
25396     for ac_exec_ext in '' $ac_executable_extensions; do
25397   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25398     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
25399     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25400     break 2
25401   fi
25402 done
25403   done
25404 IFS=$as_save_IFS
25405 
25406   ;;
25407 esac
25408 fi
25409 STRIP=$ac_cv_path_STRIP
25410 if test -n "$STRIP"; then
25411   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
25412 $as_echo "$STRIP" >&6; }
25413 else
25414   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25415 $as_echo "no" >&6; }
25416 fi
25417 
25418 
25419 
25420   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25421 
25422   # First separate the path from the arguments. This will split at the first
25423   # space.
25424   complete="$STRIP"
25425   path="${complete%% *}"
25426   tmp="$complete EOL"
25427   arguments="${tmp#* }"
25428 
25429   # Input might be given as Windows format, start by converting to
25430   # unix format.
25431   new_path=`$CYGPATH -u "$path"`
25432 
25433   # Now try to locate executable using which
25434   new_path=`$WHICH "$new_path" 2> /dev/null`
25435   # bat and cmd files are not always considered executable in cygwin causing which
25436   # to not find them
25437   if test "x$new_path" = x \
25438            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25439            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25440     new_path=`$CYGPATH -u "$path"`
25441   fi
25442   if test "x$new_path" = x; then
25443     # Oops. Which didn't find the executable.
25444     # The splitting of arguments from the executable at a space might have been incorrect,
25445     # since paths with space are more likely in Windows. Give it another try with the whole
25446     # argument.
25447     path="$complete"
25448     arguments="EOL"
25449     new_path=`$CYGPATH -u "$path"`
25450     new_path=`$WHICH "$new_path" 2> /dev/null`
25451     # bat and cmd files are not always considered executable in cygwin causing which
25452     # to not find them
25453     if test "x$new_path" = x \
25454              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25455              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25456       new_path=`$CYGPATH -u "$path"`
25457     fi
25458     if test "x$new_path" = x; then
25459       # It's still not found. Now this is an unrecoverable error.
25460       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25461 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25462       has_space=`$ECHO "$complete" | $GREP " "`
25463       if test "x$has_space" != x; then
25464         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25465 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25466       fi
25467       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25468     fi
25469   fi
25470 
25471   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25472   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25473   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25474   # "foo.exe" is OK but "foo" is an error.
25475   #
25476   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25477   # It is also a way to make sure we got the proper file name for the real test later on.
25478   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25479   if test "x$test_shortpath" = x; then
25480     # Short path failed, file does not exist as specified.
25481     # Try adding .exe or .cmd
25482     if test -f "${new_path}.exe"; then
25483        input_to_shortpath="${new_path}.exe"
25484     elif test -f "${new_path}.cmd"; then
25485        input_to_shortpath="${new_path}.cmd"
25486     else
25487       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
25488 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
25489       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25490 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25491       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25492     fi
25493   else
25494     input_to_shortpath="$new_path"
25495   fi
25496 
25497   # Call helper function which possibly converts this using DOS-style short mode.
25498   # If so, the updated path is stored in $new_path.
25499   new_path="$input_to_shortpath"
25500 
25501   input_path="$input_to_shortpath"
25502   # Check if we need to convert this using DOS-style short mode. If the path
25503   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25504   # take no chances and rewrite it.
25505   # Note: m4 eats our [], so we need to use [ and ] instead.
25506   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25507   if test "x$has_forbidden_chars" != x; then
25508     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25509     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25510     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25511     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25512       # Going to short mode and back again did indeed matter. Since short mode is
25513       # case insensitive, let's make it lowercase to improve readability.
25514       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25515       # Now convert it back to Unix-stile (cygpath)
25516       input_path=`$CYGPATH -u "$shortmode_path"`
25517       new_path="$input_path"
25518     fi
25519   fi
25520 
25521   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25522   if test "x$test_cygdrive_prefix" = x; then
25523     # As a simple fix, exclude /usr/bin since it's not a real path.
25524     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25525       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25526       # a path prefixed by /cygdrive for fixpath to work.
25527       new_path="$CYGWIN_ROOT_PATH$input_path"
25528     fi
25529   fi
25530 
25531   # remove trailing .exe if any
25532   new_path="${new_path/%.exe/}"
25533 
25534   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25535 
25536   # First separate the path from the arguments. This will split at the first
25537   # space.
25538   complete="$STRIP"
25539   path="${complete%% *}"
25540   tmp="$complete EOL"
25541   arguments="${tmp#* }"
25542 
25543   # Input might be given as Windows format, start by converting to
25544   # unix format.
25545   new_path="$path"
25546 
25547   windows_path="$new_path"
25548   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25549     unix_path=`$CYGPATH -u "$windows_path"`
25550     new_path="$unix_path"
25551   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25552     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25553     new_path="$unix_path"
25554   fi
25555 
25556 
25557   # Now try to locate executable using which
25558   new_path=`$WHICH "$new_path" 2> /dev/null`
25559 
25560   if test "x$new_path" = x; then
25561     # Oops. Which didn't find the executable.
25562     # The splitting of arguments from the executable at a space might have been incorrect,
25563     # since paths with space are more likely in Windows. Give it another try with the whole
25564     # argument.
25565     path="$complete"
25566     arguments="EOL"
25567     new_path="$path"
25568 
25569   windows_path="$new_path"
25570   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25571     unix_path=`$CYGPATH -u "$windows_path"`
25572     new_path="$unix_path"
25573   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25574     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25575     new_path="$unix_path"
25576   fi
25577 
25578 
25579     new_path=`$WHICH "$new_path" 2> /dev/null`
25580 
25581     if test "x$new_path" = x; then
25582       # It's still not found. Now this is an unrecoverable error.
25583       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25584 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25585       has_space=`$ECHO "$complete" | $GREP " "`
25586       if test "x$has_space" != x; then
25587         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25588 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25589       fi
25590       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25591     fi
25592   fi
25593 
25594   # Now new_path has a complete unix path to the binary
25595   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25596     # Keep paths in /bin as-is, but remove trailing .exe if any
25597     new_path="${new_path/%.exe/}"
25598     # Do not save /bin paths to all_fixpath_prefixes!
25599   else
25600     # Not in mixed or Windows style, start by that.
25601     new_path=`cmd //c echo $new_path`
25602 
25603   input_path="$new_path"
25604   # Check if we need to convert this using DOS-style short mode. If the path
25605   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25606   # take no chances and rewrite it.
25607   # Note: m4 eats our [], so we need to use [ and ] instead.
25608   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25609   if test "x$has_forbidden_chars" != x; then
25610     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25611     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25612   fi
25613 
25614     # Output is in $new_path
25615 
25616   windows_path="$new_path"
25617   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25618     unix_path=`$CYGPATH -u "$windows_path"`
25619     new_path="$unix_path"
25620   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25621     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25622     new_path="$unix_path"
25623   fi
25624 
25625     # remove trailing .exe if any
25626     new_path="${new_path/%.exe/}"
25627 
25628     # Save the first 10 bytes of this path to the storage, so fixpath can work.
25629     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25630   fi
25631 
25632   else
25633     # We're on a posix platform. Hooray! :)
25634     # First separate the path from the arguments. This will split at the first
25635     # space.
25636     complete="$STRIP"
25637     path="${complete%% *}"
25638     tmp="$complete EOL"
25639     arguments="${tmp#* }"
25640 
25641     # Cannot rely on the command "which" here since it doesn't always work.
25642     is_absolute_path=`$ECHO "$path" | $GREP ^/`
25643     if test -z "$is_absolute_path"; then
25644       # Path to executable is not absolute. Find it.
25645       IFS_save="$IFS"
25646       IFS=:
25647       for p in $PATH; do
25648         if test -f "$p/$path" && test -x "$p/$path"; then
25649           new_path="$p/$path"
25650           break
25651         fi
25652       done
25653       IFS="$IFS_save"
25654     else
25655       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
25656 $as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
25657       new_path="$path"
25658     fi
25659 
25660     if test "x$new_path" = x; then
25661         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25662 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25663         has_space=`$ECHO "$complete" | $GREP " "`
25664         if test "x$has_space" != x; then
25665           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25666 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25667         fi
25668         as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25669       fi
25670   fi
25671 
25672       # Now join together the path and the arguments once again
25673       if test "x$arguments" != xEOL; then
25674         new_complete="$new_path ${arguments% *}"
25675       else
25676         new_complete="$new_path"
25677       fi
25678 
25679   if test "x$complete" != "x$new_complete"; then
25680       STRIP="$new_complete"
25681       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
25682 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
25683     fi
25684 
25685     # Extract the first word of "mcs", so it can be a program name with args.
25686 set dummy mcs; ac_word=$2
25687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25688 $as_echo_n "checking for $ac_word... " >&6; }
25689 if ${ac_cv_path_MCS+:} false; then :
25690   $as_echo_n "(cached) " >&6
25691 else
25692   case $MCS in
25693   [\\/]* | ?:[\\/]*)
25694   ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
25695   ;;
25696   *)
25697   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25698 for as_dir in $PATH
25699 do
25700   IFS=$as_save_IFS
25701   test -z "$as_dir" && as_dir=.
25702     for ac_exec_ext in '' $ac_executable_extensions; do
25703   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25704     ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
25705     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25706     break 2
25707   fi
25708 done
25709   done
25710 IFS=$as_save_IFS
25711 
25712   ;;
25713 esac
25714 fi
25715 MCS=$ac_cv_path_MCS
25716 if test -n "$MCS"; then
25717   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
25718 $as_echo "$MCS" >&6; }
25719 else
25720   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25721 $as_echo "no" >&6; }
25722 fi
25723 
25724 
25725 
25726   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25727 
25728   # First separate the path from the arguments. This will split at the first
25729   # space.
25730   complete="$MCS"
25731   path="${complete%% *}"
25732   tmp="$complete EOL"
25733   arguments="${tmp#* }"
25734 
25735   # Input might be given as Windows format, start by converting to
25736   # unix format.
25737   new_path=`$CYGPATH -u "$path"`
25738 
25739   # Now try to locate executable using which
25740   new_path=`$WHICH "$new_path" 2> /dev/null`
25741   # bat and cmd files are not always considered executable in cygwin causing which
25742   # to not find them
25743   if test "x$new_path" = x \
25744            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25745            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25746     new_path=`$CYGPATH -u "$path"`
25747   fi
25748   if test "x$new_path" = x; then
25749     # Oops. Which didn't find the executable.
25750     # The splitting of arguments from the executable at a space might have been incorrect,
25751     # since paths with space are more likely in Windows. Give it another try with the whole
25752     # argument.
25753     path="$complete"
25754     arguments="EOL"
25755     new_path=`$CYGPATH -u "$path"`
25756     new_path=`$WHICH "$new_path" 2> /dev/null`
25757     # bat and cmd files are not always considered executable in cygwin causing which
25758     # to not find them
25759     if test "x$new_path" = x \
25760              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25761              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25762       new_path=`$CYGPATH -u "$path"`
25763     fi
25764     if test "x$new_path" = x; then
25765       # It's still not found. Now this is an unrecoverable error.
25766       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
25767 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25768       has_space=`$ECHO "$complete" | $GREP " "`
25769       if test "x$has_space" != x; then
25770         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25771 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25772       fi
25773       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25774     fi
25775   fi
25776 
25777   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25778   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25779   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25780   # "foo.exe" is OK but "foo" is an error.
25781   #
25782   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25783   # It is also a way to make sure we got the proper file name for the real test later on.
25784   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25785   if test "x$test_shortpath" = x; then
25786     # Short path failed, file does not exist as specified.
25787     # Try adding .exe or .cmd
25788     if test -f "${new_path}.exe"; then
25789        input_to_shortpath="${new_path}.exe"
25790     elif test -f "${new_path}.cmd"; then
25791        input_to_shortpath="${new_path}.cmd"
25792     else
25793       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
25794 $as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
25795       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25796 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25797       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25798     fi
25799   else
25800     input_to_shortpath="$new_path"
25801   fi
25802 
25803   # Call helper function which possibly converts this using DOS-style short mode.
25804   # If so, the updated path is stored in $new_path.
25805   new_path="$input_to_shortpath"
25806 
25807   input_path="$input_to_shortpath"
25808   # Check if we need to convert this using DOS-style short mode. If the path
25809   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25810   # take no chances and rewrite it.
25811   # Note: m4 eats our [], so we need to use [ and ] instead.
25812   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25813   if test "x$has_forbidden_chars" != x; then
25814     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25815     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25816     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25817     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25818       # Going to short mode and back again did indeed matter. Since short mode is
25819       # case insensitive, let's make it lowercase to improve readability.
25820       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25821       # Now convert it back to Unix-stile (cygpath)
25822       input_path=`$CYGPATH -u "$shortmode_path"`
25823       new_path="$input_path"
25824     fi
25825   fi
25826 
25827   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25828   if test "x$test_cygdrive_prefix" = x; then
25829     # As a simple fix, exclude /usr/bin since it's not a real path.
25830     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25831       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25832       # a path prefixed by /cygdrive for fixpath to work.
25833       new_path="$CYGWIN_ROOT_PATH$input_path"
25834     fi
25835   fi
25836 
25837   # remove trailing .exe if any
25838   new_path="${new_path/%.exe/}"
25839 
25840   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25841 
25842   # First separate the path from the arguments. This will split at the first
25843   # space.
25844   complete="$MCS"
25845   path="${complete%% *}"
25846   tmp="$complete EOL"
25847   arguments="${tmp#* }"
25848 
25849   # Input might be given as Windows format, start by converting to
25850   # unix format.
25851   new_path="$path"
25852 
25853   windows_path="$new_path"
25854   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25855     unix_path=`$CYGPATH -u "$windows_path"`
25856     new_path="$unix_path"
25857   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25858     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25859     new_path="$unix_path"
25860   fi
25861 
25862 
25863   # Now try to locate executable using which
25864   new_path=`$WHICH "$new_path" 2> /dev/null`
25865 
25866   if test "x$new_path" = x; then
25867     # Oops. Which didn't find the executable.
25868     # The splitting of arguments from the executable at a space might have been incorrect,
25869     # since paths with space are more likely in Windows. Give it another try with the whole
25870     # argument.
25871     path="$complete"
25872     arguments="EOL"
25873     new_path="$path"
25874 
25875   windows_path="$new_path"
25876   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25877     unix_path=`$CYGPATH -u "$windows_path"`
25878     new_path="$unix_path"
25879   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25880     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25881     new_path="$unix_path"
25882   fi
25883 
25884 
25885     new_path=`$WHICH "$new_path" 2> /dev/null`
25886 
25887     if test "x$new_path" = x; then
25888       # It's still not found. Now this is an unrecoverable error.
25889       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
25890 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25891       has_space=`$ECHO "$complete" | $GREP " "`
25892       if test "x$has_space" != x; then
25893         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25894 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25895       fi
25896       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25897     fi
25898   fi
25899 
25900   # Now new_path has a complete unix path to the binary
25901   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25902     # Keep paths in /bin as-is, but remove trailing .exe if any
25903     new_path="${new_path/%.exe/}"
25904     # Do not save /bin paths to all_fixpath_prefixes!
25905   else
25906     # Not in mixed or Windows style, start by that.
25907     new_path=`cmd //c echo $new_path`
25908 
25909   input_path="$new_path"
25910   # Check if we need to convert this using DOS-style short mode. If the path
25911   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25912   # take no chances and rewrite it.
25913   # Note: m4 eats our [], so we need to use [ and ] instead.
25914   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25915   if test "x$has_forbidden_chars" != x; then
25916     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25917     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25918   fi
25919 
25920     # Output is in $new_path
25921 
25922   windows_path="$new_path"
25923   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25924     unix_path=`$CYGPATH -u "$windows_path"`
25925     new_path="$unix_path"
25926   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25927     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25928     new_path="$unix_path"
25929   fi
25930 
25931     # remove trailing .exe if any
25932     new_path="${new_path/%.exe/}"
25933 
25934     # Save the first 10 bytes of this path to the storage, so fixpath can work.
25935     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25936   fi
25937 
25938   else
25939     # We're on a posix platform. Hooray! :)
25940     # First separate the path from the arguments. This will split at the first
25941     # space.
25942     complete="$MCS"
25943     path="${complete%% *}"
25944     tmp="$complete EOL"
25945     arguments="${tmp#* }"
25946 
25947     # Cannot rely on the command "which" here since it doesn't always work.
25948     is_absolute_path=`$ECHO "$path" | $GREP ^/`
25949     if test -z "$is_absolute_path"; then
25950       # Path to executable is not absolute. Find it.
25951       IFS_save="$IFS"
25952       IFS=:
25953       for p in $PATH; do
25954         if test -f "$p/$path" && test -x "$p/$path"; then
25955           new_path="$p/$path"
25956           break
25957         fi
25958       done
25959       IFS="$IFS_save"
25960     else
25961       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5
25962 $as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;}
25963       new_path="$path"
25964     fi
25965 
25966     if test "x$new_path" = x; then
25967         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
25968 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25969         has_space=`$ECHO "$complete" | $GREP " "`
25970         if test "x$has_space" != x; then
25971           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25972 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25973         fi
25974         as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25975       fi
25976   fi
25977 
25978       # Now join together the path and the arguments once again
25979       if test "x$arguments" != xEOL; then
25980         new_complete="$new_path ${arguments% *}"
25981       else
25982         new_complete="$new_path"
25983       fi
25984 
25985   if test "x$complete" != "x$new_complete"; then
25986       MCS="$new_complete"
25987       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
25988 $as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
25989     fi
25990 
25991 elif test "x$OPENJDK_TARGET_OS" != xwindows; then
25992     if test -n "$ac_tool_prefix"; then
25993   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
25994 set dummy ${ac_tool_prefix}nm; ac_word=$2
25995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25996 $as_echo_n "checking for $ac_word... " >&6; }
25997 if ${ac_cv_prog_NM+:} false; then :
25998   $as_echo_n "(cached) " >&6
25999 else
26000   if test -n "$NM"; then
26001   ac_cv_prog_NM="$NM" # Let the user override the test.
26002 else
26003 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26004 for as_dir in $PATH
26005 do
26006   IFS=$as_save_IFS
26007   test -z "$as_dir" && as_dir=.
26008     for ac_exec_ext in '' $ac_executable_extensions; do
26009   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26010     ac_cv_prog_NM="${ac_tool_prefix}nm"
26011     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26012     break 2
26013   fi
26014 done
26015   done
26016 IFS=$as_save_IFS
26017 
26018 fi
26019 fi
26020 NM=$ac_cv_prog_NM
26021 if test -n "$NM"; then
26022   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
26023 $as_echo "$NM" >&6; }
26024 else
26025   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26026 $as_echo "no" >&6; }
26027 fi
26028 
26029 
26030 fi
26031 if test -z "$ac_cv_prog_NM"; then
26032   ac_ct_NM=$NM
26033   # Extract the first word of "nm", so it can be a program name with args.
26034 set dummy nm; ac_word=$2
26035 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26036 $as_echo_n "checking for $ac_word... " >&6; }
26037 if ${ac_cv_prog_ac_ct_NM+:} false; then :
26038   $as_echo_n "(cached) " >&6
26039 else
26040   if test -n "$ac_ct_NM"; then
26041   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
26042 else
26043 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26044 for as_dir in $PATH
26045 do
26046   IFS=$as_save_IFS
26047   test -z "$as_dir" && as_dir=.
26048     for ac_exec_ext in '' $ac_executable_extensions; do
26049   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26050     ac_cv_prog_ac_ct_NM="nm"
26051     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26052     break 2
26053   fi
26054 done
26055   done
26056 IFS=$as_save_IFS
26057 
26058 fi
26059 fi
26060 ac_ct_NM=$ac_cv_prog_ac_ct_NM
26061 if test -n "$ac_ct_NM"; then
26062   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
26063 $as_echo "$ac_ct_NM" >&6; }
26064 else
26065   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26066 $as_echo "no" >&6; }
26067 fi
26068 
26069   if test "x$ac_ct_NM" = x; then
26070     NM=""
26071   else
26072     case $cross_compiling:$ac_tool_warned in
26073 yes:)
26074 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26075 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26076 ac_tool_warned=yes ;;
26077 esac
26078     NM=$ac_ct_NM
26079   fi
26080 else
26081   NM="$ac_cv_prog_NM"
26082 fi
26083 
26084 
26085   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26086 
26087   # First separate the path from the arguments. This will split at the first
26088   # space.
26089   complete="$NM"
26090   path="${complete%% *}"
26091   tmp="$complete EOL"
26092   arguments="${tmp#* }"
26093 
26094   # Input might be given as Windows format, start by converting to
26095   # unix format.
26096   new_path=`$CYGPATH -u "$path"`
26097 
26098   # Now try to locate executable using which
26099   new_path=`$WHICH "$new_path" 2> /dev/null`
26100   # bat and cmd files are not always considered executable in cygwin causing which
26101   # to not find them
26102   if test "x$new_path" = x \
26103            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26104            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26105     new_path=`$CYGPATH -u "$path"`
26106   fi
26107   if test "x$new_path" = x; then
26108     # Oops. Which didn't find the executable.
26109     # The splitting of arguments from the executable at a space might have been incorrect,
26110     # since paths with space are more likely in Windows. Give it another try with the whole
26111     # argument.
26112     path="$complete"
26113     arguments="EOL"
26114     new_path=`$CYGPATH -u "$path"`
26115     new_path=`$WHICH "$new_path" 2> /dev/null`
26116     # bat and cmd files are not always considered executable in cygwin causing which
26117     # to not find them
26118     if test "x$new_path" = x \
26119              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26120              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26121       new_path=`$CYGPATH -u "$path"`
26122     fi
26123     if test "x$new_path" = x; then
26124       # It's still not found. Now this is an unrecoverable error.
26125       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26126 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26127       has_space=`$ECHO "$complete" | $GREP " "`
26128       if test "x$has_space" != x; then
26129         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26130 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26131       fi
26132       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26133     fi
26134   fi
26135 
26136   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26137   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26138   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26139   # "foo.exe" is OK but "foo" is an error.
26140   #
26141   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26142   # It is also a way to make sure we got the proper file name for the real test later on.
26143   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26144   if test "x$test_shortpath" = x; then
26145     # Short path failed, file does not exist as specified.
26146     # Try adding .exe or .cmd
26147     if test -f "${new_path}.exe"; then
26148        input_to_shortpath="${new_path}.exe"
26149     elif test -f "${new_path}.cmd"; then
26150        input_to_shortpath="${new_path}.cmd"
26151     else
26152       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
26153 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
26154       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26155 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26156       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26157     fi
26158   else
26159     input_to_shortpath="$new_path"
26160   fi
26161 
26162   # Call helper function which possibly converts this using DOS-style short mode.
26163   # If so, the updated path is stored in $new_path.
26164   new_path="$input_to_shortpath"
26165 
26166   input_path="$input_to_shortpath"
26167   # Check if we need to convert this using DOS-style short mode. If the path
26168   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26169   # take no chances and rewrite it.
26170   # Note: m4 eats our [], so we need to use [ and ] instead.
26171   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26172   if test "x$has_forbidden_chars" != x; then
26173     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26174     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26175     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26176     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26177       # Going to short mode and back again did indeed matter. Since short mode is
26178       # case insensitive, let's make it lowercase to improve readability.
26179       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26180       # Now convert it back to Unix-stile (cygpath)
26181       input_path=`$CYGPATH -u "$shortmode_path"`
26182       new_path="$input_path"
26183     fi
26184   fi
26185 
26186   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26187   if test "x$test_cygdrive_prefix" = x; then
26188     # As a simple fix, exclude /usr/bin since it's not a real path.
26189     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26190       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26191       # a path prefixed by /cygdrive for fixpath to work.
26192       new_path="$CYGWIN_ROOT_PATH$input_path"
26193     fi
26194   fi
26195 
26196   # remove trailing .exe if any
26197   new_path="${new_path/%.exe/}"
26198 
26199   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26200 
26201   # First separate the path from the arguments. This will split at the first
26202   # space.
26203   complete="$NM"
26204   path="${complete%% *}"
26205   tmp="$complete EOL"
26206   arguments="${tmp#* }"
26207 
26208   # Input might be given as Windows format, start by converting to
26209   # unix format.
26210   new_path="$path"
26211 
26212   windows_path="$new_path"
26213   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26214     unix_path=`$CYGPATH -u "$windows_path"`
26215     new_path="$unix_path"
26216   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26217     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26218     new_path="$unix_path"
26219   fi
26220 
26221 
26222   # Now try to locate executable using which
26223   new_path=`$WHICH "$new_path" 2> /dev/null`
26224 
26225   if test "x$new_path" = x; then
26226     # Oops. Which didn't find the executable.
26227     # The splitting of arguments from the executable at a space might have been incorrect,
26228     # since paths with space are more likely in Windows. Give it another try with the whole
26229     # argument.
26230     path="$complete"
26231     arguments="EOL"
26232     new_path="$path"
26233 
26234   windows_path="$new_path"
26235   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26236     unix_path=`$CYGPATH -u "$windows_path"`
26237     new_path="$unix_path"
26238   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26239     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26240     new_path="$unix_path"
26241   fi
26242 
26243 
26244     new_path=`$WHICH "$new_path" 2> /dev/null`
26245 
26246     if test "x$new_path" = x; then
26247       # It's still not found. Now this is an unrecoverable error.
26248       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26249 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26250       has_space=`$ECHO "$complete" | $GREP " "`
26251       if test "x$has_space" != x; then
26252         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26253 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26254       fi
26255       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26256     fi
26257   fi
26258 
26259   # Now new_path has a complete unix path to the binary
26260   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26261     # Keep paths in /bin as-is, but remove trailing .exe if any
26262     new_path="${new_path/%.exe/}"
26263     # Do not save /bin paths to all_fixpath_prefixes!
26264   else
26265     # Not in mixed or Windows style, start by that.
26266     new_path=`cmd //c echo $new_path`
26267 
26268   input_path="$new_path"
26269   # Check if we need to convert this using DOS-style short mode. If the path
26270   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26271   # take no chances and rewrite it.
26272   # Note: m4 eats our [], so we need to use [ and ] instead.
26273   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26274   if test "x$has_forbidden_chars" != x; then
26275     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26276     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26277   fi
26278 
26279     # Output is in $new_path
26280 
26281   windows_path="$new_path"
26282   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26283     unix_path=`$CYGPATH -u "$windows_path"`
26284     new_path="$unix_path"
26285   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26286     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26287     new_path="$unix_path"
26288   fi
26289 
26290     # remove trailing .exe if any
26291     new_path="${new_path/%.exe/}"
26292 
26293     # Save the first 10 bytes of this path to the storage, so fixpath can work.
26294     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26295   fi
26296 
26297   else
26298     # We're on a posix platform. Hooray! :)
26299     # First separate the path from the arguments. This will split at the first
26300     # space.
26301     complete="$NM"
26302     path="${complete%% *}"
26303     tmp="$complete EOL"
26304     arguments="${tmp#* }"
26305 
26306     # Cannot rely on the command "which" here since it doesn't always work.
26307     is_absolute_path=`$ECHO "$path" | $GREP ^/`
26308     if test -z "$is_absolute_path"; then
26309       # Path to executable is not absolute. Find it.
26310       IFS_save="$IFS"
26311       IFS=:
26312       for p in $PATH; do
26313         if test -f "$p/$path" && test -x "$p/$path"; then
26314           new_path="$p/$path"
26315           break
26316         fi
26317       done
26318       IFS="$IFS_save"
26319     else
26320       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
26321 $as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
26322       new_path="$path"
26323     fi
26324 
26325     if test "x$new_path" = x; then
26326         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26327 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26328         has_space=`$ECHO "$complete" | $GREP " "`
26329         if test "x$has_space" != x; then
26330           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26331 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26332         fi
26333         as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26334       fi
26335   fi
26336 
26337       # Now join together the path and the arguments once again
26338       if test "x$arguments" != xEOL; then
26339         new_complete="$new_path ${arguments% *}"
26340       else
26341         new_complete="$new_path"
26342       fi
26343 
26344   if test "x$complete" != "x$new_complete"; then
26345       NM="$new_complete"
26346       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
26347 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
26348     fi
26349 
26350     if test -n "$ac_tool_prefix"; then
26351   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
26352 set dummy ${ac_tool_prefix}strip; ac_word=$2
26353 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26354 $as_echo_n "checking for $ac_word... " >&6; }
26355 if ${ac_cv_prog_STRIP+:} false; then :
26356   $as_echo_n "(cached) " >&6
26357 else
26358   if test -n "$STRIP"; then
26359   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
26360 else
26361 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26362 for as_dir in $PATH
26363 do
26364   IFS=$as_save_IFS
26365   test -z "$as_dir" && as_dir=.
26366     for ac_exec_ext in '' $ac_executable_extensions; do
26367   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26368     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
26369     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26370     break 2
26371   fi
26372 done
26373   done
26374 IFS=$as_save_IFS
26375 
26376 fi
26377 fi
26378 STRIP=$ac_cv_prog_STRIP
26379 if test -n "$STRIP"; then
26380   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
26381 $as_echo "$STRIP" >&6; }
26382 else
26383   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26384 $as_echo "no" >&6; }
26385 fi
26386 
26387 
26388 fi
26389 if test -z "$ac_cv_prog_STRIP"; then
26390   ac_ct_STRIP=$STRIP
26391   # Extract the first word of "strip", so it can be a program name with args.
26392 set dummy strip; ac_word=$2
26393 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26394 $as_echo_n "checking for $ac_word... " >&6; }
26395 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
26396   $as_echo_n "(cached) " >&6
26397 else
26398   if test -n "$ac_ct_STRIP"; then
26399   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
26400 else
26401 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26402 for as_dir in $PATH
26403 do
26404   IFS=$as_save_IFS
26405   test -z "$as_dir" && as_dir=.
26406     for ac_exec_ext in '' $ac_executable_extensions; do
26407   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26408     ac_cv_prog_ac_ct_STRIP="strip"
26409     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26410     break 2
26411   fi
26412 done
26413   done
26414 IFS=$as_save_IFS
26415 
26416 fi
26417 fi
26418 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
26419 if test -n "$ac_ct_STRIP"; then
26420   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
26421 $as_echo "$ac_ct_STRIP" >&6; }
26422 else
26423   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26424 $as_echo "no" >&6; }
26425 fi
26426 
26427   if test "x$ac_ct_STRIP" = x; then
26428     STRIP=""
26429   else
26430     case $cross_compiling:$ac_tool_warned in
26431 yes:)
26432 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26433 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26434 ac_tool_warned=yes ;;
26435 esac
26436     STRIP=$ac_ct_STRIP
26437   fi
26438 else
26439   STRIP="$ac_cv_prog_STRIP"
26440 fi
26441 
26442 
26443   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26444 
26445   # First separate the path from the arguments. This will split at the first
26446   # space.
26447   complete="$STRIP"
26448   path="${complete%% *}"
26449   tmp="$complete EOL"
26450   arguments="${tmp#* }"
26451 
26452   # Input might be given as Windows format, start by converting to
26453   # unix format.
26454   new_path=`$CYGPATH -u "$path"`
26455 
26456   # Now try to locate executable using which
26457   new_path=`$WHICH "$new_path" 2> /dev/null`
26458   # bat and cmd files are not always considered executable in cygwin causing which
26459   # to not find them
26460   if test "x$new_path" = x \
26461            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26462            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26463     new_path=`$CYGPATH -u "$path"`
26464   fi
26465   if test "x$new_path" = x; then
26466     # Oops. Which didn't find the executable.
26467     # The splitting of arguments from the executable at a space might have been incorrect,
26468     # since paths with space are more likely in Windows. Give it another try with the whole
26469     # argument.
26470     path="$complete"
26471     arguments="EOL"
26472     new_path=`$CYGPATH -u "$path"`
26473     new_path=`$WHICH "$new_path" 2> /dev/null`
26474     # bat and cmd files are not always considered executable in cygwin causing which
26475     # to not find them
26476     if test "x$new_path" = x \
26477              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26478              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26479       new_path=`$CYGPATH -u "$path"`
26480     fi
26481     if test "x$new_path" = x; then
26482       # It's still not found. Now this is an unrecoverable error.
26483       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26484 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26485       has_space=`$ECHO "$complete" | $GREP " "`
26486       if test "x$has_space" != x; then
26487         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26488 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26489       fi
26490       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26491     fi
26492   fi
26493 
26494   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26495   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26496   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26497   # "foo.exe" is OK but "foo" is an error.
26498   #
26499   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26500   # It is also a way to make sure we got the proper file name for the real test later on.
26501   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26502   if test "x$test_shortpath" = x; then
26503     # Short path failed, file does not exist as specified.
26504     # Try adding .exe or .cmd
26505     if test -f "${new_path}.exe"; then
26506        input_to_shortpath="${new_path}.exe"
26507     elif test -f "${new_path}.cmd"; then
26508        input_to_shortpath="${new_path}.cmd"
26509     else
26510       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
26511 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
26512       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26513 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26514       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26515     fi
26516   else
26517     input_to_shortpath="$new_path"
26518   fi
26519 
26520   # Call helper function which possibly converts this using DOS-style short mode.
26521   # If so, the updated path is stored in $new_path.
26522   new_path="$input_to_shortpath"
26523 
26524   input_path="$input_to_shortpath"
26525   # Check if we need to convert this using DOS-style short mode. If the path
26526   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26527   # take no chances and rewrite it.
26528   # Note: m4 eats our [], so we need to use [ and ] instead.
26529   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26530   if test "x$has_forbidden_chars" != x; then
26531     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26532     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26533     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26534     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26535       # Going to short mode and back again did indeed matter. Since short mode is
26536       # case insensitive, let's make it lowercase to improve readability.
26537       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26538       # Now convert it back to Unix-stile (cygpath)
26539       input_path=`$CYGPATH -u "$shortmode_path"`
26540       new_path="$input_path"
26541     fi
26542   fi
26543 
26544   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26545   if test "x$test_cygdrive_prefix" = x; then
26546     # As a simple fix, exclude /usr/bin since it's not a real path.
26547     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26548       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26549       # a path prefixed by /cygdrive for fixpath to work.
26550       new_path="$CYGWIN_ROOT_PATH$input_path"
26551     fi
26552   fi
26553 
26554   # remove trailing .exe if any
26555   new_path="${new_path/%.exe/}"
26556 
26557   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26558 
26559   # First separate the path from the arguments. This will split at the first
26560   # space.
26561   complete="$STRIP"
26562   path="${complete%% *}"
26563   tmp="$complete EOL"
26564   arguments="${tmp#* }"
26565 
26566   # Input might be given as Windows format, start by converting to
26567   # unix format.
26568   new_path="$path"
26569 
26570   windows_path="$new_path"
26571   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26572     unix_path=`$CYGPATH -u "$windows_path"`
26573     new_path="$unix_path"
26574   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26575     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26576     new_path="$unix_path"
26577   fi
26578 
26579 
26580   # Now try to locate executable using which
26581   new_path=`$WHICH "$new_path" 2> /dev/null`
26582 
26583   if test "x$new_path" = x; then
26584     # Oops. Which didn't find the executable.
26585     # The splitting of arguments from the executable at a space might have been incorrect,
26586     # since paths with space are more likely in Windows. Give it another try with the whole
26587     # argument.
26588     path="$complete"
26589     arguments="EOL"
26590     new_path="$path"
26591 
26592   windows_path="$new_path"
26593   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26594     unix_path=`$CYGPATH -u "$windows_path"`
26595     new_path="$unix_path"
26596   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26597     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26598     new_path="$unix_path"
26599   fi
26600 
26601 
26602     new_path=`$WHICH "$new_path" 2> /dev/null`
26603 
26604     if test "x$new_path" = x; then
26605       # It's still not found. Now this is an unrecoverable error.
26606       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26607 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26608       has_space=`$ECHO "$complete" | $GREP " "`
26609       if test "x$has_space" != x; then
26610         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26611 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26612       fi
26613       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26614     fi
26615   fi
26616 
26617   # Now new_path has a complete unix path to the binary
26618   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26619     # Keep paths in /bin as-is, but remove trailing .exe if any
26620     new_path="${new_path/%.exe/}"
26621     # Do not save /bin paths to all_fixpath_prefixes!
26622   else
26623     # Not in mixed or Windows style, start by that.
26624     new_path=`cmd //c echo $new_path`
26625 
26626   input_path="$new_path"
26627   # Check if we need to convert this using DOS-style short mode. If the path
26628   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26629   # take no chances and rewrite it.
26630   # Note: m4 eats our [], so we need to use [ and ] instead.
26631   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26632   if test "x$has_forbidden_chars" != x; then
26633     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26634     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26635   fi
26636 
26637     # Output is in $new_path
26638 
26639   windows_path="$new_path"
26640   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26641     unix_path=`$CYGPATH -u "$windows_path"`
26642     new_path="$unix_path"
26643   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26644     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26645     new_path="$unix_path"
26646   fi
26647 
26648     # remove trailing .exe if any
26649     new_path="${new_path/%.exe/}"
26650 
26651     # Save the first 10 bytes of this path to the storage, so fixpath can work.
26652     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26653   fi
26654 
26655   else
26656     # We're on a posix platform. Hooray! :)
26657     # First separate the path from the arguments. This will split at the first
26658     # space.
26659     complete="$STRIP"
26660     path="${complete%% *}"
26661     tmp="$complete EOL"
26662     arguments="${tmp#* }"
26663 
26664     # Cannot rely on the command "which" here since it doesn't always work.
26665     is_absolute_path=`$ECHO "$path" | $GREP ^/`
26666     if test -z "$is_absolute_path"; then
26667       # Path to executable is not absolute. Find it.
26668       IFS_save="$IFS"
26669       IFS=:
26670       for p in $PATH; do
26671         if test -f "$p/$path" && test -x "$p/$path"; then
26672           new_path="$p/$path"
26673           break
26674         fi
26675       done
26676       IFS="$IFS_save"
26677     else
26678       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
26679 $as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
26680       new_path="$path"
26681     fi
26682 
26683     if test "x$new_path" = x; then
26684         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26685 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26686         has_space=`$ECHO "$complete" | $GREP " "`
26687         if test "x$has_space" != x; then
26688           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26689 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26690         fi
26691         as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26692       fi
26693   fi
26694 
26695       # Now join together the path and the arguments once again
26696       if test "x$arguments" != xEOL; then
26697         new_complete="$new_path ${arguments% *}"
26698       else
26699         new_complete="$new_path"
26700       fi
26701 
26702   if test "x$complete" != "x$new_complete"; then
26703       STRIP="$new_complete"
26704       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
26705 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
26706     fi
26707 
26708 fi
26709 
26710 # objcopy is used for moving debug symbols to separate files when
26711 # full debug symbols are enabled.
26712 if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
26713     if test -n "$ac_tool_prefix"; then
26714   for ac_prog in gobjcopy objcopy
26715   do
26716     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
26717 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
26718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26719 $as_echo_n "checking for $ac_word... " >&6; }
26720 if ${ac_cv_prog_OBJCOPY+:} false; then :
26721   $as_echo_n "(cached) " >&6
26722 else
26723   if test -n "$OBJCOPY"; then
26724   ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
26725 else
26726 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26727 for as_dir in $PATH
26728 do
26729   IFS=$as_save_IFS
26730   test -z "$as_dir" && as_dir=.
26731     for ac_exec_ext in '' $ac_executable_extensions; do
26732   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26733     ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
26734     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26735     break 2
26736   fi
26737 done
26738   done
26739 IFS=$as_save_IFS
26740 
26741 fi
26742 fi
26743 OBJCOPY=$ac_cv_prog_OBJCOPY
26744 if test -n "$OBJCOPY"; then
26745   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
26746 $as_echo "$OBJCOPY" >&6; }
26747 else
26748   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26749 $as_echo "no" >&6; }
26750 fi
26751 
26752 
26753     test -n "$OBJCOPY" && break
26754   done
26755 fi
26756 if test -z "$OBJCOPY"; then
26757   ac_ct_OBJCOPY=$OBJCOPY
26758   for ac_prog in gobjcopy objcopy
26759 do
26760   # Extract the first word of "$ac_prog", so it can be a program name with args.
26761 set dummy $ac_prog; ac_word=$2
26762 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26763 $as_echo_n "checking for $ac_word... " >&6; }
26764 if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
26765   $as_echo_n "(cached) " >&6
26766 else
26767   if test -n "$ac_ct_OBJCOPY"; then
26768   ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
26769 else
26770 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26771 for as_dir in $PATH
26772 do
26773   IFS=$as_save_IFS
26774   test -z "$as_dir" && as_dir=.
26775     for ac_exec_ext in '' $ac_executable_extensions; do
26776   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26777     ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
26778     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26779     break 2
26780   fi
26781 done
26782   done
26783 IFS=$as_save_IFS
26784 
26785 fi
26786 fi
26787 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
26788 if test -n "$ac_ct_OBJCOPY"; then
26789   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
26790 $as_echo "$ac_ct_OBJCOPY" >&6; }
26791 else
26792   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26793 $as_echo "no" >&6; }
26794 fi
26795 
26796 
26797   test -n "$ac_ct_OBJCOPY" && break
26798 done
26799 
26800   if test "x$ac_ct_OBJCOPY" = x; then
26801     OBJCOPY=""
26802   else
26803     case $cross_compiling:$ac_tool_warned in
26804 yes:)
26805 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26806 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26807 ac_tool_warned=yes ;;
26808 esac
26809     OBJCOPY=$ac_ct_OBJCOPY
26810   fi
26811 fi
26812 
26813     # Only call fixup if objcopy was found.
26814     if test -n "$OBJCOPY"; then
26815 
26816   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26817 
26818   # First separate the path from the arguments. This will split at the first
26819   # space.
26820   complete="$OBJCOPY"
26821   path="${complete%% *}"
26822   tmp="$complete EOL"
26823   arguments="${tmp#* }"
26824 
26825   # Input might be given as Windows format, start by converting to
26826   # unix format.
26827   new_path=`$CYGPATH -u "$path"`
26828 
26829   # Now try to locate executable using which
26830   new_path=`$WHICH "$new_path" 2> /dev/null`
26831   # bat and cmd files are not always considered executable in cygwin causing which
26832   # to not find them
26833   if test "x$new_path" = x \
26834            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26835            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26836     new_path=`$CYGPATH -u "$path"`
26837   fi
26838   if test "x$new_path" = x; then
26839     # Oops. Which didn't find the executable.
26840     # The splitting of arguments from the executable at a space might have been incorrect,
26841     # since paths with space are more likely in Windows. Give it another try with the whole
26842     # argument.
26843     path="$complete"
26844     arguments="EOL"
26845     new_path=`$CYGPATH -u "$path"`
26846     new_path=`$WHICH "$new_path" 2> /dev/null`
26847     # bat and cmd files are not always considered executable in cygwin causing which
26848     # to not find them
26849     if test "x$new_path" = x \
26850              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26851              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26852       new_path=`$CYGPATH -u "$path"`
26853     fi
26854     if test "x$new_path" = x; then
26855       # It's still not found. Now this is an unrecoverable error.
26856       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
26857 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
26858       has_space=`$ECHO "$complete" | $GREP " "`
26859       if test "x$has_space" != x; then
26860         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26861 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26862       fi
26863       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26864     fi
26865   fi
26866 
26867   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26868   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26869   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26870   # "foo.exe" is OK but "foo" is an error.
26871   #
26872   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26873   # It is also a way to make sure we got the proper file name for the real test later on.
26874   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26875   if test "x$test_shortpath" = x; then
26876     # Short path failed, file does not exist as specified.
26877     # Try adding .exe or .cmd
26878     if test -f "${new_path}.exe"; then
26879        input_to_shortpath="${new_path}.exe"
26880     elif test -f "${new_path}.cmd"; then
26881        input_to_shortpath="${new_path}.cmd"
26882     else
26883       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
26884 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
26885       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26886 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26887       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26888     fi
26889   else
26890     input_to_shortpath="$new_path"
26891   fi
26892 
26893   # Call helper function which possibly converts this using DOS-style short mode.
26894   # If so, the updated path is stored in $new_path.
26895   new_path="$input_to_shortpath"
26896 
26897   input_path="$input_to_shortpath"
26898   # Check if we need to convert this using DOS-style short mode. If the path
26899   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26900   # take no chances and rewrite it.
26901   # Note: m4 eats our [], so we need to use [ and ] instead.
26902   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26903   if test "x$has_forbidden_chars" != x; then
26904     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26905     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26906     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26907     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26908       # Going to short mode and back again did indeed matter. Since short mode is
26909       # case insensitive, let's make it lowercase to improve readability.
26910       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26911       # Now convert it back to Unix-stile (cygpath)
26912       input_path=`$CYGPATH -u "$shortmode_path"`
26913       new_path="$input_path"
26914     fi
26915   fi
26916 
26917   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26918   if test "x$test_cygdrive_prefix" = x; then
26919     # As a simple fix, exclude /usr/bin since it's not a real path.
26920     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26921       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26922       # a path prefixed by /cygdrive for fixpath to work.
26923       new_path="$CYGWIN_ROOT_PATH$input_path"
26924     fi
26925   fi
26926 
26927   # remove trailing .exe if any
26928   new_path="${new_path/%.exe/}"
26929 
26930   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26931 
26932   # First separate the path from the arguments. This will split at the first
26933   # space.
26934   complete="$OBJCOPY"
26935   path="${complete%% *}"
26936   tmp="$complete EOL"
26937   arguments="${tmp#* }"
26938 
26939   # Input might be given as Windows format, start by converting to
26940   # unix format.
26941   new_path="$path"
26942 
26943   windows_path="$new_path"
26944   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26945     unix_path=`$CYGPATH -u "$windows_path"`
26946     new_path="$unix_path"
26947   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26948     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26949     new_path="$unix_path"
26950   fi
26951 
26952 
26953   # Now try to locate executable using which
26954   new_path=`$WHICH "$new_path" 2> /dev/null`
26955 
26956   if test "x$new_path" = x; then
26957     # Oops. Which didn't find the executable.
26958     # The splitting of arguments from the executable at a space might have been incorrect,
26959     # since paths with space are more likely in Windows. Give it another try with the whole
26960     # argument.
26961     path="$complete"
26962     arguments="EOL"
26963     new_path="$path"
26964 
26965   windows_path="$new_path"
26966   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26967     unix_path=`$CYGPATH -u "$windows_path"`
26968     new_path="$unix_path"
26969   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26970     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26971     new_path="$unix_path"
26972   fi
26973 
26974 
26975     new_path=`$WHICH "$new_path" 2> /dev/null`
26976 
26977     if test "x$new_path" = x; then
26978       # It's still not found. Now this is an unrecoverable error.
26979       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
26980 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
26981       has_space=`$ECHO "$complete" | $GREP " "`
26982       if test "x$has_space" != x; then
26983         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26984 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26985       fi
26986       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26987     fi
26988   fi
26989 
26990   # Now new_path has a complete unix path to the binary
26991   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26992     # Keep paths in /bin as-is, but remove trailing .exe if any
26993     new_path="${new_path/%.exe/}"
26994     # Do not save /bin paths to all_fixpath_prefixes!
26995   else
26996     # Not in mixed or Windows style, start by that.
26997     new_path=`cmd //c echo $new_path`
26998 
26999   input_path="$new_path"
27000   # Check if we need to convert this using DOS-style short mode. If the path
27001   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27002   # take no chances and rewrite it.
27003   # Note: m4 eats our [], so we need to use [ and ] instead.
27004   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27005   if test "x$has_forbidden_chars" != x; then
27006     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27007     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27008   fi
27009 
27010     # Output is in $new_path
27011 
27012   windows_path="$new_path"
27013   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27014     unix_path=`$CYGPATH -u "$windows_path"`
27015     new_path="$unix_path"
27016   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27017     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27018     new_path="$unix_path"
27019   fi
27020 
27021     # remove trailing .exe if any
27022     new_path="${new_path/%.exe/}"
27023 
27024     # Save the first 10 bytes of this path to the storage, so fixpath can work.
27025     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27026   fi
27027 
27028   else
27029     # We're on a posix platform. Hooray! :)
27030     # First separate the path from the arguments. This will split at the first
27031     # space.
27032     complete="$OBJCOPY"
27033     path="${complete%% *}"
27034     tmp="$complete EOL"
27035     arguments="${tmp#* }"
27036 
27037     # Cannot rely on the command "which" here since it doesn't always work.
27038     is_absolute_path=`$ECHO "$path" | $GREP ^/`
27039     if test -z "$is_absolute_path"; then
27040       # Path to executable is not absolute. Find it.
27041       IFS_save="$IFS"
27042       IFS=:
27043       for p in $PATH; do
27044         if test -f "$p/$path" && test -x "$p/$path"; then
27045           new_path="$p/$path"
27046           break
27047         fi
27048       done
27049       IFS="$IFS_save"
27050     else
27051       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5
27052 $as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;}
27053       new_path="$path"
27054     fi
27055 
27056     if test "x$new_path" = x; then
27057         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27058 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27059         has_space=`$ECHO "$complete" | $GREP " "`
27060         if test "x$has_space" != x; then
27061           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27062 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27063         fi
27064         as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27065       fi
27066   fi
27067 
27068       # Now join together the path and the arguments once again
27069       if test "x$arguments" != xEOL; then
27070         new_complete="$new_path ${arguments% *}"
27071       else
27072         new_complete="$new_path"
27073       fi
27074 
27075   if test "x$complete" != "x$new_complete"; then
27076       OBJCOPY="$new_complete"
27077       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
27078 $as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
27079     fi
27080 
27081     fi
27082 fi
27083 
27084 if test -n "$ac_tool_prefix"; then
27085   for ac_prog in gobjdump objdump
27086   do
27087     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27088 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27089 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27090 $as_echo_n "checking for $ac_word... " >&6; }
27091 if ${ac_cv_prog_OBJDUMP+:} false; then :
27092   $as_echo_n "(cached) " >&6
27093 else
27094   if test -n "$OBJDUMP"; then
27095   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
27096 else
27097 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27098 for as_dir in $PATH
27099 do
27100   IFS=$as_save_IFS
27101   test -z "$as_dir" && as_dir=.
27102     for ac_exec_ext in '' $ac_executable_extensions; do
27103   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27104     ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
27105     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27106     break 2
27107   fi
27108 done
27109   done
27110 IFS=$as_save_IFS
27111 
27112 fi
27113 fi
27114 OBJDUMP=$ac_cv_prog_OBJDUMP
27115 if test -n "$OBJDUMP"; then
27116   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
27117 $as_echo "$OBJDUMP" >&6; }
27118 else
27119   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27120 $as_echo "no" >&6; }
27121 fi
27122 
27123 
27124     test -n "$OBJDUMP" && break
27125   done
27126 fi
27127 if test -z "$OBJDUMP"; then
27128   ac_ct_OBJDUMP=$OBJDUMP
27129   for ac_prog in gobjdump objdump
27130 do
27131   # Extract the first word of "$ac_prog", so it can be a program name with args.
27132 set dummy $ac_prog; ac_word=$2
27133 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27134 $as_echo_n "checking for $ac_word... " >&6; }
27135 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
27136   $as_echo_n "(cached) " >&6
27137 else
27138   if test -n "$ac_ct_OBJDUMP"; then
27139   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
27140 else
27141 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27142 for as_dir in $PATH
27143 do
27144   IFS=$as_save_IFS
27145   test -z "$as_dir" && as_dir=.
27146     for ac_exec_ext in '' $ac_executable_extensions; do
27147   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27148     ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
27149     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27150     break 2
27151   fi
27152 done
27153   done
27154 IFS=$as_save_IFS
27155 
27156 fi
27157 fi
27158 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
27159 if test -n "$ac_ct_OBJDUMP"; then
27160   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
27161 $as_echo "$ac_ct_OBJDUMP" >&6; }
27162 else
27163   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27164 $as_echo "no" >&6; }
27165 fi
27166 
27167 
27168   test -n "$ac_ct_OBJDUMP" && break
27169 done
27170 
27171   if test "x$ac_ct_OBJDUMP" = x; then
27172     OBJDUMP=""
27173   else
27174     case $cross_compiling:$ac_tool_warned in
27175 yes:)
27176 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27177 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27178 ac_tool_warned=yes ;;
27179 esac
27180     OBJDUMP=$ac_ct_OBJDUMP
27181   fi
27182 fi
27183 
27184 if test "x$OBJDUMP" != x; then
27185   # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
27186 
27187   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27188 
27189   # First separate the path from the arguments. This will split at the first
27190   # space.
27191   complete="$OBJDUMP"
27192   path="${complete%% *}"
27193   tmp="$complete EOL"
27194   arguments="${tmp#* }"
27195 
27196   # Input might be given as Windows format, start by converting to
27197   # unix format.
27198   new_path=`$CYGPATH -u "$path"`
27199 
27200   # Now try to locate executable using which
27201   new_path=`$WHICH "$new_path" 2> /dev/null`
27202   # bat and cmd files are not always considered executable in cygwin causing which
27203   # to not find them
27204   if test "x$new_path" = x \
27205            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27206            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27207     new_path=`$CYGPATH -u "$path"`
27208   fi
27209   if test "x$new_path" = x; then
27210     # Oops. Which didn't find the executable.
27211     # The splitting of arguments from the executable at a space might have been incorrect,
27212     # since paths with space are more likely in Windows. Give it another try with the whole
27213     # argument.
27214     path="$complete"
27215     arguments="EOL"
27216     new_path=`$CYGPATH -u "$path"`
27217     new_path=`$WHICH "$new_path" 2> /dev/null`
27218     # bat and cmd files are not always considered executable in cygwin causing which
27219     # to not find them
27220     if test "x$new_path" = x \
27221              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27222              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27223       new_path=`$CYGPATH -u "$path"`
27224     fi
27225     if test "x$new_path" = x; then
27226       # It's still not found. Now this is an unrecoverable error.
27227       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
27228 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
27229       has_space=`$ECHO "$complete" | $GREP " "`
27230       if test "x$has_space" != x; then
27231         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27232 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27233       fi
27234       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27235     fi
27236   fi
27237 
27238   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27239   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27240   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27241   # "foo.exe" is OK but "foo" is an error.
27242   #
27243   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27244   # It is also a way to make sure we got the proper file name for the real test later on.
27245   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27246   if test "x$test_shortpath" = x; then
27247     # Short path failed, file does not exist as specified.
27248     # Try adding .exe or .cmd
27249     if test -f "${new_path}.exe"; then
27250        input_to_shortpath="${new_path}.exe"
27251     elif test -f "${new_path}.cmd"; then
27252        input_to_shortpath="${new_path}.cmd"
27253     else
27254       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
27255 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
27256       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27257 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27258       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27259     fi
27260   else
27261     input_to_shortpath="$new_path"
27262   fi
27263 
27264   # Call helper function which possibly converts this using DOS-style short mode.
27265   # If so, the updated path is stored in $new_path.
27266   new_path="$input_to_shortpath"
27267 
27268   input_path="$input_to_shortpath"
27269   # Check if we need to convert this using DOS-style short mode. If the path
27270   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27271   # take no chances and rewrite it.
27272   # Note: m4 eats our [], so we need to use [ and ] instead.
27273   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27274   if test "x$has_forbidden_chars" != x; then
27275     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27276     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27277     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27278     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27279       # Going to short mode and back again did indeed matter. Since short mode is
27280       # case insensitive, let's make it lowercase to improve readability.
27281       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27282       # Now convert it back to Unix-stile (cygpath)
27283       input_path=`$CYGPATH -u "$shortmode_path"`
27284       new_path="$input_path"
27285     fi
27286   fi
27287 
27288   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27289   if test "x$test_cygdrive_prefix" = x; then
27290     # As a simple fix, exclude /usr/bin since it's not a real path.
27291     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27292       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27293       # a path prefixed by /cygdrive for fixpath to work.
27294       new_path="$CYGWIN_ROOT_PATH$input_path"
27295     fi
27296   fi
27297 
27298   # remove trailing .exe if any
27299   new_path="${new_path/%.exe/}"
27300 
27301   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27302 
27303   # First separate the path from the arguments. This will split at the first
27304   # space.
27305   complete="$OBJDUMP"
27306   path="${complete%% *}"
27307   tmp="$complete EOL"
27308   arguments="${tmp#* }"
27309 
27310   # Input might be given as Windows format, start by converting to
27311   # unix format.
27312   new_path="$path"
27313 
27314   windows_path="$new_path"
27315   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27316     unix_path=`$CYGPATH -u "$windows_path"`
27317     new_path="$unix_path"
27318   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27319     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27320     new_path="$unix_path"
27321   fi
27322 
27323 
27324   # Now try to locate executable using which
27325   new_path=`$WHICH "$new_path" 2> /dev/null`
27326 
27327   if test "x$new_path" = x; then
27328     # Oops. Which didn't find the executable.
27329     # The splitting of arguments from the executable at a space might have been incorrect,
27330     # since paths with space are more likely in Windows. Give it another try with the whole
27331     # argument.
27332     path="$complete"
27333     arguments="EOL"
27334     new_path="$path"
27335 
27336   windows_path="$new_path"
27337   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27338     unix_path=`$CYGPATH -u "$windows_path"`
27339     new_path="$unix_path"
27340   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27341     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27342     new_path="$unix_path"
27343   fi
27344 
27345 
27346     new_path=`$WHICH "$new_path" 2> /dev/null`
27347 
27348     if test "x$new_path" = x; then
27349       # It's still not found. Now this is an unrecoverable error.
27350       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
27351 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
27352       has_space=`$ECHO "$complete" | $GREP " "`
27353       if test "x$has_space" != x; then
27354         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27355 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27356       fi
27357       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27358     fi
27359   fi
27360 
27361   # Now new_path has a complete unix path to the binary
27362   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27363     # Keep paths in /bin as-is, but remove trailing .exe if any
27364     new_path="${new_path/%.exe/}"
27365     # Do not save /bin paths to all_fixpath_prefixes!
27366   else
27367     # Not in mixed or Windows style, start by that.
27368     new_path=`cmd //c echo $new_path`
27369 
27370   input_path="$new_path"
27371   # Check if we need to convert this using DOS-style short mode. If the path
27372   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27373   # take no chances and rewrite it.
27374   # Note: m4 eats our [], so we need to use [ and ] instead.
27375   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27376   if test "x$has_forbidden_chars" != x; then
27377     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27378     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27379   fi
27380 
27381     # Output is in $new_path
27382 
27383   windows_path="$new_path"
27384   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27385     unix_path=`$CYGPATH -u "$windows_path"`
27386     new_path="$unix_path"
27387   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27388     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27389     new_path="$unix_path"
27390   fi
27391 
27392     # remove trailing .exe if any
27393     new_path="${new_path/%.exe/}"
27394 
27395     # Save the first 10 bytes of this path to the storage, so fixpath can work.
27396     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27397   fi
27398 
27399   else
27400     # We're on a posix platform. Hooray! :)
27401     # First separate the path from the arguments. This will split at the first
27402     # space.
27403     complete="$OBJDUMP"
27404     path="${complete%% *}"
27405     tmp="$complete EOL"
27406     arguments="${tmp#* }"
27407 
27408     # Cannot rely on the command "which" here since it doesn't always work.
27409     is_absolute_path=`$ECHO "$path" | $GREP ^/`
27410     if test -z "$is_absolute_path"; then
27411       # Path to executable is not absolute. Find it.
27412       IFS_save="$IFS"
27413       IFS=:
27414       for p in $PATH; do
27415         if test -f "$p/$path" && test -x "$p/$path"; then
27416           new_path="$p/$path"
27417           break
27418         fi
27419       done
27420       IFS="$IFS_save"
27421     else
27422       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5
27423 $as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;}
27424       new_path="$path"
27425     fi
27426 
27427     if test "x$new_path" = x; then
27428         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
27429 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
27430         has_space=`$ECHO "$complete" | $GREP " "`
27431         if test "x$has_space" != x; then
27432           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27433 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27434         fi
27435         as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27436       fi
27437   fi
27438 
27439       # Now join together the path and the arguments once again
27440       if test "x$arguments" != xEOL; then
27441         new_complete="$new_path ${arguments% *}"
27442       else
27443         new_complete="$new_path"
27444       fi
27445 
27446   if test "x$complete" != "x$new_complete"; then
27447       OBJDUMP="$new_complete"
27448       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
27449 $as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
27450     fi
27451 
27452 fi
27453 
27454 if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
27455    # Extract the first word of "lipo", so it can be a program name with args.
27456 set dummy lipo; ac_word=$2
27457 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27458 $as_echo_n "checking for $ac_word... " >&6; }
27459 if ${ac_cv_path_LIPO+:} false; then :
27460   $as_echo_n "(cached) " >&6
27461 else
27462   case $LIPO in
27463   [\\/]* | ?:[\\/]*)
27464   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
27465   ;;
27466   *)
27467   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27468 for as_dir in $PATH
27469 do
27470   IFS=$as_save_IFS
27471   test -z "$as_dir" && as_dir=.
27472     for ac_exec_ext in '' $ac_executable_extensions; do
27473   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27474     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
27475     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27476     break 2
27477   fi
27478 done
27479   done
27480 IFS=$as_save_IFS
27481 
27482   ;;
27483 esac
27484 fi
27485 LIPO=$ac_cv_path_LIPO
27486 if test -n "$LIPO"; then
27487   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
27488 $as_echo "$LIPO" >&6; }
27489 else
27490   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27491 $as_echo "no" >&6; }
27492 fi
27493 
27494 
27495 
27496   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27497 
27498   # First separate the path from the arguments. This will split at the first
27499   # space.
27500   complete="$LIPO"
27501   path="${complete%% *}"
27502   tmp="$complete EOL"
27503   arguments="${tmp#* }"
27504 
27505   # Input might be given as Windows format, start by converting to
27506   # unix format.
27507   new_path=`$CYGPATH -u "$path"`
27508 
27509   # Now try to locate executable using which
27510   new_path=`$WHICH "$new_path" 2> /dev/null`
27511   # bat and cmd files are not always considered executable in cygwin causing which
27512   # to not find them
27513   if test "x$new_path" = x \
27514            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27515            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27516     new_path=`$CYGPATH -u "$path"`
27517   fi
27518   if test "x$new_path" = x; then
27519     # Oops. Which didn't find the executable.
27520     # The splitting of arguments from the executable at a space might have been incorrect,
27521     # since paths with space are more likely in Windows. Give it another try with the whole
27522     # argument.
27523     path="$complete"
27524     arguments="EOL"
27525     new_path=`$CYGPATH -u "$path"`
27526     new_path=`$WHICH "$new_path" 2> /dev/null`
27527     # bat and cmd files are not always considered executable in cygwin causing which
27528     # to not find them
27529     if test "x$new_path" = x \
27530              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27531              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27532       new_path=`$CYGPATH -u "$path"`
27533     fi
27534     if test "x$new_path" = x; then
27535       # It's still not found. Now this is an unrecoverable error.
27536       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27537 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27538       has_space=`$ECHO "$complete" | $GREP " "`
27539       if test "x$has_space" != x; then
27540         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27541 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27542       fi
27543       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27544     fi
27545   fi
27546 
27547   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27548   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27549   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27550   # "foo.exe" is OK but "foo" is an error.
27551   #
27552   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27553   # It is also a way to make sure we got the proper file name for the real test later on.
27554   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27555   if test "x$test_shortpath" = x; then
27556     # Short path failed, file does not exist as specified.
27557     # Try adding .exe or .cmd
27558     if test -f "${new_path}.exe"; then
27559        input_to_shortpath="${new_path}.exe"
27560     elif test -f "${new_path}.cmd"; then
27561        input_to_shortpath="${new_path}.cmd"
27562     else
27563       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
27564 $as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
27565       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27566 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27567       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27568     fi
27569   else
27570     input_to_shortpath="$new_path"
27571   fi
27572 
27573   # Call helper function which possibly converts this using DOS-style short mode.
27574   # If so, the updated path is stored in $new_path.
27575   new_path="$input_to_shortpath"
27576 
27577   input_path="$input_to_shortpath"
27578   # Check if we need to convert this using DOS-style short mode. If the path
27579   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27580   # take no chances and rewrite it.
27581   # Note: m4 eats our [], so we need to use [ and ] instead.
27582   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27583   if test "x$has_forbidden_chars" != x; then
27584     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27585     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27586     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27587     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27588       # Going to short mode and back again did indeed matter. Since short mode is
27589       # case insensitive, let's make it lowercase to improve readability.
27590       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27591       # Now convert it back to Unix-stile (cygpath)
27592       input_path=`$CYGPATH -u "$shortmode_path"`
27593       new_path="$input_path"
27594     fi
27595   fi
27596 
27597   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27598   if test "x$test_cygdrive_prefix" = x; then
27599     # As a simple fix, exclude /usr/bin since it's not a real path.
27600     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27601       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27602       # a path prefixed by /cygdrive for fixpath to work.
27603       new_path="$CYGWIN_ROOT_PATH$input_path"
27604     fi
27605   fi
27606 
27607   # remove trailing .exe if any
27608   new_path="${new_path/%.exe/}"
27609 
27610   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27611 
27612   # First separate the path from the arguments. This will split at the first
27613   # space.
27614   complete="$LIPO"
27615   path="${complete%% *}"
27616   tmp="$complete EOL"
27617   arguments="${tmp#* }"
27618 
27619   # Input might be given as Windows format, start by converting to
27620   # unix format.
27621   new_path="$path"
27622 
27623   windows_path="$new_path"
27624   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27625     unix_path=`$CYGPATH -u "$windows_path"`
27626     new_path="$unix_path"
27627   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27628     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27629     new_path="$unix_path"
27630   fi
27631 
27632 
27633   # Now try to locate executable using which
27634   new_path=`$WHICH "$new_path" 2> /dev/null`
27635 
27636   if test "x$new_path" = x; then
27637     # Oops. Which didn't find the executable.
27638     # The splitting of arguments from the executable at a space might have been incorrect,
27639     # since paths with space are more likely in Windows. Give it another try with the whole
27640     # argument.
27641     path="$complete"
27642     arguments="EOL"
27643     new_path="$path"
27644 
27645   windows_path="$new_path"
27646   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27647     unix_path=`$CYGPATH -u "$windows_path"`
27648     new_path="$unix_path"
27649   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27650     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27651     new_path="$unix_path"
27652   fi
27653 
27654 
27655     new_path=`$WHICH "$new_path" 2> /dev/null`
27656 
27657     if test "x$new_path" = x; then
27658       # It's still not found. Now this is an unrecoverable error.
27659       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27660 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27661       has_space=`$ECHO "$complete" | $GREP " "`
27662       if test "x$has_space" != x; then
27663         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27664 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27665       fi
27666       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27667     fi
27668   fi
27669 
27670   # Now new_path has a complete unix path to the binary
27671   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27672     # Keep paths in /bin as-is, but remove trailing .exe if any
27673     new_path="${new_path/%.exe/}"
27674     # Do not save /bin paths to all_fixpath_prefixes!
27675   else
27676     # Not in mixed or Windows style, start by that.
27677     new_path=`cmd //c echo $new_path`
27678 
27679   input_path="$new_path"
27680   # Check if we need to convert this using DOS-style short mode. If the path
27681   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27682   # take no chances and rewrite it.
27683   # Note: m4 eats our [], so we need to use [ and ] instead.
27684   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27685   if test "x$has_forbidden_chars" != x; then
27686     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27687     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27688   fi
27689 
27690     # Output is in $new_path
27691 
27692   windows_path="$new_path"
27693   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27694     unix_path=`$CYGPATH -u "$windows_path"`
27695     new_path="$unix_path"
27696   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27697     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27698     new_path="$unix_path"
27699   fi
27700 
27701     # remove trailing .exe if any
27702     new_path="${new_path/%.exe/}"
27703 
27704     # Save the first 10 bytes of this path to the storage, so fixpath can work.
27705     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27706   fi
27707 
27708   else
27709     # We're on a posix platform. Hooray! :)
27710     # First separate the path from the arguments. This will split at the first
27711     # space.
27712     complete="$LIPO"
27713     path="${complete%% *}"
27714     tmp="$complete EOL"
27715     arguments="${tmp#* }"
27716 
27717     # Cannot rely on the command "which" here since it doesn't always work.
27718     is_absolute_path=`$ECHO "$path" | $GREP ^/`
27719     if test -z "$is_absolute_path"; then
27720       # Path to executable is not absolute. Find it.
27721       IFS_save="$IFS"
27722       IFS=:
27723       for p in $PATH; do
27724         if test -f "$p/$path" && test -x "$p/$path"; then
27725           new_path="$p/$path"
27726           break
27727         fi
27728       done
27729       IFS="$IFS_save"
27730     else
27731       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5
27732 $as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;}
27733       new_path="$path"
27734     fi
27735 
27736     if test "x$new_path" = x; then
27737         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27738 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27739         has_space=`$ECHO "$complete" | $GREP " "`
27740         if test "x$has_space" != x; then
27741           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27742 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27743         fi
27744         as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27745       fi
27746   fi
27747 
27748       # Now join together the path and the arguments once again
27749       if test "x$arguments" != xEOL; then
27750         new_complete="$new_path ${arguments% *}"
27751       else
27752         new_complete="$new_path"
27753       fi
27754 
27755   if test "x$complete" != "x$new_complete"; then
27756       LIPO="$new_complete"
27757       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
27758 $as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
27759     fi
27760 
27761 fi
27762 
27763 # Restore old path without tools dir
27764 PATH="$OLD_PATH"
27765 
27766 
27767 # FIXME: Currently we must test this after paths but before flags. Fix!
27768 
27769 # And we can test some aspects on the target using configure macros.
27770 
27771 
27772 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
27773 $as_echo_n "checking for ANSI C header files... " >&6; }
27774 if ${ac_cv_header_stdc+:} false; then :
27775   $as_echo_n "(cached) " >&6
27776 else
27777   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27778 /* end confdefs.h.  */
27779 #include <stdlib.h>
27780 #include <stdarg.h>
27781 #include <string.h>
27782 #include <float.h>
27783 
27784 int
27785 main ()
27786 {
27787 
27788   ;
27789   return 0;
27790 }
27791 _ACEOF
27792 if ac_fn_cxx_try_compile "$LINENO"; then :
27793   ac_cv_header_stdc=yes
27794 else
27795   ac_cv_header_stdc=no
27796 fi
27797 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27798 
27799 if test $ac_cv_header_stdc = yes; then
27800   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
27801   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27802 /* end confdefs.h.  */
27803 #include <string.h>
27804 
27805 _ACEOF
27806 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27807   $EGREP "memchr" >/dev/null 2>&1; then :
27808 
27809 else
27810   ac_cv_header_stdc=no
27811 fi
27812 rm -f conftest*
27813 
27814 fi
27815 
27816 if test $ac_cv_header_stdc = yes; then
27817   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
27818   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27819 /* end confdefs.h.  */
27820 #include <stdlib.h>
27821 
27822 _ACEOF
27823 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27824   $EGREP "free" >/dev/null 2>&1; then :
27825 
27826 else
27827   ac_cv_header_stdc=no
27828 fi
27829 rm -f conftest*
27830 
27831 fi
27832 
27833 if test $ac_cv_header_stdc = yes; then
27834   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
27835   if test "$cross_compiling" = yes; then :
27836   :
27837 else
27838   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27839 /* end confdefs.h.  */
27840 #include <ctype.h>
27841 #include <stdlib.h>
27842 #if ((' ' & 0x0FF) == 0x020)
27843 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
27844 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
27845 #else
27846 # define ISLOWER(c) \
27847                    (('a' <= (c) && (c) <= 'i') \
27848                      || ('j' <= (c) && (c) <= 'r') \
27849                      || ('s' <= (c) && (c) <= 'z'))
27850 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
27851 #endif
27852 
27853 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
27854 int
27855 main ()
27856 {
27857   int i;
27858   for (i = 0; i < 256; i++)
27859     if (XOR (islower (i), ISLOWER (i))
27860         || toupper (i) != TOUPPER (i))
27861       return 2;
27862   return 0;
27863 }
27864 _ACEOF
27865 if ac_fn_cxx_try_run "$LINENO"; then :
27866 
27867 else
27868   ac_cv_header_stdc=no
27869 fi
27870 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27871   conftest.$ac_objext conftest.beam conftest.$ac_ext
27872 fi
27873 
27874 fi
27875 fi
27876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
27877 $as_echo "$ac_cv_header_stdc" >&6; }
27878 if test $ac_cv_header_stdc = yes; then
27879 
27880 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
27881 
27882 fi
27883 
27884 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
27885 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
27886                   inttypes.h stdint.h unistd.h
27887 do :
27888   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
27889 ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
27890 "
27891 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
27892   cat >>confdefs.h <<_ACEOF
27893 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
27894 _ACEOF
27895 
27896 fi
27897 
27898 done
27899 
27900 
27901 
27902 ###############################################################################
27903 #
27904 # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
27905 # (The JVM can use 32 or 64 bit Java pointers but that decision
27906 # is made at runtime.)
27907 #
27908 if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27909   # Always specify -m flags on Solaris
27910 
27911   # keep track of c/cxx flags that we added outselves...
27912   #   to prevent emitting warning...
27913   ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27914   ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27915   ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27916 
27917   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
27918   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
27919   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
27920 
27921   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
27922   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
27923   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
27924 
27925 elif test "x$COMPILE_TYPE" = xreduced; then
27926   if test "x$OPENJDK_TARGET_OS" != xwindows; then
27927     # Specify -m if running reduced on other Posix platforms
27928 
27929   # keep track of c/cxx flags that we added outselves...
27930   #   to prevent emitting warning...
27931   ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27932   ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27933   ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27934 
27935   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
27936   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
27937   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
27938 
27939   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
27940   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
27941   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
27942 
27943   fi
27944 fi
27945 
27946 # Make compilation sanity check
27947 for ac_header in stdio.h
27948 do :
27949   ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
27950 if test "x$ac_cv_header_stdio_h" = xyes; then :
27951   cat >>confdefs.h <<_ACEOF
27952 #define HAVE_STDIO_H 1
27953 _ACEOF
27954 
27955 else
27956 
27957   { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
27958 $as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
27959   if test "x$COMPILE_TYPE" = xreduced; then
27960     { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
27961 $as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
27962   elif test "x$COMPILE_TYPE" = xcross; then
27963     { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
27964 $as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
27965   fi
27966   as_fn_error $? "Cannot continue." "$LINENO" 5
27967 
27968 fi
27969 
27970 done
27971 
27972 
27973 # The cast to long int works around a bug in the HP C Compiler
27974 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
27975 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
27976 # This bug is HP SR number 8606223364.
27977 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
27978 $as_echo_n "checking size of int *... " >&6; }
27979 if ${ac_cv_sizeof_int_p+:} false; then :
27980   $as_echo_n "(cached) " >&6
27981 else
27982   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
27983 
27984 else
27985   if test "$ac_cv_type_int_p" = yes; then
27986      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
27987 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
27988 as_fn_error 77 "cannot compute sizeof (int *)
27989 See \`config.log' for more details" "$LINENO" 5; }
27990    else
27991      ac_cv_sizeof_int_p=0
27992    fi
27993 fi
27994 
27995 fi
27996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
27997 $as_echo "$ac_cv_sizeof_int_p" >&6; }
27998 
27999 
28000 
28001 cat >>confdefs.h <<_ACEOF
28002 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
28003 _ACEOF
28004 
28005 
28006 
28007 if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
28008   # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
28009   SIZEOF_INT_P="$ac_cv_sizeof_int_p"
28010 fi
28011 
28012 if test "x$SIZEOF_INT_P" = x; then
28013     # The test failed, lets stick to the assumed value.
28014     { $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
28015 $as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
28016 else
28017     TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
28018 
28019     if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
28020         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
28021     fi
28022 fi
28023 
28024 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
28025 $as_echo_n "checking for target address size... " >&6; }
28026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
28027 $as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
28028 
28029 
28030 ###############################################################################
28031 #
28032 # Is the target little of big endian?
28033 #
28034  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
28035 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
28036 if ${ac_cv_c_bigendian+:} false; then :
28037   $as_echo_n "(cached) " >&6
28038 else
28039   ac_cv_c_bigendian=unknown
28040     # See if we're dealing with a universal compiler.
28041     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28042 /* end confdefs.h.  */
28043 #ifndef __APPLE_CC__
28044                not a universal capable compiler
28045              #endif
28046              typedef int dummy;
28047 
28048 _ACEOF
28049 if ac_fn_cxx_try_compile "$LINENO"; then :
28050 
28051         # Check for potential -arch flags.  It is not universal unless
28052         # there are at least two -arch flags with different values.
28053         ac_arch=
28054         ac_prev=
28055         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
28056          if test -n "$ac_prev"; then
28057            case $ac_word in
28058              i?86 | x86_64 | ppc | ppc64)
28059                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
28060                  ac_arch=$ac_word
28061                else
28062                  ac_cv_c_bigendian=universal
28063                  break
28064                fi
28065                ;;
28066            esac
28067            ac_prev=
28068          elif test "x$ac_word" = "x-arch"; then
28069            ac_prev=arch
28070          fi
28071        done
28072 fi
28073 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28074     if test $ac_cv_c_bigendian = unknown; then
28075       # See if sys/param.h defines the BYTE_ORDER macro.
28076       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28077 /* end confdefs.h.  */
28078 #include <sys/types.h>
28079              #include <sys/param.h>
28080 
28081 int
28082 main ()
28083 {
28084 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
28085                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
28086                      && LITTLE_ENDIAN)
28087               bogus endian macros
28088              #endif
28089 
28090   ;
28091   return 0;
28092 }
28093 _ACEOF
28094 if ac_fn_cxx_try_compile "$LINENO"; then :
28095   # It does; now see whether it defined to BIG_ENDIAN or not.
28096          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28097 /* end confdefs.h.  */
28098 #include <sys/types.h>
28099                 #include <sys/param.h>
28100 
28101 int
28102 main ()
28103 {
28104 #if BYTE_ORDER != BIG_ENDIAN
28105                  not big endian
28106                 #endif
28107 
28108   ;
28109   return 0;
28110 }
28111 _ACEOF
28112 if ac_fn_cxx_try_compile "$LINENO"; then :
28113   ac_cv_c_bigendian=yes
28114 else
28115   ac_cv_c_bigendian=no
28116 fi
28117 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28118 fi
28119 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28120     fi
28121     if test $ac_cv_c_bigendian = unknown; then
28122       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
28123       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28124 /* end confdefs.h.  */
28125 #include <limits.h>
28126 
28127 int
28128 main ()
28129 {
28130 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
28131               bogus endian macros
28132              #endif
28133 
28134   ;
28135   return 0;
28136 }
28137 _ACEOF
28138 if ac_fn_cxx_try_compile "$LINENO"; then :
28139   # It does; now see whether it defined to _BIG_ENDIAN or not.
28140          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28141 /* end confdefs.h.  */
28142 #include <limits.h>
28143 
28144 int
28145 main ()
28146 {
28147 #ifndef _BIG_ENDIAN
28148                  not big endian
28149                 #endif
28150 
28151   ;
28152   return 0;
28153 }
28154 _ACEOF
28155 if ac_fn_cxx_try_compile "$LINENO"; then :
28156   ac_cv_c_bigendian=yes
28157 else
28158   ac_cv_c_bigendian=no
28159 fi
28160 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28161 fi
28162 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28163     fi
28164     if test $ac_cv_c_bigendian = unknown; then
28165       # Compile a test program.
28166       if test "$cross_compiling" = yes; then :
28167   # Try to guess by grepping values from an object file.
28168          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28169 /* end confdefs.h.  */
28170 short int ascii_mm[] =
28171                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
28172                 short int ascii_ii[] =
28173                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
28174                 int use_ascii (int i) {
28175                   return ascii_mm[i] + ascii_ii[i];
28176                 }
28177                 short int ebcdic_ii[] =
28178                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
28179                 short int ebcdic_mm[] =
28180                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
28181                 int use_ebcdic (int i) {
28182                   return ebcdic_mm[i] + ebcdic_ii[i];
28183                 }
28184                 extern int foo;
28185 
28186 int
28187 main ()
28188 {
28189 return use_ascii (foo) == use_ebcdic (foo);
28190   ;
28191   return 0;
28192 }
28193 _ACEOF
28194 if ac_fn_cxx_try_compile "$LINENO"; then :
28195   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
28196               ac_cv_c_bigendian=yes
28197             fi
28198             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
28199               if test "$ac_cv_c_bigendian" = unknown; then
28200                 ac_cv_c_bigendian=no
28201               else
28202                 # finding both strings is unlikely to happen, but who knows?
28203                 ac_cv_c_bigendian=unknown
28204               fi
28205             fi
28206 fi
28207 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28208 else
28209   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28210 /* end confdefs.h.  */
28211 $ac_includes_default
28212 int
28213 main ()
28214 {
28215 
28216              /* Are we little or big endian?  From Harbison&Steele.  */
28217              union
28218              {
28219                long int l;
28220                char c[sizeof (long int)];
28221              } u;
28222              u.l = 1;
28223              return u.c[sizeof (long int) - 1] == 1;
28224 
28225   ;
28226   return 0;
28227 }
28228 _ACEOF
28229 if ac_fn_cxx_try_run "$LINENO"; then :
28230   ac_cv_c_bigendian=no
28231 else
28232   ac_cv_c_bigendian=yes
28233 fi
28234 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28235   conftest.$ac_objext conftest.beam conftest.$ac_ext
28236 fi
28237 
28238     fi
28239 fi
28240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
28241 $as_echo "$ac_cv_c_bigendian" >&6; }
28242  case $ac_cv_c_bigendian in #(
28243    yes)
28244      ENDIAN="big";; #(
28245    no)
28246      ENDIAN="little" ;; #(
28247    universal)
28248      ENDIAN="universal_endianness"
28249      ;; #(
28250    *)
28251      ENDIAN="unknown" ;;
28252  esac
28253 
28254 
28255 if test "x$ENDIAN" = xuniversal_endianness; then
28256     as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
28257 fi
28258 if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
28259     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
28260 fi
28261 
28262 
28263 # Configure flags for the tools
28264 
28265 
28266 ###############################################################################
28267 #
28268 # How to compile shared libraries.
28269 #
28270 
28271 if test "x$GCC" = xyes; then
28272     COMPILER_NAME=gcc
28273     PICFLAG="-fPIC"
28274     LIBRARY_PREFIX=lib
28275     SHARED_LIBRARY='lib$1.so'
28276     STATIC_LIBRARY='lib$1.a'
28277     SHARED_LIBRARY_FLAGS="-shared"
28278     SHARED_LIBRARY_SUFFIX='.so'
28279     STATIC_LIBRARY_SUFFIX='.a'
28280     OBJ_SUFFIX='.o'
28281     EXE_SUFFIX=''
28282     SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
28283     SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
28284     C_FLAG_REORDER=''
28285     CXX_FLAG_REORDER=''
28286     SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
28287     SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
28288     LD="$CC"
28289     LDEXE="$CC"
28290     LDCXX="$CXX"
28291     LDEXECXX="$CXX"
28292     POST_STRIP_CMD="$STRIP -g"
28293 
28294     # Linking is different on MacOSX
28295     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28296         # Might change in the future to clang.
28297         COMPILER_NAME=gcc
28298         SHARED_LIBRARY='lib$1.dylib'
28299         SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
28300         SHARED_LIBRARY_SUFFIX='.dylib'
28301         EXE_SUFFIX=''
28302         SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
28303         SET_SHARED_LIBRARY_MAPFILE=''
28304         SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
28305         SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
28306         POST_STRIP_CMD="$STRIP -S"
28307     fi
28308 else
28309     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28310         # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
28311         COMPILER_NAME=ossc
28312         PICFLAG="-KPIC"
28313         LIBRARY_PREFIX=lib
28314         SHARED_LIBRARY='lib$1.so'
28315         STATIC_LIBRARY='lib$1.a'
28316         SHARED_LIBRARY_FLAGS="-G"
28317         SHARED_LIBRARY_SUFFIX='.so'
28318         STATIC_LIBRARY_SUFFIX='.a'
28319         OBJ_SUFFIX='.o'
28320         EXE_SUFFIX=''
28321         SET_SHARED_LIBRARY_NAME=''
28322         SET_SHARED_LIBRARY_MAPFILE='-M$1'
28323         C_FLAG_REORDER='-xF'
28324         CXX_FLAG_REORDER='-xF'
28325         SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
28326         SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
28327         CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
28328         CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
28329         CFLAGS_JDKLIB_EXTRA='-xstrconst'
28330         POST_STRIP_CMD="$STRIP -x"
28331         POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
28332     fi
28333     if test "x$OPENJDK_TARGET_OS" = xwindows; then
28334         # If it is not gcc, then assume it is the MS Visual Studio compiler
28335         COMPILER_NAME=cl
28336         PICFLAG=""
28337         LIBRARY_PREFIX=
28338         SHARED_LIBRARY='$1.dll'
28339         STATIC_LIBRARY='$1.lib'
28340         SHARED_LIBRARY_FLAGS="-LD"
28341         SHARED_LIBRARY_SUFFIX='.dll'
28342         STATIC_LIBRARY_SUFFIX='.lib'
28343         OBJ_SUFFIX='.obj'
28344         EXE_SUFFIX='.exe'
28345         SET_SHARED_LIBRARY_NAME=''
28346         SET_SHARED_LIBRARY_MAPFILE=''
28347         SET_SHARED_LIBRARY_ORIGIN=''
28348         SET_EXECUTABLE_ORIGIN=''
28349     fi
28350 fi
28351 
28352 
28353 
28354 
28355 
28356 
28357 
28358 
28359 
28360 
28361 
28362 
28363 
28364 
28365 
28366 
28367 
28368 
28369 # The (cross) compiler is now configured, we can now test capabilities
28370 # of the target platform.
28371 
28372 
28373 
28374 ###############################################################################
28375 #
28376 # Setup the opt flags for different compilers
28377 # and different operating systems.
28378 #
28379 
28380 #
28381 # NOTE: check for -mstackrealign needs to be below potential addition of -m32
28382 #
28383 if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
28384     # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
28385     # While waiting for a better solution, the current workaround is to use -mstackrealign.
28386     CFLAGS="$CFLAGS -mstackrealign"
28387     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
28388 $as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
28389     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28390 /* end confdefs.h.  */
28391 int main() { return 0; }
28392 _ACEOF
28393 if ac_fn_cxx_try_link "$LINENO"; then :
28394 
28395                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28396 $as_echo "yes" >&6; }
28397 
28398 else
28399 
28400                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28401 $as_echo "no" >&6; }
28402                         as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
28403 
28404 fi
28405 rm -f core conftest.err conftest.$ac_objext \
28406     conftest$ac_exeext conftest.$ac_ext
28407 fi
28408 
28409 C_FLAG_DEPS="-MMD -MF"
28410 CXX_FLAG_DEPS="-MMD -MF"
28411 
28412 case $COMPILER_TYPE in
28413   CC )
28414     D_FLAG="-g"
28415     case $COMPILER_NAME in
28416       gcc )
28417         case $OPENJDK_TARGET_OS in
28418           macosx )
28419             # On MacOSX we optimize for size, something
28420             # we should do for all platforms?
28421             C_O_FLAG_HI="-Os"
28422             C_O_FLAG_NORM="-Os"
28423             C_O_FLAG_NONE=""
28424             ;;
28425           *)
28426             C_O_FLAG_HI="-O3"
28427             C_O_FLAG_NORM="-O2"
28428             C_O_FLAG_NONE="-O0"
28429             CFLAGS_DEBUG_SYMBOLS="-g"
28430             CXXFLAGS_DEBUG_SYMBOLS="-g"
28431             if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
28432                CFLAGS_DEBUG_SYMBOLS="-g1"
28433                CXXFLAGS_DEBUG_SYMBOLS="-g1"
28434             fi
28435             ;;
28436         esac
28437         CXX_O_FLAG_HI="$C_O_FLAG_HI"
28438         CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
28439         CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
28440         ;;
28441       ossc )
28442         #
28443         # Forte has different names for this with their C++ compiler...
28444         #
28445         C_FLAG_DEPS="-xMMD -xMF"
28446         CXX_FLAG_DEPS="-xMMD -xMF"
28447 
28448         # Extra options used with HIGHEST
28449         #
28450         # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
28451         #          done with care, there are some assumptions below that need to
28452         #          be understood about the use of pointers, and IEEE behavior.
28453         #
28454         # Use non-standard floating point mode (not IEEE 754)
28455         CC_HIGHEST="$CC_HIGHEST -fns"
28456         # Do some simplification of floating point arithmetic (not IEEE 754)
28457         CC_HIGHEST="$CC_HIGHEST -fsimple"
28458         # Use single precision floating point with 'float'
28459         CC_HIGHEST="$CC_HIGHEST -fsingle"
28460         # Assume memory references via basic pointer types do not alias
28461         #   (Source with excessing pointer casting and data access with mixed
28462         #    pointer types are not recommended)
28463         CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
28464         # Use intrinsic or inline versions for math/std functions
28465         #   (If you expect perfect errno behavior, do not use this)
28466         CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
28467         # Loop data dependency optimizations (need -xO3 or higher)
28468         CC_HIGHEST="$CC_HIGHEST -xdepend"
28469         # Pointer parameters to functions do not overlap
28470         #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
28471         #    If you pass in multiple pointers to the same data, do not use this)
28472         CC_HIGHEST="$CC_HIGHEST -xrestrict"
28473         # Inline some library routines
28474         #   (If you expect perfect errno behavior, do not use this)
28475         CC_HIGHEST="$CC_HIGHEST -xlibmil"
28476         # Use optimized math routines
28477         #   (If you expect perfect errno behavior, do not use this)
28478         #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
28479         #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
28480 
28481         if test "x$OPENJDK_TARGET_CPU" = xsparc; then
28482           CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
28483           CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
28484         fi
28485 
28486         case $OPENJDK_TARGET_CPU_ARCH in
28487           x86)
28488             C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
28489             C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
28490             C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
28491             C_O_FLAG_NONE="-xregs=no%frameptr"
28492             CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
28493             CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
28494             CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
28495             CXX_O_FLAG_NONE="-xregs=no%frameptr"
28496             if test "x$OPENJDK_TARGET_CPU" = xx86; then
28497                C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
28498                CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
28499             fi
28500             ;;
28501           sparc)
28502             CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
28503             CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
28504             C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
28505             C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
28506             C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
28507             C_O_FLAG_NONE=""
28508             CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
28509             CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
28510             CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
28511             CXX_O_FLAG_NONE=""
28512             ;;
28513         esac
28514 
28515     CFLAGS_DEBUG_SYMBOLS="-g -xs"
28516     CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
28517     esac
28518     ;;
28519   CL )
28520     D_FLAG=
28521     C_O_FLAG_HIGHEST="-O2"
28522     C_O_FLAG_HI="-O1"
28523     C_O_FLAG_NORM="-O1"
28524     C_O_FLAG_NONE="-Od"
28525     CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
28526     CXX_O_FLAG_HI="$C_O_FLAG_HI"
28527     CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
28528     CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
28529     ;;
28530 esac
28531 
28532 if test -z "$C_O_FLAG_HIGHEST"; then
28533    C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
28534 fi
28535 
28536 if test -z "$CXX_O_FLAG_HIGHEST"; then
28537    CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
28538 fi
28539 
28540 
28541 
28542 
28543 
28544 
28545 
28546 
28547 
28548 
28549 
28550 
28551 
28552 
28553 if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
28554    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
28555 $as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
28556 fi
28557 
28558 if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
28559    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
28560 $as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
28561 fi
28562 
28563 if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
28564    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
28565 $as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
28566 fi
28567 
28568 
28569 # Check whether --with-extra-cflags was given.
28570 if test "${with_extra_cflags+set}" = set; then :
28571   withval=$with_extra_cflags;
28572 fi
28573 
28574 
28575 
28576 # Check whether --with-extra-cxxflags was given.
28577 if test "${with_extra_cxxflags+set}" = set; then :
28578   withval=$with_extra_cxxflags;
28579 fi
28580 
28581 
28582 
28583 # Check whether --with-extra-ldflags was given.
28584 if test "${with_extra_ldflags+set}" = set; then :
28585   withval=$with_extra_ldflags;
28586 fi
28587 
28588 
28589 CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
28590 CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
28591 LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
28592 
28593 # Hotspot needs these set in their legacy form
28594 LEGACY_EXTRA_CFLAGS=$with_extra_cflags
28595 LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
28596 LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
28597 
28598 
28599 
28600 
28601 
28602 ###############################################################################
28603 #
28604 # Now setup the CFLAGS and LDFLAGS for the JDK build.
28605 # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
28606 #
28607 case $COMPILER_NAME in
28608       gcc )
28609           CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
28610                           -pipe \
28611                           -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
28612           case $OPENJDK_TARGET_CPU_ARCH in
28613           arm )
28614             # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
28615             CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
28616           ;;
28617           ppc )
28618             # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
28619           ;;
28620           * )
28621             CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
28622             CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
28623           ;;
28624           esac
28625           ;;
28626       ossc )
28627           CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
28628           case $OPENJDK_TARGET_CPU_ARCH in
28629           x86 )
28630             CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
28631             CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
28632           ;;
28633           esac
28634 
28635           CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
28636           CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
28637 
28638           LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
28639           LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
28640           ;;
28641       cl )
28642           CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
28643                -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
28644                -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
28645                -DWIN32 -DIAL"
28646           case $OPENJDK_TARGET_CPU in
28647               x86 )
28648                   CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
28649                   ;;
28650               x86_64 )
28651                   CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
28652                   ;;
28653           esac
28654           ;;
28655 esac
28656 
28657 ###############################################################################
28658 
28659 CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
28660 
28661 # The package path is used only on macosx?
28662 PACKAGE_PATH=/opt/local
28663 
28664 
28665 if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
28666     # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
28667     #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
28668     #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
28669     #   Note: -Dmacro         is the same as    #define macro 1
28670     #         -Dmacro=      is the same as    #define macro
28671     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28672         CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
28673     else
28674         CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
28675     fi
28676 else
28677     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
28678 fi
28679 if test "x$OPENJDK_TARGET_OS" = xlinux; then
28680     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
28681 fi
28682 if test "x$OPENJDK_TARGET_OS" = xwindows; then
28683     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
28684 fi
28685 if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28686     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
28687 fi
28688 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28689     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE"
28690     # Setting these parameters makes it an error to link to macosx APIs that are
28691     # newer than the given OS version and makes the linked binaries compatible even
28692     # if built on a newer version of the OS.
28693     # The expected format is X.Y.Z
28694     MACOSX_VERSION_MIN=10.7.0
28695 
28696     # The macro takes the version with no dots, ex: 1070
28697     # Let the flags variables get resolved in make for easier override on make
28698     # command line.
28699     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
28700     LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
28701 fi
28702 if test "x$OPENJDK_TARGET_OS" = xbsd; then
28703     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
28704 fi
28705 if test "x$DEBUG_LEVEL" = xrelease; then
28706     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
28707     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28708         CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
28709     fi
28710 else
28711     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
28712 fi
28713 
28714 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
28715 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
28716 
28717 CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
28718         -I${JDK_OUTPUTDIR}/include \
28719         -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
28720         -I${JDK_TOPDIR}/src/share/javavm/export \
28721         -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/javavm/export \
28722         -I${JDK_TOPDIR}/src/share/native/common \
28723         -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
28724 
28725 # The shared libraries are compiled using the picflag.
28726 CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
28727 CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
28728 
28729 # Executable flags
28730 CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
28731 CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
28732 
28733 # Now this is odd. The JDK native libraries have to link against libjvm.so
28734 # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
28735 # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
28736 # is identical for client and server? Yes. Which is picked at runtime (client or server)?
28737 # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
28738 # libraries will link to whatever is in memory. Yuck.
28739 #
28740 # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
28741 if test "x$COMPILER_NAME" = xcl; then
28742     LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
28743     if test "x$OPENJDK_TARGET_CPU" = xx86; then
28744         LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
28745     fi
28746     # TODO: make -debug optional "--disable-full-debug-symbols"
28747     LDFLAGS_JDK="$LDFLAGS_JDK -debug"
28748     LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
28749     LDFLAGS_JDKLIB_SUFFIX=""
28750     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
28751         LDFLAGS_STACK_SIZE=1048576
28752     else
28753         LDFLAGS_STACK_SIZE=327680
28754     fi
28755     LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
28756 else
28757     if test "x$COMPILER_NAME" = xgcc; then
28758         # If this is a --hash-style=gnu system, use --hash-style=both, why?
28759         HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
28760         if test -n "$HAS_GNU_HASH"; then
28761             LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
28762         fi
28763         if test "x$OPENJDK_TARGET_OS" = xlinux; then
28764           # And since we now know that the linker is gnu, then add -z defs, to forbid
28765           # undefined symbols in object files.
28766           LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
28767           if test "x$DEBUG_LEVEL" = "xrelease"; then
28768               # When building release libraries, tell the linker optimize them.
28769               # Should this be supplied to the OSS linker as well?
28770               LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
28771           fi
28772         fi
28773     fi
28774     LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
28775                     -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
28776 
28777     # On some platforms (mac) the linker warns about non existing -L dirs.
28778     # Add server first if available. Linking aginst client does not always produce the same results.
28779     # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
28780     # Default to server for other variants.
28781     if test "x$JVM_VARIANT_SERVER" = xtrue; then
28782         LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
28783     elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
28784         LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
28785     elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
28786         LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
28787     else
28788         LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
28789     fi
28790 
28791     LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
28792     if test "x$COMPILER_NAME" = xossc; then
28793         LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
28794     fi
28795 
28796     LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
28797     if test "x$OPENJDK_TARGET_OS" = xlinux; then
28798         LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
28799     fi
28800 fi
28801 
28802 # Adjust flags according to debug level.
28803 case $DEBUG_LEVEL in
28804       fastdebug )
28805               CFLAGS="$CFLAGS $D_FLAG"
28806               JAVAC_FLAGS="$JAVAC_FLAGS -g"
28807               ;;
28808       slowdebug )
28809               CFLAGS="$CFLAGS $D_FLAG"
28810               C_O_FLAG_HI="$C_O_FLAG_NONE"
28811               C_O_FLAG_NORM="$C_O_FLAG_NONE"
28812               CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
28813               CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
28814               JAVAC_FLAGS="$JAVAC_FLAGS -g"
28815               ;;
28816 esac
28817 
28818 
28819 
28820 
28821 
28822 
28823 
28824 
28825 
28826 
28827 
28828 
28829 
28830 
28831 
28832 # Setup debug symbols (need objcopy from the toolchain for that)
28833 
28834 #
28835 # ENABLE_DEBUG_SYMBOLS
28836 # This must be done after the toolchain is setup, since we're looking at objcopy.
28837 #
28838 # Check whether --enable-debug-symbols was given.
28839 if test "${enable_debug_symbols+set}" = set; then :
28840   enableval=$enable_debug_symbols;
28841 fi
28842 
28843 
28844 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
28845 $as_echo_n "checking if we should generate debug symbols... " >&6; }
28846 
28847 if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
28848    # explicit enabling of enable-debug-symbols and can't find objcopy
28849    #   this is an error
28850    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
28851 fi
28852 
28853 if test "x$enable_debug_symbols" = "xyes"; then
28854   ENABLE_DEBUG_SYMBOLS=true
28855 elif test "x$enable_debug_symbols" = "xno"; then
28856   ENABLE_DEBUG_SYMBOLS=false
28857 else
28858   # default on macosx is false
28859   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28860     ENABLE_DEBUG_SYMBOLS=false
28861   # Default is on if objcopy is found, otherwise off
28862   elif test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
28863     ENABLE_DEBUG_SYMBOLS=true
28864   else
28865     ENABLE_DEBUG_SYMBOLS=false
28866   fi
28867 fi
28868 
28869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
28870 $as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
28871 
28872 #
28873 # ZIP_DEBUGINFO_FILES
28874 #
28875 # Check whether --enable-zip-debug-info was given.
28876 if test "${enable_zip_debug_info+set}" = set; then :
28877   enableval=$enable_zip_debug_info;
28878 fi
28879 
28880 
28881 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
28882 $as_echo_n "checking if we should zip debug-info files... " >&6; }
28883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
28884 $as_echo "${enable_zip_debug_info}" >&6; }
28885 
28886 if test "x${enable_zip_debug_info}" = "xno"; then
28887    ZIP_DEBUGINFO_FILES=false
28888 else
28889    ZIP_DEBUGINFO_FILES=true
28890 fi
28891 
28892 
28893 
28894 
28895 
28896 
28897 
28898 ###############################################################################
28899 #
28900 # Check dependencies for external and internal libraries.
28901 #
28902 ###############################################################################
28903 
28904 
28905 
28906 ###############################################################################
28907 #
28908 # OS specific settings that we never will need to probe.
28909 #
28910 if test "x$OPENJDK_TARGET_OS" = xlinux; then
28911     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
28912 $as_echo_n "checking what is not needed on Linux?... " >&6; }
28913     PULSE_NOT_NEEDED=yes
28914     { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
28915 $as_echo "pulse" >&6; }
28916 fi
28917 
28918 if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28919     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
28920 $as_echo_n "checking what is not needed on Solaris?... " >&6; }
28921     ALSA_NOT_NEEDED=yes
28922     PULSE_NOT_NEEDED=yes
28923     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
28924 $as_echo "alsa pulse" >&6; }
28925 fi
28926 
28927 if test "x$OPENJDK_TARGET_OS" = xwindows; then
28928     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
28929 $as_echo_n "checking what is not needed on Windows?... " >&6; }
28930     CUPS_NOT_NEEDED=yes
28931     ALSA_NOT_NEEDED=yes
28932     PULSE_NOT_NEEDED=yes
28933     X11_NOT_NEEDED=yes
28934     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
28935 $as_echo "alsa cups pulse x11" >&6; }
28936 fi
28937 
28938 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28939     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
28940 $as_echo_n "checking what is not needed on MacOSX?... " >&6; }
28941     ALSA_NOT_NEEDED=yes
28942     PULSE_NOT_NEEDED=yes
28943     X11_NOT_NEEDED=yes
28944     FREETYPE2_NOT_NEEDED=yes
28945     # If the java runtime framework is disabled, then we need X11.
28946     # This will be adjusted below.
28947     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
28948 $as_echo "alsa pulse x11" >&6; }
28949 fi
28950 
28951 if test "x$OPENJDK_TARGET_OS" = xbsd; then
28952     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
28953 $as_echo_n "checking what is not needed on bsd?... " >&6; }
28954     ALSA_NOT_NEEDED=yes
28955     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
28956 $as_echo "alsa" >&6; }
28957 fi
28958 
28959 if test "x$OPENJDK" = "xfalse"; then
28960     FREETYPE2_NOT_NEEDED=yes
28961 fi
28962 
28963 if test "x$SUPPORT_HEADFUL" = xno; then
28964     X11_NOT_NEEDED=yes
28965 fi
28966 
28967 ###############################################################################
28968 #
28969 # Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
28970 # that uses this API.
28971 #
28972 # Check whether --enable-macosx-runtime-support was given.
28973 if test "${enable_macosx_runtime_support+set}" = set; then :
28974   enableval=$enable_macosx_runtime_support; MACOSX_RUNTIME_SUPPORT="${enableval}"
28975 else
28976   MACOSX_RUNTIME_SUPPORT="no"
28977 fi
28978 
28979 
28980 USE_MACOSX_RUNTIME_SUPPORT=no
28981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for explicit Java runtime support in the OS" >&5
28982 $as_echo_n "checking for explicit Java runtime support in the OS... " >&6; }
28983 if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
28984     if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
28985         MACOSX_RUNTIME_SUPPORT=yes
28986         USE_MACOSX_RUNTIME_SUPPORT=yes
28987         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, does not need alsa freetype2 pulse and X11" >&5
28988 $as_echo "yes, does not need alsa freetype2 pulse and X11" >&6; }
28989     else
28990         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, but explicitly disabled." >&5
28991 $as_echo "yes, but explicitly disabled." >&6; }
28992     fi
28993 else
28994     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28995 $as_echo "no" >&6; }
28996 fi
28997 
28998 if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
28999     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on an X11 build on MacOSX?" >&5
29000 $as_echo_n "checking what is not needed on an X11 build on MacOSX?... " >&6; }
29001     X11_NOT_NEEDED=
29002     FREETYPE2_NOT_NEEDED=
29003     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
29004 $as_echo "alsa pulse" >&6; }
29005 fi
29006 
29007 
29008 
29009 
29010 ###############################################################################
29011 #
29012 # Check for X Windows
29013 #
29014 
29015 # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
29016 # Make a simple check for the libraries at the sysroot, and setup --x-includes and
29017 # --x-libraries for the sysroot, if that seems to be correct.
29018 if test "x$SYS_ROOT" != "x/"; then
29019   if test "x$x_includes" = xNONE; then
29020     if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
29021       x_includes="$SYS_ROOT/usr/X11R6/include"
29022     fi
29023   fi
29024   if test "x$x_libraries" = xNONE; then
29025     if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
29026       x_libraries="$SYS_ROOT/usr/X11R6/lib"
29027     fi
29028   fi
29029 fi
29030 
29031 # Now let autoconf do it's magic
29032 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
29033 $as_echo_n "checking for X... " >&6; }
29034 
29035 
29036 # Check whether --with-x was given.
29037 if test "${with_x+set}" = set; then :
29038   withval=$with_x;
29039 fi
29040 
29041 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
29042 if test "x$with_x" = xno; then
29043   # The user explicitly disabled X.
29044   have_x=disabled
29045 else
29046   case $x_includes,$x_libraries in #(
29047     *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
29048     *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
29049   $as_echo_n "(cached) " >&6
29050 else
29051   # One or both of the vars are not set, and there is no cached value.
29052 ac_x_includes=no ac_x_libraries=no
29053 rm -f -r conftest.dir
29054 if mkdir conftest.dir; then
29055   cd conftest.dir
29056   cat >Imakefile <<'_ACEOF'
29057 incroot:
29058         @echo incroot='${INCROOT}'
29059 usrlibdir:
29060         @echo usrlibdir='${USRLIBDIR}'
29061 libdir:
29062         @echo libdir='${LIBDIR}'
29063 _ACEOF
29064   if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
29065     # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
29066     for ac_var in incroot usrlibdir libdir; do
29067       eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
29068     done
29069     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
29070     for ac_extension in a so sl dylib la dll; do
29071       if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
29072          test -f "$ac_im_libdir/libX11.$ac_extension"; then
29073         ac_im_usrlibdir=$ac_im_libdir; break
29074       fi
29075     done
29076     # Screen out bogus values from the imake configuration.  They are
29077     # bogus both because they are the default anyway, and because
29078     # using them would break gcc on systems where it needs fixed includes.
29079     case $ac_im_incroot in
29080         /usr/include) ac_x_includes= ;;
29081         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
29082     esac
29083     case $ac_im_usrlibdir in
29084         /usr/lib | /usr/lib64 | /lib | /lib64) ;;
29085         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
29086     esac
29087   fi
29088   cd ..
29089   rm -f -r conftest.dir
29090 fi
29091 
29092 # Standard set of common directories for X headers.
29093 # Check X11 before X11Rn because it is often a symlink to the current release.
29094 ac_x_header_dirs='
29095 /usr/X11/include
29096 /usr/X11R7/include
29097 /usr/X11R6/include
29098 /usr/X11R5/include
29099 /usr/X11R4/include
29100 
29101 /usr/include/X11
29102 /usr/include/X11R7
29103 /usr/include/X11R6
29104 /usr/include/X11R5
29105 /usr/include/X11R4
29106 
29107 /usr/local/X11/include
29108 /usr/local/X11R7/include
29109 /usr/local/X11R6/include
29110 /usr/local/X11R5/include
29111 /usr/local/X11R4/include
29112 
29113 /usr/local/include/X11
29114 /usr/local/include/X11R7
29115 /usr/local/include/X11R6
29116 /usr/local/include/X11R5
29117 /usr/local/include/X11R4
29118 
29119 /usr/X386/include
29120 /usr/x386/include
29121 /usr/XFree86/include/X11
29122 
29123 /usr/include
29124 /usr/local/include
29125 /usr/unsupported/include
29126 /usr/athena/include
29127 /usr/local/x11r5/include
29128 /usr/lpp/Xamples/include
29129 
29130 /usr/openwin/include
29131 /usr/openwin/share/include'
29132 
29133 if test "$ac_x_includes" = no; then
29134   # Guess where to find include files, by looking for Xlib.h.
29135   # First, try using that file with no special directory specified.
29136   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29137 /* end confdefs.h.  */
29138 #include <X11/Xlib.h>
29139 _ACEOF
29140 if ac_fn_cxx_try_cpp "$LINENO"; then :
29141   # We can compile using X headers with no special include directory.
29142 ac_x_includes=
29143 else
29144   for ac_dir in $ac_x_header_dirs; do
29145   if test -r "$ac_dir/X11/Xlib.h"; then
29146     ac_x_includes=$ac_dir
29147     break
29148   fi
29149 done
29150 fi
29151 rm -f conftest.err conftest.i conftest.$ac_ext
29152 fi # $ac_x_includes = no
29153 
29154 if test "$ac_x_libraries" = no; then
29155   # Check for the libraries.
29156   # See if we find them without any special options.
29157   # Don't add to $LIBS permanently.
29158   ac_save_LIBS=$LIBS
29159   LIBS="-lX11 $LIBS"
29160   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29161 /* end confdefs.h.  */
29162 #include <X11/Xlib.h>
29163 int
29164 main ()
29165 {
29166 XrmInitialize ()
29167   ;
29168   return 0;
29169 }
29170 _ACEOF
29171 if ac_fn_cxx_try_link "$LINENO"; then :
29172   LIBS=$ac_save_LIBS
29173 # We can link X programs with no special library path.
29174 ac_x_libraries=
29175 else
29176   LIBS=$ac_save_LIBS
29177 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
29178 do
29179   # Don't even attempt the hair of trying to link an X program!
29180   for ac_extension in a so sl dylib la dll; do
29181     if test -r "$ac_dir/libX11.$ac_extension"; then
29182       ac_x_libraries=$ac_dir
29183       break 2
29184     fi
29185   done
29186 done
29187 fi
29188 rm -f core conftest.err conftest.$ac_objext \
29189     conftest$ac_exeext conftest.$ac_ext
29190 fi # $ac_x_libraries = no
29191 
29192 case $ac_x_includes,$ac_x_libraries in #(
29193   no,* | *,no | *\'*)
29194     # Didn't find X, or a directory has "'" in its name.
29195     ac_cv_have_x="have_x=no";; #(
29196   *)
29197     # Record where we found X for the cache.
29198     ac_cv_have_x="have_x=yes\
29199         ac_x_includes='$ac_x_includes'\
29200         ac_x_libraries='$ac_x_libraries'"
29201 esac
29202 fi
29203 ;; #(
29204     *) have_x=yes;;
29205   esac
29206   eval "$ac_cv_have_x"
29207 fi # $with_x != no
29208 
29209 if test "$have_x" != yes; then
29210   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
29211 $as_echo "$have_x" >&6; }
29212   no_x=yes
29213 else
29214   # If each of the values was on the command line, it overrides each guess.
29215   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
29216   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
29217   # Update the cache value to reflect the command line values.
29218   ac_cv_have_x="have_x=yes\
29219         ac_x_includes='$x_includes'\
29220         ac_x_libraries='$x_libraries'"
29221   { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
29222 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
29223 fi
29224 
29225 if test "$no_x" = yes; then
29226   # Not all programs may use this symbol, but it does not hurt to define it.
29227 
29228 $as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
29229 
29230   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
29231 else
29232   if test -n "$x_includes"; then
29233     X_CFLAGS="$X_CFLAGS -I$x_includes"
29234   fi
29235 
29236   # It would also be nice to do this for all -L options, not just this one.
29237   if test -n "$x_libraries"; then
29238     X_LIBS="$X_LIBS -L$x_libraries"
29239     # For Solaris; some versions of Sun CC require a space after -R and
29240     # others require no space.  Words are not sufficient . . . .
29241     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
29242 $as_echo_n "checking whether -R must be followed by a space... " >&6; }
29243     ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
29244     ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
29245     ac_cxx_werror_flag=yes
29246     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29247 /* end confdefs.h.  */
29248 
29249 int
29250 main ()
29251 {
29252 
29253   ;
29254   return 0;
29255 }
29256 _ACEOF
29257 if ac_fn_cxx_try_link "$LINENO"; then :
29258   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29259 $as_echo "no" >&6; }
29260        X_LIBS="$X_LIBS -R$x_libraries"
29261 else
29262   LIBS="$ac_xsave_LIBS -R $x_libraries"
29263        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29264 /* end confdefs.h.  */
29265 
29266 int
29267 main ()
29268 {
29269 
29270   ;
29271   return 0;
29272 }
29273 _ACEOF
29274 if ac_fn_cxx_try_link "$LINENO"; then :
29275   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29276 $as_echo "yes" >&6; }
29277           X_LIBS="$X_LIBS -R $x_libraries"
29278 else
29279   { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
29280 $as_echo "neither works" >&6; }
29281 fi
29282 rm -f core conftest.err conftest.$ac_objext \
29283     conftest$ac_exeext conftest.$ac_ext
29284 fi
29285 rm -f core conftest.err conftest.$ac_objext \
29286     conftest$ac_exeext conftest.$ac_ext
29287     ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
29288     LIBS=$ac_xsave_LIBS
29289   fi
29290 
29291   # Check for system-dependent libraries X programs must link with.
29292   # Do this before checking for the system-independent R6 libraries
29293   # (-lICE), since we may need -lsocket or whatever for X linking.
29294 
29295   if test "$ISC" = yes; then
29296     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
29297   else
29298     # Martyn Johnson says this is needed for Ultrix, if the X
29299     # libraries were built with DECnet support.  And Karl Berry says
29300     # the Alpha needs dnet_stub (dnet does not exist).
29301     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
29302     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29303 /* end confdefs.h.  */
29304 
29305 /* Override any GCC internal prototype to avoid an error.
29306    Use char because int might match the return type of a GCC
29307    builtin and then its argument prototype would still apply.  */
29308 #ifdef __cplusplus
29309 extern "C"
29310 #endif
29311 char XOpenDisplay ();
29312 int
29313 main ()
29314 {
29315 return XOpenDisplay ();
29316   ;
29317   return 0;
29318 }
29319 _ACEOF
29320 if ac_fn_cxx_try_link "$LINENO"; then :
29321 
29322 else
29323   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
29324 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
29325 if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
29326   $as_echo_n "(cached) " >&6
29327 else
29328   ac_check_lib_save_LIBS=$LIBS
29329 LIBS="-ldnet  $LIBS"
29330 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29331 /* end confdefs.h.  */
29332 
29333 /* Override any GCC internal prototype to avoid an error.
29334    Use char because int might match the return type of a GCC
29335    builtin and then its argument prototype would still apply.  */
29336 #ifdef __cplusplus
29337 extern "C"
29338 #endif
29339 char dnet_ntoa ();
29340 int
29341 main ()
29342 {
29343 return dnet_ntoa ();
29344   ;
29345   return 0;
29346 }
29347 _ACEOF
29348 if ac_fn_cxx_try_link "$LINENO"; then :
29349   ac_cv_lib_dnet_dnet_ntoa=yes
29350 else
29351   ac_cv_lib_dnet_dnet_ntoa=no
29352 fi
29353 rm -f core conftest.err conftest.$ac_objext \
29354     conftest$ac_exeext conftest.$ac_ext
29355 LIBS=$ac_check_lib_save_LIBS
29356 fi
29357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
29358 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
29359 if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
29360   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
29361 fi
29362 
29363     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
29364       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
29365 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
29366 if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
29367   $as_echo_n "(cached) " >&6
29368 else
29369   ac_check_lib_save_LIBS=$LIBS
29370 LIBS="-ldnet_stub  $LIBS"
29371 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29372 /* end confdefs.h.  */
29373 
29374 /* Override any GCC internal prototype to avoid an error.
29375    Use char because int might match the return type of a GCC
29376    builtin and then its argument prototype would still apply.  */
29377 #ifdef __cplusplus
29378 extern "C"
29379 #endif
29380 char dnet_ntoa ();
29381 int
29382 main ()
29383 {
29384 return dnet_ntoa ();
29385   ;
29386   return 0;
29387 }
29388 _ACEOF
29389 if ac_fn_cxx_try_link "$LINENO"; then :
29390   ac_cv_lib_dnet_stub_dnet_ntoa=yes
29391 else
29392   ac_cv_lib_dnet_stub_dnet_ntoa=no
29393 fi
29394 rm -f core conftest.err conftest.$ac_objext \
29395     conftest$ac_exeext conftest.$ac_ext
29396 LIBS=$ac_check_lib_save_LIBS
29397 fi
29398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
29399 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
29400 if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
29401   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
29402 fi
29403 
29404     fi
29405 fi
29406 rm -f core conftest.err conftest.$ac_objext \
29407     conftest$ac_exeext conftest.$ac_ext
29408     LIBS="$ac_xsave_LIBS"
29409 
29410     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
29411     # to get the SysV transport functions.
29412     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
29413     # needs -lnsl.
29414     # The nsl library prevents programs from opening the X display
29415     # on Irix 5.2, according to T.E. Dickey.
29416     # The functions gethostbyname, getservbyname, and inet_addr are
29417     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
29418     ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
29419 if test "x$ac_cv_func_gethostbyname" = xyes; then :
29420 
29421 fi
29422 
29423     if test $ac_cv_func_gethostbyname = no; then
29424       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
29425 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
29426 if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
29427   $as_echo_n "(cached) " >&6
29428 else
29429   ac_check_lib_save_LIBS=$LIBS
29430 LIBS="-lnsl  $LIBS"
29431 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29432 /* end confdefs.h.  */
29433 
29434 /* Override any GCC internal prototype to avoid an error.
29435    Use char because int might match the return type of a GCC
29436    builtin and then its argument prototype would still apply.  */
29437 #ifdef __cplusplus
29438 extern "C"
29439 #endif
29440 char gethostbyname ();
29441 int
29442 main ()
29443 {
29444 return gethostbyname ();
29445   ;
29446   return 0;
29447 }
29448 _ACEOF
29449 if ac_fn_cxx_try_link "$LINENO"; then :
29450   ac_cv_lib_nsl_gethostbyname=yes
29451 else
29452   ac_cv_lib_nsl_gethostbyname=no
29453 fi
29454 rm -f core conftest.err conftest.$ac_objext \
29455     conftest$ac_exeext conftest.$ac_ext
29456 LIBS=$ac_check_lib_save_LIBS
29457 fi
29458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
29459 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
29460 if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
29461   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
29462 fi
29463 
29464       if test $ac_cv_lib_nsl_gethostbyname = no; then
29465         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
29466 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
29467 if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
29468   $as_echo_n "(cached) " >&6
29469 else
29470   ac_check_lib_save_LIBS=$LIBS
29471 LIBS="-lbsd  $LIBS"
29472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29473 /* end confdefs.h.  */
29474 
29475 /* Override any GCC internal prototype to avoid an error.
29476    Use char because int might match the return type of a GCC
29477    builtin and then its argument prototype would still apply.  */
29478 #ifdef __cplusplus
29479 extern "C"
29480 #endif
29481 char gethostbyname ();
29482 int
29483 main ()
29484 {
29485 return gethostbyname ();
29486   ;
29487   return 0;
29488 }
29489 _ACEOF
29490 if ac_fn_cxx_try_link "$LINENO"; then :
29491   ac_cv_lib_bsd_gethostbyname=yes
29492 else
29493   ac_cv_lib_bsd_gethostbyname=no
29494 fi
29495 rm -f core conftest.err conftest.$ac_objext \
29496     conftest$ac_exeext conftest.$ac_ext
29497 LIBS=$ac_check_lib_save_LIBS
29498 fi
29499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
29500 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
29501 if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
29502   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
29503 fi
29504 
29505       fi
29506     fi
29507 
29508     # lieder@skyler.mavd.honeywell.com says without -lsocket,
29509     # socket/setsockopt and other routines are undefined under SCO ODT
29510     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
29511     # on later versions), says Simon Leinen: it contains gethostby*
29512     # variants that don't use the name server (or something).  -lsocket
29513     # must be given before -lnsl if both are needed.  We assume that
29514     # if connect needs -lnsl, so does gethostbyname.
29515     ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
29516 if test "x$ac_cv_func_connect" = xyes; then :
29517 
29518 fi
29519 
29520     if test $ac_cv_func_connect = no; then
29521       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
29522 $as_echo_n "checking for connect in -lsocket... " >&6; }
29523 if ${ac_cv_lib_socket_connect+:} false; then :
29524   $as_echo_n "(cached) " >&6
29525 else
29526   ac_check_lib_save_LIBS=$LIBS
29527 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
29528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29529 /* end confdefs.h.  */
29530 
29531 /* Override any GCC internal prototype to avoid an error.
29532    Use char because int might match the return type of a GCC
29533    builtin and then its argument prototype would still apply.  */
29534 #ifdef __cplusplus
29535 extern "C"
29536 #endif
29537 char connect ();
29538 int
29539 main ()
29540 {
29541 return connect ();
29542   ;
29543   return 0;
29544 }
29545 _ACEOF
29546 if ac_fn_cxx_try_link "$LINENO"; then :
29547   ac_cv_lib_socket_connect=yes
29548 else
29549   ac_cv_lib_socket_connect=no
29550 fi
29551 rm -f core conftest.err conftest.$ac_objext \
29552     conftest$ac_exeext conftest.$ac_ext
29553 LIBS=$ac_check_lib_save_LIBS
29554 fi
29555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
29556 $as_echo "$ac_cv_lib_socket_connect" >&6; }
29557 if test "x$ac_cv_lib_socket_connect" = xyes; then :
29558   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
29559 fi
29560 
29561     fi
29562 
29563     # Guillermo Gomez says -lposix is necessary on A/UX.
29564     ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
29565 if test "x$ac_cv_func_remove" = xyes; then :
29566 
29567 fi
29568 
29569     if test $ac_cv_func_remove = no; then
29570       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
29571 $as_echo_n "checking for remove in -lposix... " >&6; }
29572 if ${ac_cv_lib_posix_remove+:} false; then :
29573   $as_echo_n "(cached) " >&6
29574 else
29575   ac_check_lib_save_LIBS=$LIBS
29576 LIBS="-lposix  $LIBS"
29577 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29578 /* end confdefs.h.  */
29579 
29580 /* Override any GCC internal prototype to avoid an error.
29581    Use char because int might match the return type of a GCC
29582    builtin and then its argument prototype would still apply.  */
29583 #ifdef __cplusplus
29584 extern "C"
29585 #endif
29586 char remove ();
29587 int
29588 main ()
29589 {
29590 return remove ();
29591   ;
29592   return 0;
29593 }
29594 _ACEOF
29595 if ac_fn_cxx_try_link "$LINENO"; then :
29596   ac_cv_lib_posix_remove=yes
29597 else
29598   ac_cv_lib_posix_remove=no
29599 fi
29600 rm -f core conftest.err conftest.$ac_objext \
29601     conftest$ac_exeext conftest.$ac_ext
29602 LIBS=$ac_check_lib_save_LIBS
29603 fi
29604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
29605 $as_echo "$ac_cv_lib_posix_remove" >&6; }
29606 if test "x$ac_cv_lib_posix_remove" = xyes; then :
29607   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
29608 fi
29609 
29610     fi
29611 
29612     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
29613     ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
29614 if test "x$ac_cv_func_shmat" = xyes; then :
29615 
29616 fi
29617 
29618     if test $ac_cv_func_shmat = no; then
29619       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
29620 $as_echo_n "checking for shmat in -lipc... " >&6; }
29621 if ${ac_cv_lib_ipc_shmat+:} false; then :
29622   $as_echo_n "(cached) " >&6
29623 else
29624   ac_check_lib_save_LIBS=$LIBS
29625 LIBS="-lipc  $LIBS"
29626 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29627 /* end confdefs.h.  */
29628 
29629 /* Override any GCC internal prototype to avoid an error.
29630    Use char because int might match the return type of a GCC
29631    builtin and then its argument prototype would still apply.  */
29632 #ifdef __cplusplus
29633 extern "C"
29634 #endif
29635 char shmat ();
29636 int
29637 main ()
29638 {
29639 return shmat ();
29640   ;
29641   return 0;
29642 }
29643 _ACEOF
29644 if ac_fn_cxx_try_link "$LINENO"; then :
29645   ac_cv_lib_ipc_shmat=yes
29646 else
29647   ac_cv_lib_ipc_shmat=no
29648 fi
29649 rm -f core conftest.err conftest.$ac_objext \
29650     conftest$ac_exeext conftest.$ac_ext
29651 LIBS=$ac_check_lib_save_LIBS
29652 fi
29653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
29654 $as_echo "$ac_cv_lib_ipc_shmat" >&6; }
29655 if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
29656   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
29657 fi
29658 
29659     fi
29660   fi
29661 
29662   # Check for libraries that X11R6 Xt/Xaw programs need.
29663   ac_save_LDFLAGS=$LDFLAGS
29664   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
29665   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
29666   # check for ICE first), but we must link in the order -lSM -lICE or
29667   # we get undefined symbols.  So assume we have SM if we have ICE.
29668   # These have to be linked with before -lX11, unlike the other
29669   # libraries we check for below, so use a different variable.
29670   # John Interrante, Karl Berry
29671   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
29672 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
29673 if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
29674   $as_echo_n "(cached) " >&6
29675 else
29676   ac_check_lib_save_LIBS=$LIBS
29677 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
29678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29679 /* end confdefs.h.  */
29680 
29681 /* Override any GCC internal prototype to avoid an error.
29682    Use char because int might match the return type of a GCC
29683    builtin and then its argument prototype would still apply.  */
29684 #ifdef __cplusplus
29685 extern "C"
29686 #endif
29687 char IceConnectionNumber ();
29688 int
29689 main ()
29690 {
29691 return IceConnectionNumber ();
29692   ;
29693   return 0;
29694 }
29695 _ACEOF
29696 if ac_fn_cxx_try_link "$LINENO"; then :
29697   ac_cv_lib_ICE_IceConnectionNumber=yes
29698 else
29699   ac_cv_lib_ICE_IceConnectionNumber=no
29700 fi
29701 rm -f core conftest.err conftest.$ac_objext \
29702     conftest$ac_exeext conftest.$ac_ext
29703 LIBS=$ac_check_lib_save_LIBS
29704 fi
29705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
29706 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
29707 if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
29708   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
29709 fi
29710 
29711   LDFLAGS=$ac_save_LDFLAGS
29712 
29713 fi
29714 
29715 
29716 # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
29717 # this doesn't make sense so we remove it.
29718 if test "x$COMPILE_TYPE" = xcross; then
29719   X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
29720 fi
29721 
29722 if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
29723 
29724     # Print a helpful message on how to acquire the necessary build dependency.
29725     # x11 is the help tag: freetyp2, cups, pulse, alsa etc
29726     MISSING_DEPENDENCY=x11
29727     PKGHANDLER_COMMAND=
29728 
29729     case $PKGHANDLER in
29730         apt-get)
29731                 apt_help     $MISSING_DEPENDENCY ;;
29732     yum)
29733                 yum_help     $MISSING_DEPENDENCY ;;
29734         port)
29735                 port_help    $MISSING_DEPENDENCY ;;
29736         pkgutil)
29737                 pkgutil_help $MISSING_DEPENDENCY ;;
29738         pkgadd)
29739                 pkgadd_help  $MISSING_DEPENDENCY ;;
29740     * )
29741       break ;;
29742     esac
29743 
29744     if test "x$PKGHANDLER_COMMAND" != x; then
29745         HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29746     fi
29747 
29748     as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
29749 fi
29750 
29751 # Some of the old makefiles require a setting of OPENWIN_HOME
29752 # Since the X11R6 directory has disappeared on later Linuxes,
29753 # we need to probe for it.
29754 if test "x$OPENJDK_TARGET_OS" = xlinux; then
29755     if test -d "$SYS_ROOT/usr/X11R6"; then
29756         OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
29757     fi
29758     if test -d "$SYS_ROOT/usr/include/X11"; then
29759         OPENWIN_HOME="$SYS_ROOT/usr"
29760     fi
29761 fi
29762 if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29763     OPENWIN_HOME="/usr/openwin"
29764 fi
29765 
29766 
29767 
29768 #
29769 # Weird Sol10 something check...TODO change to try compile
29770 #
29771 if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
29772   if test "`uname -r`" = "5.10"; then
29773      if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
29774         X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
29775      fi
29776   fi
29777 fi
29778 
29779 ac_ext=c
29780 ac_cpp='$CPP $CPPFLAGS'
29781 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29782 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29783 ac_compiler_gnu=$ac_cv_c_compiler_gnu
29784 
29785 OLD_CFLAGS="$CFLAGS"
29786 CFLAGS="$CFLAGS $X_CFLAGS"
29787 
29788 # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
29789 for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h
29790 do :
29791   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
29792 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " # include <X11/Xlib.h>
29793                    # include <X11/Xutil.h>
29794 
29795 "
29796 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
29797   cat >>confdefs.h <<_ACEOF
29798 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
29799 _ACEOF
29800  X11_A_OK=yes
29801 else
29802   X11_A_OK=no
29803 fi
29804 
29805 done
29806 
29807 
29808 CFLAGS="$OLD_CFLAGS"
29809 ac_ext=cpp
29810 ac_cpp='$CXXCPP $CPPFLAGS'
29811 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29812 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29813 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29814 
29815 
29816 if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
29817 
29818     # Print a helpful message on how to acquire the necessary build dependency.
29819     # x11 is the help tag: freetyp2, cups, pulse, alsa etc
29820     MISSING_DEPENDENCY=x11
29821     PKGHANDLER_COMMAND=
29822 
29823     case $PKGHANDLER in
29824         apt-get)
29825                 apt_help     $MISSING_DEPENDENCY ;;
29826     yum)
29827                 yum_help     $MISSING_DEPENDENCY ;;
29828         port)
29829                 port_help    $MISSING_DEPENDENCY ;;
29830         pkgutil)
29831                 pkgutil_help $MISSING_DEPENDENCY ;;
29832         pkgadd)
29833                 pkgadd_help  $MISSING_DEPENDENCY ;;
29834     * )
29835       break ;;
29836     esac
29837 
29838     if test "x$PKGHANDLER_COMMAND" != x; then
29839         HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29840     fi
29841 
29842     as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h). $HELP_MSG" "$LINENO" 5
29843 fi
29844 
29845 
29846 
29847 
29848 
29849 
29850 ###############################################################################
29851 #
29852 # The common unix printing system cups is used to print from java.
29853 #
29854 
29855 # Check whether --with-cups was given.
29856 if test "${with_cups+set}" = set; then :
29857   withval=$with_cups;
29858 fi
29859 
29860 
29861 # Check whether --with-cups-include was given.
29862 if test "${with_cups_include+set}" = set; then :
29863   withval=$with_cups_include;
29864 fi
29865 
29866 
29867 if test "x$CUPS_NOT_NEEDED" = xyes; then
29868         if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
29869                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
29870 $as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
29871         fi
29872         CUPS_CFLAGS=
29873 else
29874         CUPS_FOUND=no
29875 
29876         if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
29877             as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
29878         fi
29879 
29880         if test "x${with_cups}" != x; then
29881             CUPS_CFLAGS="-I${with_cups}/include"
29882             CUPS_FOUND=yes
29883         fi
29884         if test "x${with_cups_include}" != x; then
29885             CUPS_CFLAGS="-I${with_cups_include}"
29886             CUPS_FOUND=yes
29887         fi
29888         if test "x$CUPS_FOUND" = xno; then
29889 
29890 
29891     if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
29892         # Source the builddeps file again, to make sure it uses the latest variables!
29893         . $builddepsfile
29894         # Look for a target and build machine specific resource!
29895         eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
29896         if test "x$resource" = x; then
29897             # Ok, lets instead look for a target specific resource
29898             eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
29899         fi
29900         if test "x$resource" = x; then
29901             # Ok, lets instead look for a build specific resource
29902             eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
29903         fi
29904         if test "x$resource" = x; then
29905             # Ok, lets instead look for a generic resource
29906             # (The cups comes from M4 and not the shell, thus no need for eval here.)
29907             resource=${builddep_cups}
29908         fi
29909         if test "x$resource" != x; then
29910             { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
29911 $as_echo "$as_me: Using builddeps $resource for cups" >&6;}
29912             # If the resource in the builddeps.conf file is an existing directory,
29913             # for example /java/linux/cups
29914             if test -d ${resource}; then
29915                depdir=${resource}
29916             else
29917 
29918 # cups is for example mymodule
29919 # $resource is for example libs/general/libmymod_1_2_3.zip
29920 # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
29921 # $with_builddeps_dir is for example /localhome/builddeps
29922 # depdir is the name of the variable into which we store the depdir, eg MYMOD
29923 # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
29924 # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
29925     filename=`basename $resource`
29926     filebase=`echo $filename | sed 's/\.[^\.]*$//'`
29927     filebase=${filename%%.*}
29928     extension=${filename#*.}
29929     installdir=$with_builddeps_dir/$filebase
29930     if test ! -f $installdir/$filename.unpacked; then
29931         { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
29932 $as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
29933         if test ! -d $installdir; then
29934             mkdir -p $installdir
29935         fi
29936         if test ! -d $installdir; then
29937             as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
29938         fi
29939         tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
29940         touch $tmpfile
29941         if test ! -f $tmpfile; then
29942             as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
29943         fi
29944 
29945     # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
29946     # $tmpfile is the local file name for the downloaded file.
29947     VALID_TOOL=no
29948     if test "x$BDEPS_FTP" = xwget; then
29949        VALID_TOOL=yes
29950        wget -O $tmpfile $with_builddeps_server/$resource
29951     fi
29952     if test "x$BDEPS_FTP" = xlftp; then
29953        VALID_TOOL=yes
29954        lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
29955     fi
29956     if test "x$BDEPS_FTP" = xftp; then
29957         VALID_TOOL=yes
29958         FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
29959         FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
29960         FTPUSERPWD=${FTPSERVER%%@*}
29961         if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
29962             FTPUSER=${userpwd%%:*}
29963             FTPPWD=${userpwd#*@}
29964             FTPSERVER=${FTPSERVER#*@}
29965         else
29966             FTPUSER=ftp
29967             FTPPWD=ftp
29968         fi
29969         # the "pass" command does not work on some
29970         # ftp clients (read ftp.exe) but if it works,
29971         # passive mode is better!
29972         (\
29973             echo "user $FTPUSER $FTPPWD"        ;\
29974             echo "pass"                         ;\
29975             echo "bin"                          ;\
29976             echo "get $FTPPATH $tmpfile"              ;\
29977         ) | ftp -in $FTPSERVER
29978     fi
29979     if test "x$VALID_TOOL" != xyes; then
29980        as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
29981     fi
29982 
29983         mv $tmpfile $installdir/$filename
29984         if test ! -s $installdir/$filename; then
29985             as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
29986         fi
29987         case "$extension" in
29988             zip)  echo "Unzipping $installdir/$filename..."
29989                (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
29990             ;;
29991             tar.gz) echo "Untaring $installdir/$filename..."
29992                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29993             ;;
29994             tgz) echo "Untaring $installdir/$filename..."
29995                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29996             ;;
29997             *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
29998             ;;
29999         esac
30000     fi
30001     if test -f $installdir/$filename.unpacked; then
30002         depdir=$installdir
30003     fi
30004 
30005             fi
30006             # Source the builddeps file again, because in the previous command, the depdir
30007             # was updated to point at the current build dependency install directory.
30008             . $builddepsfile
30009             # Now extract variables from the builddeps.conf files.
30010             theroot=${builddep_cups_ROOT}
30011             thecflags=${builddep_cups_CFLAGS}
30012             thelibs=${builddep_cups_LIBS}
30013             if test "x$depdir" = x; then
30014                 as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
30015             fi
30016             CUPS=$depdir
30017             if test "x$theroot" != x; then
30018                CUPS="$theroot"
30019             fi
30020             if test "x$thecflags" != x; then
30021                CUPS_CFLAGS="$thecflags"
30022             fi
30023             if test "x$thelibs" != x; then
30024                CUPS_LIBS="$thelibs"
30025             fi
30026             CUPS_FOUND=yes
30027 
30028         fi
30029 
30030     fi
30031 
30032         fi
30033         if test "x$CUPS_FOUND" = xno; then
30034             # Are the cups headers installed in the default /usr/include location?
30035             for ac_header in cups/cups.h cups/ppd.h
30036 do :
30037   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
30038 ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
30039 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
30040   cat >>confdefs.h <<_ACEOF
30041 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
30042 _ACEOF
30043  CUPS_FOUND=yes
30044                               CUPS_CFLAGS=
30045                               DEFAULT_CUPS=yes
30046 fi
30047 
30048 done
30049 
30050         fi
30051         if test "x$CUPS_FOUND" = xno; then
30052             # Getting nervous now? Lets poke around for standard Solaris third-party
30053             # package installation locations.
30054             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
30055 $as_echo_n "checking for cups headers... " >&6; }
30056             if test -s /opt/sfw/cups/include/cups/cups.h; then
30057                # An SFW package seems to be installed!
30058                CUPS_FOUND=yes
30059                CUPS_CFLAGS="-I/opt/sfw/cups/include"
30060             elif test -s /opt/csw/include/cups/cups.h; then
30061                # A CSW package seems to be installed!
30062                CUPS_FOUND=yes
30063                CUPS_CFLAGS="-I/opt/csw/include"
30064             fi
30065             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
30066 $as_echo "$CUPS_FOUND" >&6; }
30067         fi
30068         if test "x$CUPS_FOUND" = xno; then
30069 
30070     # Print a helpful message on how to acquire the necessary build dependency.
30071     # cups is the help tag: freetyp2, cups, pulse, alsa etc
30072     MISSING_DEPENDENCY=cups
30073     PKGHANDLER_COMMAND=
30074 
30075     case $PKGHANDLER in
30076         apt-get)
30077                 apt_help     $MISSING_DEPENDENCY ;;
30078     yum)
30079                 yum_help     $MISSING_DEPENDENCY ;;
30080         port)
30081                 port_help    $MISSING_DEPENDENCY ;;
30082         pkgutil)
30083                 pkgutil_help $MISSING_DEPENDENCY ;;
30084         pkgadd)
30085                 pkgadd_help  $MISSING_DEPENDENCY ;;
30086     * )
30087       break ;;
30088     esac
30089 
30090     if test "x$PKGHANDLER_COMMAND" != x; then
30091         HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30092     fi
30093 
30094             as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
30095         fi
30096 fi
30097 
30098 
30099 
30100 
30101 
30102 
30103 ###############################################################################
30104 #
30105 # The ubiquitous freetype2 library is used to render fonts.
30106 #
30107 
30108 # Check whether --with-freetype was given.
30109 if test "${with_freetype+set}" = set; then :
30110   withval=$with_freetype;
30111 fi
30112 
30113 
30114 # If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
30115 USING_SYSTEM_FT_LIB=false
30116 
30117 if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
30118         if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
30119                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
30120 $as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
30121         fi
30122         FREETYPE2_CFLAGS=
30123         FREETYPE2_LIBS=
30124         FREETYPE2_LIB_PATH=
30125 else
30126         FREETYPE2_FOUND=no
30127 
30128         if test "x$with_freetype" != x; then
30129 
30130   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30131 
30132   # Input might be given as Windows format, start by converting to
30133   # unix format.
30134   path="$with_freetype"
30135   new_path=`$CYGPATH -u "$path"`
30136 
30137   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30138   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30139   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30140   # "foo.exe" is OK but "foo" is an error.
30141   #
30142   # This test is therefore slightly more accurate than "test -f" to check for file precense.
30143   # It is also a way to make sure we got the proper file name for the real test later on.
30144   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30145   if test "x$test_shortpath" = x; then
30146     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
30147 $as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
30148     as_fn_error $? "Cannot locate the the path of with_freetype" "$LINENO" 5
30149   fi
30150 
30151   # Call helper function which possibly converts this using DOS-style short mode.
30152   # If so, the updated path is stored in $new_path.
30153 
30154   input_path="$new_path"
30155   # Check if we need to convert this using DOS-style short mode. If the path
30156   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30157   # take no chances and rewrite it.
30158   # Note: m4 eats our [], so we need to use [ and ] instead.
30159   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30160   if test "x$has_forbidden_chars" != x; then
30161     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30162     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30163     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30164     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30165       # Going to short mode and back again did indeed matter. Since short mode is
30166       # case insensitive, let's make it lowercase to improve readability.
30167       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30168       # Now convert it back to Unix-stile (cygpath)
30169       input_path=`$CYGPATH -u "$shortmode_path"`
30170       new_path="$input_path"
30171     fi
30172   fi
30173 
30174   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30175   if test "x$test_cygdrive_prefix" = x; then
30176     # As a simple fix, exclude /usr/bin since it's not a real path.
30177     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30178       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30179       # a path prefixed by /cygdrive for fixpath to work.
30180       new_path="$CYGWIN_ROOT_PATH$input_path"
30181     fi
30182   fi
30183 
30184 
30185   if test "x$path" != "x$new_path"; then
30186     with_freetype="$new_path"
30187     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
30188 $as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
30189   fi
30190 
30191   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30192 
30193   path="$with_freetype"
30194   has_colon=`$ECHO $path | $GREP ^.:`
30195   new_path="$path"
30196   if test "x$has_colon" = x; then
30197     # Not in mixed or Windows style, start by that.
30198     new_path=`cmd //c echo $path`
30199   fi
30200 
30201 
30202   input_path="$new_path"
30203   # Check if we need to convert this using DOS-style short mode. If the path
30204   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30205   # take no chances and rewrite it.
30206   # Note: m4 eats our [], so we need to use [ and ] instead.
30207   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30208   if test "x$has_forbidden_chars" != x; then
30209     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30210     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30211   fi
30212 
30213 
30214   windows_path="$new_path"
30215   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30216     unix_path=`$CYGPATH -u "$windows_path"`
30217     new_path="$unix_path"
30218   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30219     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30220     new_path="$unix_path"
30221   fi
30222 
30223   if test "x$path" != "x$new_path"; then
30224     with_freetype="$new_path"
30225     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
30226 $as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
30227   fi
30228 
30229   # Save the first 10 bytes of this path to the storage, so fixpath can work.
30230   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30231 
30232   else
30233     # We're on a posix platform. Hooray! :)
30234     path="$with_freetype"
30235 
30236     if test ! -f "$path" && test ! -d "$path"; then
30237       as_fn_error $? "The path of with_freetype, which resolves as \"$path\", is not found." "$LINENO" 5
30238     fi
30239 
30240     has_space=`$ECHO "$path" | $GREP " "`
30241     if test "x$has_space" != x; then
30242       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
30243 $as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
30244       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30245     fi
30246   fi
30247 
30248             FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
30249             FREETYPE2_LIB_PATH="$with_freetype/lib"
30250             if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then
30251                 FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype"
30252                 FREETYPE2_LIB_PATH="$with_freetype/lib/amd64"
30253             fi
30254             if test "x$OPENJDK_TARGET_OS" = xwindows; then
30255                 FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
30256             fi
30257             FREETYPE2_CFLAGS="-I$with_freetype/include"
30258             if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
30259                 FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
30260             fi
30261             FREETYPE2_FOUND=yes
30262             if test "x$FREETYPE2_FOUND" = xyes; then
30263                 # Verify that the directories exist
30264                 if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
30265                    as_fn_error $? "Could not find the expected directories $with_freetype/lib and $with_freetype/include" "$LINENO" 5
30266                 fi
30267                 # List the contents of the lib.
30268                 FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
30269                 if test "x$FREETYPELIB" = x; then
30270                    as_fn_error $? "Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" "$LINENO" 5
30271                 fi
30272                 # Check one h-file
30273                 if ! test -s "$with_freetype/include/ft2build.h"; then
30274                    as_fn_error $? "Could not find $with_freetype/include/ft2build.h" "$LINENO" 5
30275                 fi
30276             fi
30277         fi
30278         if test "x$FREETYPE2_FOUND" = xno; then
30279 
30280 
30281     if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
30282         # Source the builddeps file again, to make sure it uses the latest variables!
30283         . $builddepsfile
30284         # Look for a target and build machine specific resource!
30285         eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
30286         if test "x$resource" = x; then
30287             # Ok, lets instead look for a target specific resource
30288             eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
30289         fi
30290         if test "x$resource" = x; then
30291             # Ok, lets instead look for a build specific resource
30292             eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
30293         fi
30294         if test "x$resource" = x; then
30295             # Ok, lets instead look for a generic resource
30296             # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
30297             resource=${builddep_freetype2}
30298         fi
30299         if test "x$resource" != x; then
30300             { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
30301 $as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
30302             # If the resource in the builddeps.conf file is an existing directory,
30303             # for example /java/linux/cups
30304             if test -d ${resource}; then
30305                depdir=${resource}
30306             else
30307 
30308 # freetype2 is for example mymodule
30309 # $resource is for example libs/general/libmymod_1_2_3.zip
30310 # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
30311 # $with_builddeps_dir is for example /localhome/builddeps
30312 # depdir is the name of the variable into which we store the depdir, eg MYMOD
30313 # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
30314 # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
30315     filename=`basename $resource`
30316     filebase=`echo $filename | sed 's/\.[^\.]*$//'`
30317     filebase=${filename%%.*}
30318     extension=${filename#*.}
30319     installdir=$with_builddeps_dir/$filebase
30320     if test ! -f $installdir/$filename.unpacked; then
30321         { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
30322 $as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
30323         if test ! -d $installdir; then
30324             mkdir -p $installdir
30325         fi
30326         if test ! -d $installdir; then
30327             as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
30328         fi
30329         tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
30330         touch $tmpfile
30331         if test ! -f $tmpfile; then
30332             as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
30333         fi
30334 
30335     # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
30336     # $tmpfile is the local file name for the downloaded file.
30337     VALID_TOOL=no
30338     if test "x$BDEPS_FTP" = xwget; then
30339        VALID_TOOL=yes
30340        wget -O $tmpfile $with_builddeps_server/$resource
30341     fi
30342     if test "x$BDEPS_FTP" = xlftp; then
30343        VALID_TOOL=yes
30344        lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
30345     fi
30346     if test "x$BDEPS_FTP" = xftp; then
30347         VALID_TOOL=yes
30348         FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
30349         FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
30350         FTPUSERPWD=${FTPSERVER%%@*}
30351         if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
30352             FTPUSER=${userpwd%%:*}
30353             FTPPWD=${userpwd#*@}
30354             FTPSERVER=${FTPSERVER#*@}
30355         else
30356             FTPUSER=ftp
30357             FTPPWD=ftp
30358         fi
30359         # the "pass" command does not work on some
30360         # ftp clients (read ftp.exe) but if it works,
30361         # passive mode is better!
30362         (\
30363             echo "user $FTPUSER $FTPPWD"        ;\
30364             echo "pass"                         ;\
30365             echo "bin"                          ;\
30366             echo "get $FTPPATH $tmpfile"              ;\
30367         ) | ftp -in $FTPSERVER
30368     fi
30369     if test "x$VALID_TOOL" != xyes; then
30370        as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
30371     fi
30372 
30373         mv $tmpfile $installdir/$filename
30374         if test ! -s $installdir/$filename; then
30375             as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
30376         fi
30377         case "$extension" in
30378             zip)  echo "Unzipping $installdir/$filename..."
30379                (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
30380             ;;
30381             tar.gz) echo "Untaring $installdir/$filename..."
30382                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30383             ;;
30384             tgz) echo "Untaring $installdir/$filename..."
30385                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30386             ;;
30387             *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
30388             ;;
30389         esac
30390     fi
30391     if test -f $installdir/$filename.unpacked; then
30392         depdir=$installdir
30393     fi
30394 
30395             fi
30396             # Source the builddeps file again, because in the previous command, the depdir
30397             # was updated to point at the current build dependency install directory.
30398             . $builddepsfile
30399             # Now extract variables from the builddeps.conf files.
30400             theroot=${builddep_freetype2_ROOT}
30401             thecflags=${builddep_freetype2_CFLAGS}
30402             thelibs=${builddep_freetype2_LIBS}
30403             if test "x$depdir" = x; then
30404                 as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
30405             fi
30406             FREETYPE2=$depdir
30407             if test "x$theroot" != x; then
30408                FREETYPE2="$theroot"
30409             fi
30410             if test "x$thecflags" != x; then
30411                FREETYPE2_CFLAGS="$thecflags"
30412             fi
30413             if test "x$thelibs" != x; then
30414                FREETYPE2_LIBS="$thelibs"
30415             fi
30416             FREETYPE2_FOUND=yes
30417             else FREETYPE2_FOUND=no
30418 
30419         fi
30420         else FREETYPE2_FOUND=no
30421 
30422     fi
30423 
30424             USING_SYSTEM_FT_LIB=true
30425         fi
30426         if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then
30427             FREETYPELOCATION="$PROGRAMFILES/GnuWin32"
30428 
30429   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30430 
30431   # Input might be given as Windows format, start by converting to
30432   # unix format.
30433   path="$FREETYPELOCATION"
30434   new_path=`$CYGPATH -u "$path"`
30435 
30436   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30437   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30438   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30439   # "foo.exe" is OK but "foo" is an error.
30440   #
30441   # This test is therefore slightly more accurate than "test -f" to check for file precense.
30442   # It is also a way to make sure we got the proper file name for the real test later on.
30443   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30444   if test "x$test_shortpath" = x; then
30445     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
30446 $as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
30447     as_fn_error $? "Cannot locate the the path of FREETYPELOCATION" "$LINENO" 5
30448   fi
30449 
30450   # Call helper function which possibly converts this using DOS-style short mode.
30451   # If so, the updated path is stored in $new_path.
30452 
30453   input_path="$new_path"
30454   # Check if we need to convert this using DOS-style short mode. If the path
30455   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30456   # take no chances and rewrite it.
30457   # Note: m4 eats our [], so we need to use [ and ] instead.
30458   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30459   if test "x$has_forbidden_chars" != x; then
30460     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30461     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30462     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30463     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30464       # Going to short mode and back again did indeed matter. Since short mode is
30465       # case insensitive, let's make it lowercase to improve readability.
30466       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30467       # Now convert it back to Unix-stile (cygpath)
30468       input_path=`$CYGPATH -u "$shortmode_path"`
30469       new_path="$input_path"
30470     fi
30471   fi
30472 
30473   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30474   if test "x$test_cygdrive_prefix" = x; then
30475     # As a simple fix, exclude /usr/bin since it's not a real path.
30476     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30477       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30478       # a path prefixed by /cygdrive for fixpath to work.
30479       new_path="$CYGWIN_ROOT_PATH$input_path"
30480     fi
30481   fi
30482 
30483 
30484   if test "x$path" != "x$new_path"; then
30485     FREETYPELOCATION="$new_path"
30486     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
30487 $as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
30488   fi
30489 
30490   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30491 
30492   path="$FREETYPELOCATION"
30493   has_colon=`$ECHO $path | $GREP ^.:`
30494   new_path="$path"
30495   if test "x$has_colon" = x; then
30496     # Not in mixed or Windows style, start by that.
30497     new_path=`cmd //c echo $path`
30498   fi
30499 
30500 
30501   input_path="$new_path"
30502   # Check if we need to convert this using DOS-style short mode. If the path
30503   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30504   # take no chances and rewrite it.
30505   # Note: m4 eats our [], so we need to use [ and ] instead.
30506   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30507   if test "x$has_forbidden_chars" != x; then
30508     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30509     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30510   fi
30511 
30512 
30513   windows_path="$new_path"
30514   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30515     unix_path=`$CYGPATH -u "$windows_path"`
30516     new_path="$unix_path"
30517   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30518     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30519     new_path="$unix_path"
30520   fi
30521 
30522   if test "x$path" != "x$new_path"; then
30523     FREETYPELOCATION="$new_path"
30524     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
30525 $as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
30526   fi
30527 
30528   # Save the first 10 bytes of this path to the storage, so fixpath can work.
30529   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30530 
30531   else
30532     # We're on a posix platform. Hooray! :)
30533     path="$FREETYPELOCATION"
30534 
30535     if test ! -f "$path" && test ! -d "$path"; then
30536       as_fn_error $? "The path of FREETYPELOCATION, which resolves as \"$path\", is not found." "$LINENO" 5
30537     fi
30538 
30539     has_space=`$ECHO "$path" | $GREP " "`
30540     if test "x$has_space" != x; then
30541       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
30542 $as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
30543       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30544     fi
30545   fi
30546 
30547             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard windows locations" >&5
30548 $as_echo_n "checking for freetype in some standard windows locations... " >&6; }
30549             if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then
30550                 FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include"
30551                 FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib"
30552                 FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib"
30553                 if ! test -s "$FREETYPE2_LIBS"; then
30554                    as_fn_error $? "Could not find $FREETYPE2_LIBS" "$LINENO" 5
30555                 fi
30556                 if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then
30557                    as_fn_error $? "Could not find $FREETYPE2_LIB_PATH/freetype.dll" "$LINENO" 5
30558                 fi
30559                 USING_SYSTEM_FT_LIB=true
30560                 FREETYPE2_FOUND=yes
30561             fi
30562             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
30563 $as_echo "$FREETYPE2_FOUND" >&6; }
30564         fi
30565         if test "x$FREETYPE2_FOUND" = xno; then
30566 
30567 pkg_failed=no
30568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE2" >&5
30569 $as_echo_n "checking for FREETYPE2... " >&6; }
30570 
30571 if test -n "$FREETYPE2_CFLAGS"; then
30572     pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS"
30573  elif test -n "$PKG_CONFIG"; then
30574     if test -n "$PKG_CONFIG" && \
30575     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
30576   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
30577   ac_status=$?
30578   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30579   test $ac_status = 0; }; then
30580   pkg_cv_FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
30581 else
30582   pkg_failed=yes
30583 fi
30584  else
30585     pkg_failed=untried
30586 fi
30587 if test -n "$FREETYPE2_LIBS"; then
30588     pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS"
30589  elif test -n "$PKG_CONFIG"; then
30590     if test -n "$PKG_CONFIG" && \
30591     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
30592   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
30593   ac_status=$?
30594   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30595   test $ac_status = 0; }; then
30596   pkg_cv_FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
30597 else
30598   pkg_failed=yes
30599 fi
30600  else
30601     pkg_failed=untried
30602 fi
30603 
30604 
30605 
30606 if test $pkg_failed = yes; then
30607 
30608 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
30609         _pkg_short_errors_supported=yes
30610 else
30611         _pkg_short_errors_supported=no
30612 fi
30613         if test $_pkg_short_errors_supported = yes; then
30614                 FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
30615         else
30616                 FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
30617         fi
30618         # Put the nasty error message in config.log where it belongs
30619         echo "$FREETYPE2_PKG_ERRORS" >&5
30620 
30621         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30622 $as_echo "no" >&6; }
30623                 FREETYPE2_FOUND=no
30624 elif test $pkg_failed = untried; then
30625         FREETYPE2_FOUND=no
30626 else
30627         FREETYPE2_CFLAGS=$pkg_cv_FREETYPE2_CFLAGS
30628         FREETYPE2_LIBS=$pkg_cv_FREETYPE2_LIBS
30629         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30630 $as_echo "yes" >&6; }
30631         FREETYPE2_FOUND=yes
30632 fi
30633             # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
30634             FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'`
30635             USING_SYSTEM_FT_LIB=true
30636             # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
30637             if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
30638               FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'`
30639             fi
30640         fi
30641         if test "x$FREETYPE2_FOUND" = xno; then
30642             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard locations" >&5
30643 $as_echo_n "checking for freetype in some standard locations... " >&6; }
30644 
30645             if test -s /usr/X11/include/ft2build.h && test -d /usr/X11/include/freetype2/freetype; then
30646                 DEFAULT_FREETYPE_CFLAGS="-I/usr/X11/include/freetype2 -I/usr/X11/include"
30647                 DEFAULT_FREETYPE_LIBS="-L/usr/X11/lib -lfreetype"
30648             fi
30649             if test -s /usr/include/ft2build.h && test -d /usr/include/freetype2/freetype; then
30650                 DEFAULT_FREETYPE_CFLAGS="-I/usr/include/freetype2"
30651                 DEFAULT_FREETYPE_LIBS="-lfreetype"
30652             fi
30653 
30654             PREV_CXXCFLAGS="$CXXFLAGS"
30655             PREV_LDFLAGS="$LDFLAGS"
30656             CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
30657             LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
30658             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30659 /* end confdefs.h.  */
30660 #include<ft2build.h>
30661                             #include FT_FREETYPE_H
30662                            int main() { return 0; }
30663 
30664 _ACEOF
30665 if ac_fn_cxx_try_link "$LINENO"; then :
30666 
30667                               # Yes, the default cflags and libs did the trick.
30668                               FREETYPE2_FOUND=yes
30669                               FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
30670                               FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
30671 
30672 else
30673 
30674                               FREETYPE2_FOUND=no
30675 
30676 fi
30677 rm -f core conftest.err conftest.$ac_objext \
30678     conftest$ac_exeext conftest.$ac_ext
30679             CXXCFLAGS="$PREV_CXXFLAGS"
30680             LDFLAGS="$PREV_LDFLAGS"
30681             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
30682 $as_echo "$FREETYPE2_FOUND" >&6; }
30683             USING_SYSTEM_FT_LIB=true
30684         fi
30685         if test "x$FREETYPE2_FOUND" = xno; then
30686 
30687     # Print a helpful message on how to acquire the necessary build dependency.
30688     # freetype2 is the help tag: freetyp2, cups, pulse, alsa etc
30689     MISSING_DEPENDENCY=freetype2
30690     PKGHANDLER_COMMAND=
30691 
30692     case $PKGHANDLER in
30693         apt-get)
30694                 apt_help     $MISSING_DEPENDENCY ;;
30695     yum)
30696                 yum_help     $MISSING_DEPENDENCY ;;
30697         port)
30698                 port_help    $MISSING_DEPENDENCY ;;
30699         pkgutil)
30700                 pkgutil_help $MISSING_DEPENDENCY ;;
30701         pkgadd)
30702                 pkgadd_help  $MISSING_DEPENDENCY ;;
30703     * )
30704       break ;;
30705     esac
30706 
30707     if test "x$PKGHANDLER_COMMAND" != x; then
30708         HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30709     fi
30710 
30711                 as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
30712         fi
30713 
30714         if test "x$OPENJDK_TARGET_OS" != xwindows; then
30715             # AC_CHECK_LIB does not support use of cl.exe
30716             PREV_LDFLAGS="$LDFLAGS"
30717             LDFLAGS="$FREETYPE2_LIBS"
30718             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_Init_FreeType in -lfreetype" >&5
30719 $as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; }
30720 if ${ac_cv_lib_freetype_FT_Init_FreeType+:} false; then :
30721   $as_echo_n "(cached) " >&6
30722 else
30723   ac_check_lib_save_LIBS=$LIBS
30724 LIBS="-lfreetype  $LIBS"
30725 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30726 /* end confdefs.h.  */
30727 
30728 /* Override any GCC internal prototype to avoid an error.
30729    Use char because int might match the return type of a GCC
30730    builtin and then its argument prototype would still apply.  */
30731 #ifdef __cplusplus
30732 extern "C"
30733 #endif
30734 char FT_Init_FreeType ();
30735 int
30736 main ()
30737 {
30738 return FT_Init_FreeType ();
30739   ;
30740   return 0;
30741 }
30742 _ACEOF
30743 if ac_fn_cxx_try_link "$LINENO"; then :
30744   ac_cv_lib_freetype_FT_Init_FreeType=yes
30745 else
30746   ac_cv_lib_freetype_FT_Init_FreeType=no
30747 fi
30748 rm -f core conftest.err conftest.$ac_objext \
30749     conftest$ac_exeext conftest.$ac_ext
30750 LIBS=$ac_check_lib_save_LIBS
30751 fi
30752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5
30753 $as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; }
30754 if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = xyes; then :
30755   FREETYPE2_FOUND=true
30756 else
30757   as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
30758 fi
30759 
30760             LDFLAGS="$PREV_LDFLAGS"
30761         fi
30762 fi
30763 
30764 
30765 
30766 
30767 
30768 
30769 
30770 
30771 
30772 ###############################################################################
30773 #
30774 # Check for alsa headers and libraries. Used on Linux/GNU systems.
30775 #
30776 
30777 # Check whether --with-alsa was given.
30778 if test "${with_alsa+set}" = set; then :
30779   withval=$with_alsa;
30780 fi
30781 
30782 
30783 # Check whether --with-alsa-include was given.
30784 if test "${with_alsa_include+set}" = set; then :
30785   withval=$with_alsa_include;
30786 fi
30787 
30788 
30789 # Check whether --with-alsa-lib was given.
30790 if test "${with_alsa_lib+set}" = set; then :
30791   withval=$with_alsa_lib;
30792 fi
30793 
30794 
30795 if test "x$ALSA_NOT_NEEDED" = xyes; then
30796         if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
30797                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
30798 $as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
30799         fi
30800         ALSA_CFLAGS=
30801         ALSA_LIBS=
30802 else
30803         ALSA_FOUND=no
30804 
30805         if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
30806             as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
30807         fi
30808 
30809         if test "x${with_alsa}" != x; then
30810             ALSA_LIBS="-L${with_alsa}/lib -lalsa"
30811             ALSA_CFLAGS="-I${with_alsa}/include"
30812             ALSA_FOUND=yes
30813         fi
30814         if test "x${with_alsa_include}" != x; then
30815             ALSA_CFLAGS="-I${with_alsa_include}"
30816             ALSA_FOUND=yes
30817         fi
30818         if test "x${with_alsa_lib}" != x; then
30819             ALSA_LIBS="-L${with_alsa_lib} -lalsa"
30820             ALSA_FOUND=yes
30821         fi
30822         if test "x$ALSA_FOUND" = xno; then
30823 
30824 
30825     if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
30826         # Source the builddeps file again, to make sure it uses the latest variables!
30827         . $builddepsfile
30828         # Look for a target and build machine specific resource!
30829         eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
30830         if test "x$resource" = x; then
30831             # Ok, lets instead look for a target specific resource
30832             eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
30833         fi
30834         if test "x$resource" = x; then
30835             # Ok, lets instead look for a build specific resource
30836             eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
30837         fi
30838         if test "x$resource" = x; then
30839             # Ok, lets instead look for a generic resource
30840             # (The alsa comes from M4 and not the shell, thus no need for eval here.)
30841             resource=${builddep_alsa}
30842         fi
30843         if test "x$resource" != x; then
30844             { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
30845 $as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
30846             # If the resource in the builddeps.conf file is an existing directory,
30847             # for example /java/linux/cups
30848             if test -d ${resource}; then
30849                depdir=${resource}
30850             else
30851 
30852 # alsa is for example mymodule
30853 # $resource is for example libs/general/libmymod_1_2_3.zip
30854 # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
30855 # $with_builddeps_dir is for example /localhome/builddeps
30856 # depdir is the name of the variable into which we store the depdir, eg MYMOD
30857 # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
30858 # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
30859     filename=`basename $resource`
30860     filebase=`echo $filename | sed 's/\.[^\.]*$//'`
30861     filebase=${filename%%.*}
30862     extension=${filename#*.}
30863     installdir=$with_builddeps_dir/$filebase
30864     if test ! -f $installdir/$filename.unpacked; then
30865         { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
30866 $as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
30867         if test ! -d $installdir; then
30868             mkdir -p $installdir
30869         fi
30870         if test ! -d $installdir; then
30871             as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
30872         fi
30873         tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
30874         touch $tmpfile
30875         if test ! -f $tmpfile; then
30876             as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
30877         fi
30878 
30879     # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
30880     # $tmpfile is the local file name for the downloaded file.
30881     VALID_TOOL=no
30882     if test "x$BDEPS_FTP" = xwget; then
30883        VALID_TOOL=yes
30884        wget -O $tmpfile $with_builddeps_server/$resource
30885     fi
30886     if test "x$BDEPS_FTP" = xlftp; then
30887        VALID_TOOL=yes
30888        lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
30889     fi
30890     if test "x$BDEPS_FTP" = xftp; then
30891         VALID_TOOL=yes
30892         FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
30893         FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
30894         FTPUSERPWD=${FTPSERVER%%@*}
30895         if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
30896             FTPUSER=${userpwd%%:*}
30897             FTPPWD=${userpwd#*@}
30898             FTPSERVER=${FTPSERVER#*@}
30899         else
30900             FTPUSER=ftp
30901             FTPPWD=ftp
30902         fi
30903         # the "pass" command does not work on some
30904         # ftp clients (read ftp.exe) but if it works,
30905         # passive mode is better!
30906         (\
30907             echo "user $FTPUSER $FTPPWD"        ;\
30908             echo "pass"                         ;\
30909             echo "bin"                          ;\
30910             echo "get $FTPPATH $tmpfile"              ;\
30911         ) | ftp -in $FTPSERVER
30912     fi
30913     if test "x$VALID_TOOL" != xyes; then
30914        as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
30915     fi
30916 
30917         mv $tmpfile $installdir/$filename
30918         if test ! -s $installdir/$filename; then
30919             as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
30920         fi
30921         case "$extension" in
30922             zip)  echo "Unzipping $installdir/$filename..."
30923                (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
30924             ;;
30925             tar.gz) echo "Untaring $installdir/$filename..."
30926                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30927             ;;
30928             tgz) echo "Untaring $installdir/$filename..."
30929                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30930             ;;
30931             *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
30932             ;;
30933         esac
30934     fi
30935     if test -f $installdir/$filename.unpacked; then
30936         depdir=$installdir
30937     fi
30938 
30939             fi
30940             # Source the builddeps file again, because in the previous command, the depdir
30941             # was updated to point at the current build dependency install directory.
30942             . $builddepsfile
30943             # Now extract variables from the builddeps.conf files.
30944             theroot=${builddep_alsa_ROOT}
30945             thecflags=${builddep_alsa_CFLAGS}
30946             thelibs=${builddep_alsa_LIBS}
30947             if test "x$depdir" = x; then
30948                 as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
30949             fi
30950             ALSA=$depdir
30951             if test "x$theroot" != x; then
30952                ALSA="$theroot"
30953             fi
30954             if test "x$thecflags" != x; then
30955                ALSA_CFLAGS="$thecflags"
30956             fi
30957             if test "x$thelibs" != x; then
30958                ALSA_LIBS="$thelibs"
30959             fi
30960             ALSA_FOUND=yes
30961             else ALSA_FOUND=no
30962 
30963         fi
30964         else ALSA_FOUND=no
30965 
30966     fi
30967 
30968         fi
30969         if test "x$ALSA_FOUND" = xno; then
30970 
30971 pkg_failed=no
30972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
30973 $as_echo_n "checking for ALSA... " >&6; }
30974 
30975 if test -n "$ALSA_CFLAGS"; then
30976     pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
30977  elif test -n "$PKG_CONFIG"; then
30978     if test -n "$PKG_CONFIG" && \
30979     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
30980   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
30981   ac_status=$?
30982   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30983   test $ac_status = 0; }; then
30984   pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
30985 else
30986   pkg_failed=yes
30987 fi
30988  else
30989     pkg_failed=untried
30990 fi
30991 if test -n "$ALSA_LIBS"; then
30992     pkg_cv_ALSA_LIBS="$ALSA_LIBS"
30993  elif test -n "$PKG_CONFIG"; then
30994     if test -n "$PKG_CONFIG" && \
30995     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
30996   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
30997   ac_status=$?
30998   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30999   test $ac_status = 0; }; then
31000   pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
31001 else
31002   pkg_failed=yes
31003 fi
31004  else
31005     pkg_failed=untried
31006 fi
31007 
31008 
31009 
31010 if test $pkg_failed = yes; then
31011 
31012 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
31013         _pkg_short_errors_supported=yes
31014 else
31015         _pkg_short_errors_supported=no
31016 fi
31017         if test $_pkg_short_errors_supported = yes; then
31018                 ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
31019         else
31020                 ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
31021         fi
31022         # Put the nasty error message in config.log where it belongs
31023         echo "$ALSA_PKG_ERRORS" >&5
31024 
31025         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31026 $as_echo "no" >&6; }
31027                 ALSA_FOUND=no
31028 elif test $pkg_failed = untried; then
31029         ALSA_FOUND=no
31030 else
31031         ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
31032         ALSA_LIBS=$pkg_cv_ALSA_LIBS
31033         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31034 $as_echo "yes" >&6; }
31035         ALSA_FOUND=yes
31036 fi
31037         fi
31038         if test "x$ALSA_FOUND" = xno; then
31039             for ac_header in alsa/asoundlib.h
31040 do :
31041   ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
31042 if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
31043   cat >>confdefs.h <<_ACEOF
31044 #define HAVE_ALSA_ASOUNDLIB_H 1
31045 _ACEOF
31046  ALSA_FOUND=yes
31047                               ALSA_CFLAGS=-Iignoreme
31048                               ALSA_LIBS=-lasound
31049                               DEFAULT_ALSA=yes
31050 else
31051   ALSA_FOUND=no
31052 fi
31053 
31054 done
31055 
31056         fi
31057         if test "x$ALSA_FOUND" = xno; then
31058 
31059     # Print a helpful message on how to acquire the necessary build dependency.
31060     # alsa is the help tag: freetyp2, cups, pulse, alsa etc
31061     MISSING_DEPENDENCY=alsa
31062     PKGHANDLER_COMMAND=
31063 
31064     case $PKGHANDLER in
31065         apt-get)
31066                 apt_help     $MISSING_DEPENDENCY ;;
31067     yum)
31068                 yum_help     $MISSING_DEPENDENCY ;;
31069         port)
31070                 port_help    $MISSING_DEPENDENCY ;;
31071         pkgutil)
31072                 pkgutil_help $MISSING_DEPENDENCY ;;
31073         pkgadd)
31074                 pkgadd_help  $MISSING_DEPENDENCY ;;
31075     * )
31076       break ;;
31077     esac
31078 
31079     if test "x$PKGHANDLER_COMMAND" != x; then
31080         HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31081     fi
31082 
31083             as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
31084         fi
31085 fi
31086 
31087 
31088 
31089 
31090 
31091 
31092 
31093 ###############################################################################
31094 #
31095 # Check for the jpeg library
31096 #
31097 
31098 USE_EXTERNAL_LIBJPEG=true
31099 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
31100 $as_echo_n "checking for main in -ljpeg... " >&6; }
31101 if ${ac_cv_lib_jpeg_main+:} false; then :
31102   $as_echo_n "(cached) " >&6
31103 else
31104   ac_check_lib_save_LIBS=$LIBS
31105 LIBS="-ljpeg  $LIBS"
31106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31107 /* end confdefs.h.  */
31108 
31109 
31110 int
31111 main ()
31112 {
31113 return main ();
31114   ;
31115   return 0;
31116 }
31117 _ACEOF
31118 if ac_fn_cxx_try_link "$LINENO"; then :
31119   ac_cv_lib_jpeg_main=yes
31120 else
31121   ac_cv_lib_jpeg_main=no
31122 fi
31123 rm -f core conftest.err conftest.$ac_objext \
31124     conftest$ac_exeext conftest.$ac_ext
31125 LIBS=$ac_check_lib_save_LIBS
31126 fi
31127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
31128 $as_echo "$ac_cv_lib_jpeg_main" >&6; }
31129 if test "x$ac_cv_lib_jpeg_main" = xyes; then :
31130   cat >>confdefs.h <<_ACEOF
31131 #define HAVE_LIBJPEG 1
31132 _ACEOF
31133 
31134   LIBS="-ljpeg $LIBS"
31135 
31136 else
31137    USE_EXTERNAL_LIBJPEG=false
31138                { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
31139 $as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
31140 
31141 fi
31142 
31143 
31144 
31145 ###############################################################################
31146 #
31147 # Check for the gif library
31148 #
31149 
31150 USE_EXTERNAL_LIBJPEG=true
31151 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lgif" >&5
31152 $as_echo_n "checking for main in -lgif... " >&6; }
31153 if ${ac_cv_lib_gif_main+:} false; then :
31154   $as_echo_n "(cached) " >&6
31155 else
31156   ac_check_lib_save_LIBS=$LIBS
31157 LIBS="-lgif  $LIBS"
31158 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31159 /* end confdefs.h.  */
31160 
31161 
31162 int
31163 main ()
31164 {
31165 return main ();
31166   ;
31167   return 0;
31168 }
31169 _ACEOF
31170 if ac_fn_cxx_try_link "$LINENO"; then :
31171   ac_cv_lib_gif_main=yes
31172 else
31173   ac_cv_lib_gif_main=no
31174 fi
31175 rm -f core conftest.err conftest.$ac_objext \
31176     conftest$ac_exeext conftest.$ac_ext
31177 LIBS=$ac_check_lib_save_LIBS
31178 fi
31179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_main" >&5
31180 $as_echo "$ac_cv_lib_gif_main" >&6; }
31181 if test "x$ac_cv_lib_gif_main" = xyes; then :
31182   cat >>confdefs.h <<_ACEOF
31183 #define HAVE_LIBGIF 1
31184 _ACEOF
31185 
31186   LIBS="-lgif $LIBS"
31187 
31188 else
31189    USE_EXTERNAL_LIBGIF=false
31190                { $as_echo "$as_me:${as_lineno-$LINENO}: Will use gif decoder bundled with the OpenJDK source" >&5
31191 $as_echo "$as_me: Will use gif decoder bundled with the OpenJDK source" >&6;}
31192 
31193 fi
31194 
31195 
31196 
31197 ###############################################################################
31198 #
31199 # Check for the zlib library
31200 #
31201 
31202 
31203 # Check whether --with-zlib was given.
31204 if test "${with_zlib+set}" = set; then :
31205   withval=$with_zlib;
31206 fi
31207 
31208 
31209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
31210 $as_echo_n "checking for compress in -lz... " >&6; }
31211 if ${ac_cv_lib_z_compress+:} false; then :
31212   $as_echo_n "(cached) " >&6
31213 else
31214   ac_check_lib_save_LIBS=$LIBS
31215 LIBS="-lz  $LIBS"
31216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31217 /* end confdefs.h.  */
31218 
31219 /* Override any GCC internal prototype to avoid an error.
31220    Use char because int might match the return type of a GCC
31221    builtin and then its argument prototype would still apply.  */
31222 #ifdef __cplusplus
31223 extern "C"
31224 #endif
31225 char compress ();
31226 int
31227 main ()
31228 {
31229 return compress ();
31230   ;
31231   return 0;
31232 }
31233 _ACEOF
31234 if ac_fn_cxx_try_link "$LINENO"; then :
31235   ac_cv_lib_z_compress=yes
31236 else
31237   ac_cv_lib_z_compress=no
31238 fi
31239 rm -f core conftest.err conftest.$ac_objext \
31240     conftest$ac_exeext conftest.$ac_ext
31241 LIBS=$ac_check_lib_save_LIBS
31242 fi
31243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
31244 $as_echo "$ac_cv_lib_z_compress" >&6; }
31245 if test "x$ac_cv_lib_z_compress" = xyes; then :
31246    ZLIB_FOUND=yes
31247 else
31248    ZLIB_FOUND=no
31249 fi
31250 
31251 
31252 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
31253 $as_echo_n "checking for which zlib to use... " >&6; }
31254 
31255 DEFAULT_ZLIB=bundled
31256 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31257 #
31258 # On macosx default is system...on others default is
31259 #
31260     DEFAULT_ZLIB=system
31261 fi
31262 
31263 if test "x${ZLIB_FOUND}" != "xyes"; then
31264 #
31265 # If we don't find any system...set default to bundled
31266 #
31267     DEFAULT_ZLIB=bundled
31268 fi
31269 
31270 #
31271 # If user didn't specify, use DEFAULT_ZLIB
31272 #
31273 if test "x${with_zlib}" = "x"; then
31274     with_zlib=${DEFAULT_ZLIB}
31275 fi
31276 
31277 if test "x${with_zlib}" = "xbundled"; then
31278     USE_EXTERNAL_LIBZ=false
31279     { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
31280 $as_echo "bundled" >&6; }
31281 elif test "x${with_zlib}" = "xsystem"; then
31282     if test "x${ZLIB_FOUND}" = "xyes"; then
31283         USE_EXTERNAL_LIBZ=true
31284         { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
31285 $as_echo "system" >&6; }
31286     else
31287         { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
31288 $as_echo "system not found" >&6; }
31289         as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
31290     fi
31291 else
31292     as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
31293 fi
31294 
31295 
31296 
31297 ###############################################################################
31298 LIBZIP_CAN_USE_MMAP=true
31299 
31300 
31301 
31302 ###############################################################################
31303 #
31304 # Check if altzone exists in time.h
31305 #
31306 
31307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31308 /* end confdefs.h.  */
31309 #include <time.h>
31310 int
31311 main ()
31312 {
31313 return (int)altzone;
31314   ;
31315   return 0;
31316 }
31317 _ACEOF
31318 if ac_fn_cxx_try_link "$LINENO"; then :
31319   has_altzone=yes
31320 else
31321   has_altzone=no
31322 fi
31323 rm -f core conftest.err conftest.$ac_objext \
31324     conftest$ac_exeext conftest.$ac_ext
31325 if test "x$has_altzone" = xyes; then
31326 
31327 $as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
31328 
31329 fi
31330 
31331 ###############################################################################
31332 #
31333 # Check the maths library
31334 #
31335 
31336 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
31337 $as_echo_n "checking for cos in -lm... " >&6; }
31338 if ${ac_cv_lib_m_cos+:} false; then :
31339   $as_echo_n "(cached) " >&6
31340 else
31341   ac_check_lib_save_LIBS=$LIBS
31342 LIBS="-lm  $LIBS"
31343 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31344 /* end confdefs.h.  */
31345 
31346 /* Override any GCC internal prototype to avoid an error.
31347    Use char because int might match the return type of a GCC
31348    builtin and then its argument prototype would still apply.  */
31349 #ifdef __cplusplus
31350 extern "C"
31351 #endif
31352 char cos ();
31353 int
31354 main ()
31355 {
31356 return cos ();
31357   ;
31358   return 0;
31359 }
31360 _ACEOF
31361 if ac_fn_cxx_try_link "$LINENO"; then :
31362   ac_cv_lib_m_cos=yes
31363 else
31364   ac_cv_lib_m_cos=no
31365 fi
31366 rm -f core conftest.err conftest.$ac_objext \
31367     conftest$ac_exeext conftest.$ac_ext
31368 LIBS=$ac_check_lib_save_LIBS
31369 fi
31370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
31371 $as_echo "$ac_cv_lib_m_cos" >&6; }
31372 if test "x$ac_cv_lib_m_cos" = xyes; then :
31373   cat >>confdefs.h <<_ACEOF
31374 #define HAVE_LIBM 1
31375 _ACEOF
31376 
31377   LIBS="-lm $LIBS"
31378 
31379 else
31380 
31381                   { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
31382 $as_echo "$as_me: Maths library was not found" >&6;}
31383 
31384 fi
31385 
31386 
31387 
31388 ###############################################################################
31389 #
31390 # Check for libdl.so
31391 
31392 save_LIBS="$LIBS"
31393 LIBS=""
31394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
31395 $as_echo_n "checking for dlopen in -ldl... " >&6; }
31396 if ${ac_cv_lib_dl_dlopen+:} false; then :
31397   $as_echo_n "(cached) " >&6
31398 else
31399   ac_check_lib_save_LIBS=$LIBS
31400 LIBS="-ldl  $LIBS"
31401 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31402 /* end confdefs.h.  */
31403 
31404 /* Override any GCC internal prototype to avoid an error.
31405    Use char because int might match the return type of a GCC
31406    builtin and then its argument prototype would still apply.  */
31407 #ifdef __cplusplus
31408 extern "C"
31409 #endif
31410 char dlopen ();
31411 int
31412 main ()
31413 {
31414 return dlopen ();
31415   ;
31416   return 0;
31417 }
31418 _ACEOF
31419 if ac_fn_cxx_try_link "$LINENO"; then :
31420   ac_cv_lib_dl_dlopen=yes
31421 else
31422   ac_cv_lib_dl_dlopen=no
31423 fi
31424 rm -f core conftest.err conftest.$ac_objext \
31425     conftest$ac_exeext conftest.$ac_ext
31426 LIBS=$ac_check_lib_save_LIBS
31427 fi
31428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
31429 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
31430 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
31431   cat >>confdefs.h <<_ACEOF
31432 #define HAVE_LIBDL 1
31433 _ACEOF
31434 
31435   LIBS="-ldl $LIBS"
31436 
31437 fi
31438 
31439 LIBDL="$LIBS"
31440 
31441 LIBS="$save_LIBS"
31442 
31443 
31444 
31445 ###############################################################################
31446 #
31447 # statically link libstdc++ before C++ ABI is stablized on Linux unless
31448 # dynamic build is configured on command line.
31449 #
31450 
31451 # Check whether --with-stdc++lib was given.
31452 if test "${with_stdc__lib+set}" = set; then :
31453   withval=$with_stdc__lib;
31454     if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
31455         && test "x$with_stdc__lib" != xdefault; then
31456       as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
31457     fi
31458 
31459 else
31460   with_stdc__lib=default
31461 
31462 fi
31463 
31464 
31465 if test "x$OPENJDK_TARGET_OS" = xlinux; then
31466     # Test if -lstdc++ works.
31467     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
31468 $as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
31469     ac_ext=cpp
31470 ac_cpp='$CXXCPP $CPPFLAGS'
31471 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31472 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31473 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31474 
31475     OLD_CXXFLAGS="$CXXFLAGS"
31476     CXXFLAGS="$CXXFLAGS -lstdc++"
31477     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31478 /* end confdefs.h.  */
31479 
31480 int
31481 main ()
31482 {
31483 return 0;
31484   ;
31485   return 0;
31486 }
31487 _ACEOF
31488 if ac_fn_cxx_try_link "$LINENO"; then :
31489   has_dynamic_libstdcxx=yes
31490 else
31491   has_dynamic_libstdcxx=no
31492 fi
31493 rm -f core conftest.err conftest.$ac_objext \
31494     conftest$ac_exeext conftest.$ac_ext
31495     CXXFLAGS="$OLD_CXXFLAGS"
31496     ac_ext=cpp
31497 ac_cpp='$CXXCPP $CPPFLAGS'
31498 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31499 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31500 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31501 
31502     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
31503 $as_echo "$has_dynamic_libstdcxx" >&6; }
31504 
31505     # Test if stdc++ can be linked statically.
31506     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
31507 $as_echo_n "checking if static link of stdc++ is possible... " >&6; }
31508     STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
31509     ac_ext=cpp
31510 ac_cpp='$CXXCPP $CPPFLAGS'
31511 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31512 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31513 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31514 
31515     OLD_LIBS="$LIBS"
31516     OLD_CXX="$CXX"
31517     LIBS="$STATIC_STDCXX_FLAGS"
31518     CXX="$CC"
31519     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31520 /* end confdefs.h.  */
31521 
31522 int
31523 main ()
31524 {
31525 return 0;
31526   ;
31527   return 0;
31528 }
31529 _ACEOF
31530 if ac_fn_cxx_try_link "$LINENO"; then :
31531   has_static_libstdcxx=yes
31532 else
31533   has_static_libstdcxx=no
31534 fi
31535 rm -f core conftest.err conftest.$ac_objext \
31536     conftest$ac_exeext conftest.$ac_ext
31537     LIBS="$OLD_LIBS"
31538     CXX="$OLD_CXX"
31539     ac_ext=cpp
31540 ac_cpp='$CXXCPP $CPPFLAGS'
31541 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31542 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31543 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31544 
31545     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
31546 $as_echo "$has_static_libstdcxx" >&6; }
31547 
31548     if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
31549         as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
31550     fi
31551 
31552     if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
31553         as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
31554     fi
31555 
31556     if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
31557         as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
31558     fi
31559 
31560     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
31561 $as_echo_n "checking how to link with libstdc++... " >&6; }
31562     # If dynamic was requested, it's available since it would fail above otherwise.
31563     # If dynamic wasn't requested, go with static unless it isn't available.
31564     if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno; then
31565         LIBCXX="$LIBCXX -lstdc++"
31566         LDCXX="$CXX"
31567         STATIC_CXX_SETTING="STATIC_CXX=false"
31568         { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
31569 $as_echo "dynamic" >&6; }
31570     else
31571         LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
31572         LDCXX="$CC"
31573         STATIC_CXX_SETTING="STATIC_CXX=true"
31574         { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
31575 $as_echo "static" >&6; }
31576     fi
31577 fi
31578 
31579 
31580 # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
31581 if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
31582     LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
31583 fi
31584 
31585 # TODO better (platform agnostic) test
31586 if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
31587     LIBCXX="-lstdc++"
31588 fi
31589 
31590 
31591 
31592 
31593 
31594 # After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper
31595 
31596 # When using cygwin or msys, we need a wrapper binary that renames
31597 # /cygdrive/c/ arguments into c:/ arguments and peeks into
31598 # @files and rewrites these too! This wrapper binary is
31599 # called fixpath.
31600 FIXPATH=
31601 if test "x$OPENJDK_BUILD_OS" = xwindows; then
31602     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
31603 $as_echo_n "checking if fixpath can be created... " >&6; }
31604     FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
31605     FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
31606     if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
31607       FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
31608       FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
31609       # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
31610       FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
31611     elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
31612       FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
31613       FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
31614 
31615       # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
31616       # @ was chosen as separator to minimize risk of other tools messing around with it
31617       all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
31618       fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
31619 
31620       FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
31621     fi
31622     rm -f $OUTPUT_ROOT/fixpath*
31623     cd $OUTPUT_ROOT
31624     $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
31625     cd $CURDIR
31626 
31627     if test ! -x $OUTPUT_ROOT/fixpath.exe; then
31628         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31629 $as_echo "no" >&6; }
31630         cat $OUTPUT_ROOT/fixpath1.log
31631         as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
31632     fi
31633     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31634 $as_echo "yes" >&6; }
31635     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
31636 $as_echo_n "checking if fixpath.exe works... " >&6; }
31637     cd $OUTPUT_ROOT
31638     $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
31639     cd $CURDIR
31640     if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
31641         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31642 $as_echo "no" >&6; }
31643         cat $OUTPUT_ROOT/fixpath2.log
31644         as_fn_error $? "fixpath did not work!" "$LINENO" 5
31645     fi
31646     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31647 $as_echo "yes" >&6; }
31648     rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
31649 fi
31650 
31651 
31652 
31653 
31654 ###############################################################################
31655 #
31656 # We need to do some final tweaking, when everything else is done.
31657 #
31658 ###############################################################################
31659 
31660 
31661 HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
31662 
31663 
31664 # The name of the Service Agent jar.
31665 SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
31666 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
31667   SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
31668 fi
31669 
31670 
31671 
31672 
31673 ###############################################################################
31674 #
31675 # Configure parts of the build that only affect the build performance,
31676 # not the result.
31677 #
31678 ###############################################################################
31679 
31680 
31681   # How many cores do we have on this build system?
31682 
31683 # Check whether --with-num-cores was given.
31684 if test "${with_num_cores+set}" = set; then :
31685   withval=$with_num_cores;
31686 fi
31687 
31688   if test "x$with_num_cores" = x; then
31689     # The number of cores were not specified, try to probe them.
31690 
31691     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
31692 $as_echo_n "checking for number of cores... " >&6; }
31693     NUM_CORES=1
31694     FOUND_CORES=no
31695 
31696     if test -f /proc/cpuinfo; then
31697         # Looks like a Linux (or cygwin) system
31698         NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
31699         FOUND_CORES=yes
31700     elif test -x /usr/sbin/psrinfo; then
31701         # Looks like a Solaris system
31702         NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
31703         FOUND_CORES=yes
31704     elif test -x /usr/sbin/system_profiler; then
31705         # Looks like a MacOSX system
31706         NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
31707         FOUND_CORES=yes
31708     elif test -n "$NUMBER_OF_PROCESSORS"; then
31709         # On windows, look in the env
31710         NUM_CORES=$NUMBER_OF_PROCESSORS
31711         FOUND_CORES=yes
31712     fi
31713 
31714     if test "x$FOUND_CORES" = xyes; then
31715         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
31716 $as_echo "$NUM_CORES" >&6; }
31717     else
31718         { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
31719 $as_echo "could not detect number of cores, defaulting to 1" >&6; }
31720         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
31721 $as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
31722     fi
31723 
31724 
31725   else
31726     NUM_CORES=$with_num_cores
31727   fi
31728 
31729 
31730 
31731   # How much memory do we have on this build system?
31732 
31733 # Check whether --with-memory-size was given.
31734 if test "${with_memory_size+set}" = set; then :
31735   withval=$with_memory_size;
31736 fi
31737 
31738   if test "x$with_memory_size" = x; then
31739     # The memory size was not specified, try to probe it.
31740 
31741     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
31742 $as_echo_n "checking for memory size... " >&6; }
31743     # Default to 1024 MB
31744     MEMORY_SIZE=1024
31745     FOUND_MEM=no
31746 
31747     if test -f /proc/meminfo; then
31748         # Looks like a Linux (or cygwin) system
31749         MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
31750         MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
31751         FOUND_MEM=yes
31752     elif test -x /usr/sbin/prtconf; then
31753         # Looks like a Solaris system
31754         MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'`
31755         FOUND_MEM=yes
31756     elif test -x /usr/sbin/system_profiler; then
31757         # Looks like a MacOSX system
31758         MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
31759         MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
31760         FOUND_MEM=yes
31761     elif test "x$OPENJDK_BUILD_OS" = xwindows; then
31762         # Windows, but without cygwin
31763         MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
31764         MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
31765         FOUND_MEM=yes
31766     fi
31767 
31768     if test "x$FOUND_MEM" = xyes; then
31769         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
31770 $as_echo "$MEMORY_SIZE MB" >&6; }
31771     else
31772         { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
31773 $as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
31774         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
31775 $as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
31776     fi
31777 
31778   else
31779     MEMORY_SIZE=$with_memory_size
31780   fi
31781 
31782 
31783 
31784   # Provide a decent default number of parallel jobs for make depending on
31785   # number of cores, amount of memory and machine architecture.
31786 
31787 # Check whether --with-jobs was given.
31788 if test "${with_jobs+set}" = set; then :
31789   withval=$with_jobs;
31790 fi
31791 
31792   if test "x$with_jobs" = x; then
31793     # Number of jobs was not specified, calculate.
31794     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
31795 $as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
31796     # Approximate memory in GB, rounding up a bit.
31797     memory_gb=`expr $MEMORY_SIZE / 1100`
31798     # Pick the lowest of memory in gb and number of cores.
31799     if test "$memory_gb" -lt "$NUM_CORES"; then
31800       JOBS="$memory_gb"
31801     else
31802       JOBS="$NUM_CORES"
31803       # On bigger machines, leave some room for other processes to run
31804       if test "$JOBS" -gt "4"; then
31805         JOBS=`expr $JOBS '*' 90 / 100`
31806       fi
31807     fi
31808     # Cap number of jobs to 16
31809     if test "$JOBS" -gt "16"; then
31810       JOBS=16
31811     fi
31812     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
31813 $as_echo "$JOBS" >&6; }
31814   else
31815     JOBS=$with_jobs
31816   fi
31817 
31818 
31819 
31820 # Setup smart javac (after cores and memory have been setup)
31821 
31822 
31823 # Check whether --with-sjavac-server-java was given.
31824 if test "${with_sjavac_server_java+set}" = set; then :
31825   withval=$with_sjavac_server_java;
31826 fi
31827 
31828 
31829 if test "x$with_sjavac_server_java" != x; then
31830     SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
31831     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
31832     if test "x$FOUND_VERSION" = x; then
31833         as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
31834     fi
31835 else
31836     SJAVAC_SERVER_JAVA=""
31837     # Hotspot specific options.
31838 
31839     # Test if -verbosegc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
31840     # If so, then append -verbosegc to SJAVAC_SERVER_JAVA
31841     FOUND_WARN=`$JAVA -verbosegc -version 2>&1 | grep -i warn`
31842     FOUND_VERSION=`$JAVA -verbosegc -version 2>&1 | grep " version \""`
31843     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31844         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
31845     fi
31846 
31847     # JRockit specific options.
31848 
31849     # Test if -Xverbose:gc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
31850     # If so, then append -Xverbose:gc to SJAVAC_SERVER_JAVA
31851     FOUND_WARN=`$JAVA -Xverbose:gc -version 2>&1 | grep -i warn`
31852     FOUND_VERSION=`$JAVA -Xverbose:gc -version 2>&1 | grep " version \""`
31853     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31854         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
31855     fi
31856 
31857     SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
31858 fi
31859 
31860 
31861 
31862 # Check whether --with-sjavac-server-cores was given.
31863 if test "${with_sjavac_server_cores+set}" = set; then :
31864   withval=$with_sjavac_server_cores;
31865 fi
31866 
31867 if test "x$with_sjavac_server_cores" != x; then
31868     SJAVAC_SERVER_CORES="$with_sjavac_server_cores"
31869 else
31870     if test "$NUM_CORES" -gt 16; then
31871         # We set this arbitrary limit because we want to limit the heap
31872         # size of the javac server.
31873         # In the future we will make the javac compilers in the server
31874         # share more and more state, thus enabling us to use more and
31875         # more concurrent threads in the server.
31876         SJAVAC_SERVER_CORES="16"
31877     else
31878         SJAVAC_SERVER_CORES="$NUM_CORES"
31879     fi
31880 
31881     if test "$MEMORY_SIZE" -gt "17000"; then
31882         MAX_HEAP_MEM=10000
31883 
31884     # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31885     # If so, then append -d64 to SJAVAC_SERVER_JAVA
31886     FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
31887     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
31888     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31889         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
31890     fi
31891 
31892 
31893     # Test if -Xms10G -Xmx10G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31894     # If so, then append -Xms10G -Xmx10G to SJAVAC_SERVER_JAVA
31895     FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep -i warn`
31896     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep " version \""`
31897     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31898         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
31899     fi
31900 
31901     elif test "$MEMORY_SIZE" -gt "10000"; then
31902         MAX_HEAP_MEM=6000
31903 
31904     # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31905     # If so, then append -d64 to SJAVAC_SERVER_JAVA
31906     FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
31907     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
31908     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31909         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
31910     fi
31911 
31912 
31913     # Test if -Xms6G -Xmx6G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31914     # If so, then append -Xms6G -Xmx6G to SJAVAC_SERVER_JAVA
31915     FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep -i warn`
31916     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep " version \""`
31917     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31918         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
31919     fi
31920 
31921     elif test "$MEMORY_SIZE" -gt "5000"; then
31922         MAX_HEAP_MEM=3000
31923 
31924     # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31925     # If so, then append -d64 to SJAVAC_SERVER_JAVA
31926     FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
31927     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
31928     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31929         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
31930     fi
31931 
31932 
31933     # Test if -Xms1G -Xmx3G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31934     # If so, then append -Xms1G -Xmx3G to SJAVAC_SERVER_JAVA
31935     FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep -i warn`
31936     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep " version \""`
31937     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31938         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
31939     fi
31940 
31941     elif test "$MEMORY_SIZE" -gt "3800"; then
31942         MAX_HEAP_MEM=2500
31943 
31944     # Test if -Xms1G -Xmx2500M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31945     # If so, then append -Xms1G -Xmx2500M to SJAVAC_SERVER_JAVA
31946     FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep -i warn`
31947     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep " version \""`
31948     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31949         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
31950     fi
31951 
31952     elif test "$MEMORY_SIZE" -gt "1900"; then
31953         MAX_HEAP_MEM=1200
31954 
31955     # Test if -Xms700M -Xmx1400M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31956     # If so, then append -Xms700M -Xmx1400M to SJAVAC_SERVER_JAVA
31957     FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep -i warn`
31958     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep " version \""`
31959     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31960         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M"
31961     fi
31962 
31963     elif test "$MEMORY_SIZE" -gt "1000"; then
31964         MAX_HEAP_MEM=900
31965 
31966     # Test if -Xms400M -Xmx1100M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31967     # If so, then append -Xms400M -Xmx1100M to SJAVAC_SERVER_JAVA
31968     FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep -i warn`
31969     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep " version \""`
31970     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31971         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
31972     fi
31973 
31974     else
31975         MAX_HEAP_MEM=512
31976 
31977     # Test if -Xms256M -Xmx512M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31978     # If so, then append -Xms256M -Xmx512M to SJAVAC_SERVER_JAVA
31979     FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep -i warn`
31980     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep " version \""`
31981     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31982         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
31983     fi
31984 
31985     fi
31986 
31987 
31988     # Test if -XX:PermSize=32m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31989     # If so, then append -XX:PermSize=32m to SJAVAC_SERVER_JAVA
31990     FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
31991     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
31992     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31993         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:PermSize=32m"
31994     fi
31995 
31996 
31997     # Test if -XX:MaxPermSize=160m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31998     # If so, then append -XX:MaxPermSize=160m to SJAVAC_SERVER_JAVA
31999     FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
32000     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
32001     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32002         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m"
32003     fi
32004 
32005 
32006     # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
32007     # If so, then append -XX:ThreadStackSize=$STACK_SIZE to SJAVAC_SERVER_JAVA
32008     FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
32009     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
32010     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32011         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE"
32012     fi
32013 
32014 
32015     MAX_COMPILERS_IN_HEAP=`expr $MAX_HEAP_MEM / 501`
32016     if test "$SJAVAC_SERVER_CORES" -gt "$MAX_COMPILERS_IN_HEAP"; then
32017         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if number of server cores must be reduced" >&5
32018 $as_echo_n "checking if number of server cores must be reduced... " >&6; }
32019         SJAVAC_SERVER_CORES="$MAX_COMPILERS_IN_HEAP"
32020         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&5
32021 $as_echo "yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&6; }
32022     fi
32023 fi
32024 
32025 
32026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
32027 $as_echo_n "checking whether to use sjavac... " >&6; }
32028 # Check whether --enable-sjavac was given.
32029 if test "${enable_sjavac+set}" = set; then :
32030   enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
32031 else
32032   ENABLE_SJAVAC='no'
32033 fi
32034 
32035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
32036 $as_echo "$ENABLE_SJAVAC" >&6; }
32037 
32038 
32039 if test "x$ENABLE_SJAVAC" = xyes; then
32040     SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
32041 else
32042     SJAVAC_SERVER_DIR=
32043 fi
32044 
32045 
32046 
32047 
32048 # Can the C/C++ compiler use precompiled headers?
32049 
32050 
32051 ###############################################################################
32052 #
32053 # Can the C/C++ compiler use precompiled headers?
32054 #
32055 # Check whether --enable-precompiled-headers was given.
32056 if test "${enable_precompiled_headers+set}" = set; then :
32057   enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
32058 else
32059   ENABLE_PRECOMPH=yes
32060 fi
32061 
32062 
32063 USE_PRECOMPILED_HEADER=1
32064 if test "x$ENABLE_PRECOMPH" = xno; then
32065     USE_PRECOMPILED_HEADER=0
32066 fi
32067 
32068 if test "x$ENABLE_PRECOMPH" = xyes; then
32069     # Check that the compiler actually supports precomp headers.
32070     if test "x$GCC" = xyes; then
32071          { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
32072 $as_echo_n "checking that precompiled headers work... " >&6; }
32073          echo "int alfa();" > conftest.h
32074          $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
32075          if test ! -f conftest.hpp.gch; then
32076              USE_PRECOMPILED_HEADER=0
32077              { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32078 $as_echo "no" >&6; }
32079          else
32080              { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32081 $as_echo "yes" >&6; }
32082          fi
32083          rm -f conftest.h conftest.hpp.gch
32084     fi
32085 fi
32086 
32087 
32088 
32089 
32090 # Setup use of ccache, if available
32091 
32092     # Check whether --enable-ccache was given.
32093 if test "${enable_ccache+set}" = set; then :
32094   enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
32095 else
32096   ENABLE_CCACHE=yes
32097 fi
32098 
32099     if test "x$ENABLE_CCACHE" = xyes; then
32100         # Extract the first word of "ccache", so it can be a program name with args.
32101 set dummy ccache; ac_word=$2
32102 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32103 $as_echo_n "checking for $ac_word... " >&6; }
32104 if ${ac_cv_path_CCACHE+:} false; then :
32105   $as_echo_n "(cached) " >&6
32106 else
32107   case $CCACHE in
32108   [\\/]* | ?:[\\/]*)
32109   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
32110   ;;
32111   *)
32112   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32113 for as_dir in $PATH
32114 do
32115   IFS=$as_save_IFS
32116   test -z "$as_dir" && as_dir=.
32117     for ac_exec_ext in '' $ac_executable_extensions; do
32118   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
32119     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
32120     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32121     break 2
32122   fi
32123 done
32124   done
32125 IFS=$as_save_IFS
32126 
32127   ;;
32128 esac
32129 fi
32130 CCACHE=$ac_cv_path_CCACHE
32131 if test -n "$CCACHE"; then
32132   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
32133 $as_echo "$CCACHE" >&6; }
32134 else
32135   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32136 $as_echo "no" >&6; }
32137 fi
32138 
32139 
32140     else
32141         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
32142 $as_echo_n "checking for ccache... " >&6; }
32143         { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
32144 $as_echo "explicitly disabled" >&6; }
32145         CCACHE=
32146     fi
32147 
32148 
32149 
32150 # Check whether --with-ccache-dir was given.
32151 if test "${with_ccache_dir+set}" = set; then :
32152   withval=$with_ccache_dir;
32153 fi
32154 
32155 
32156     if test "x$with_ccache_dir" != x; then
32157         # When using a non home ccache directory, assume the use is to share ccache files
32158         # with other users. Thus change the umask.
32159         SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
32160     fi
32161     CCACHE_FOUND=""
32162     if test "x$CCACHE" != x; then
32163 
32164     if test "x$CCACHE" != x; then
32165         CCACHE_FOUND="true"
32166         # Only use ccache if it is 3.1.4 or later, which supports
32167         # precompiled headers.
32168         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
32169 $as_echo_n "checking if ccache supports precompiled headers... " >&6; }
32170         HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
32171         if test "x$HAS_GOOD_CCACHE" = x; then
32172             { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
32173 $as_echo "no, disabling ccache" >&6; }
32174             CCACHE=
32175         else
32176             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32177 $as_echo "yes" >&6; }
32178             { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
32179 $as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
32180             PUSHED_FLAGS="$CXXFLAGS"
32181             CXXFLAGS="-fpch-preprocess $CXXFLAGS"
32182             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32183 /* end confdefs.h.  */
32184 
32185 int
32186 main ()
32187 {
32188 
32189   ;
32190   return 0;
32191 }
32192 _ACEOF
32193 if ac_fn_cxx_try_compile "$LINENO"; then :
32194   CC_KNOWS_CCACHE_TRICK=yes
32195 else
32196   CC_KNOWS_CCACHE_TRICK=no
32197 fi
32198 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32199             CXXFLAGS="$PUSHED_FLAGS"
32200             if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
32201                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32202 $as_echo "yes" >&6; }
32203             else
32204                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
32205 $as_echo "no, disabling ccaching of precompiled headers" >&6; }
32206                 CCACHE=
32207             fi
32208         fi
32209     fi
32210 
32211     if test "x$CCACHE" != x; then
32212         CCACHE_SLOPPINESS=time_macros
32213         CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
32214         CCACHE_FLAGS=-fpch-preprocess
32215 
32216         if test "x$SET_CCACHE_DIR" != x; then
32217             mkdir -p $CCACHE_DIR > /dev/null 2>&1
32218             chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
32219         fi
32220     fi
32221 
32222     fi
32223 
32224 
32225 ###############################################################################
32226 #
32227 # And now the finish...
32228 #
32229 ###############################################################################
32230 
32231 # Check for some common pitfalls
32232 
32233   if test x"$OPENJDK_BUILD_OS" = xwindows; then
32234     file_to_test="$SRC_ROOT/LICENSE"
32235     if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
32236       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
32237     fi
32238   fi
32239 
32240 
32241 
32242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
32243 $as_echo_n "checking if build directory is on local disk... " >&6; }
32244 
32245         # df -l lists only local disks; if the given directory is not found then
32246         # a non-zero exit code is given
32247   if test "x$DF" = x; then
32248     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32249       # msys does not have df; use Windows "net use" instead.
32250       IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
32251       if test "x$IS_NETWORK_DISK" = x; then
32252         OUTPUT_DIR_IS_LOCAL="yes"
32253       else
32254         OUTPUT_DIR_IS_LOCAL="no"
32255       fi
32256     else
32257       # No df here, say it's local
32258       OUTPUT_DIR_IS_LOCAL="yes"
32259     fi
32260   else
32261     if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
32262       OUTPUT_DIR_IS_LOCAL="yes"
32263     else
32264       OUTPUT_DIR_IS_LOCAL="no"
32265     fi
32266   fi
32267 
32268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
32269 $as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
32270 
32271 
32272 
32273 # Check if the user has any old-style ALT_ variables set.
32274 FOUND_ALT_VARIABLES=`env | grep ^ALT_`
32275 
32276 # Before generating output files, test if they exist. If they do, this is a reconfigure.
32277 # Since we can't properly handle the dependencies for this, warn the user about the situation
32278 if test -e $OUTPUT_ROOT/spec.gmk; then
32279   IS_RECONFIGURE=yes
32280 else
32281   IS_RECONFIGURE=no
32282 fi
32283 
32284 if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
32285   HIDE_PERFORMANCE_HINTS=yes
32286 else
32287   HIDE_PERFORMANCE_HINTS=no
32288   # Hide it the next time around...
32289   $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
32290 fi
32291 
32292 
32293 
32294 # At the end, call the custom hook. (Dummy macro if no custom sources available)
32295 
32296 
32297 # We're messing a bit with internal autoconf variables to put the config.status
32298 # in the output directory instead of the current directory.
32299 CONFIG_STATUS="$OUTPUT_ROOT/config.status"
32300 # Create the actual output files. Now the main work of configure is done.
32301 cat >confcache <<\_ACEOF
32302 # This file is a shell script that caches the results of configure
32303 # tests run on this system so they can be shared between configure
32304 # scripts and configure runs, see configure's option --config-cache.
32305 # It is not useful on other systems.  If it contains results you don't
32306 # want to keep, you may remove or edit it.
32307 #
32308 # config.status only pays attention to the cache file if you give it
32309 # the --recheck option to rerun configure.
32310 #
32311 # `ac_cv_env_foo' variables (set or unset) will be overridden when
32312 # loading this file, other *unset* `ac_cv_foo' will be assigned the
32313 # following values.
32314 
32315 _ACEOF
32316 
32317 # The following way of writing the cache mishandles newlines in values,
32318 # but we know of no workaround that is simple, portable, and efficient.
32319 # So, we kill variables containing newlines.
32320 # Ultrix sh set writes to stderr and can't be redirected directly,
32321 # and sets the high bit in the cache file unless we assign to the vars.
32322 (
32323   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
32324     eval ac_val=\$$ac_var
32325     case $ac_val in #(
32326     *${as_nl}*)
32327       case $ac_var in #(
32328       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
32329 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
32330       esac
32331       case $ac_var in #(
32332       _ | IFS | as_nl) ;; #(
32333       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
32334       *) { eval $ac_var=; unset $ac_var;} ;;
32335       esac ;;
32336     esac
32337   done
32338 
32339   (set) 2>&1 |
32340     case $as_nl`(ac_space=' '; set) 2>&1` in #(
32341     *${as_nl}ac_space=\ *)
32342       # `set' does not quote correctly, so add quotes: double-quote
32343       # substitution turns \\\\ into \\, and sed turns \\ into \.
32344       sed -n \
32345         "s/'/'\\\\''/g;
32346           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
32347       ;; #(
32348     *)
32349       # `set' quotes correctly as required by POSIX, so do not add quotes.
32350       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
32351       ;;
32352     esac |
32353     sort
32354 ) |
32355   sed '
32356      /^ac_cv_env_/b end
32357      t clear
32358      :clear
32359      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
32360      t end
32361      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
32362      :end' >>confcache
32363 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
32364   if test -w "$cache_file"; then
32365     if test "x$cache_file" != "x/dev/null"; then
32366       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
32367 $as_echo "$as_me: updating cache $cache_file" >&6;}
32368       if test ! -f "$cache_file" || test -h "$cache_file"; then
32369         cat confcache >"$cache_file"
32370       else
32371         case $cache_file in #(
32372         */* | ?:*)
32373           mv -f confcache "$cache_file"$$ &&
32374           mv -f "$cache_file"$$ "$cache_file" ;; #(
32375         *)
32376           mv -f confcache "$cache_file" ;;
32377         esac
32378       fi
32379     fi
32380   else
32381     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
32382 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
32383   fi
32384 fi
32385 rm -f confcache
32386 
32387 test "x$prefix" = xNONE && prefix=$ac_default_prefix
32388 # Let make expand exec_prefix.
32389 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
32390 
32391 DEFS=-DHAVE_CONFIG_H
32392 
32393 ac_libobjs=
32394 ac_ltlibobjs=
32395 U=
32396 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
32397   # 1. Remove the extension, and $U if already installed.
32398   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
32399   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
32400   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
32401   #    will be set to the directory where LIBOBJS objects are built.
32402   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
32403   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
32404 done
32405 LIBOBJS=$ac_libobjs
32406 
32407 LTLIBOBJS=$ac_ltlibobjs
32408 
32409 
32410 
32411 : "${CONFIG_STATUS=./config.status}"
32412 ac_write_fail=0
32413 ac_clean_files_save=$ac_clean_files
32414 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
32415 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
32416 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
32417 as_write_fail=0
32418 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
32419 #! $SHELL
32420 # Generated by $as_me.
32421 # Run this file to recreate the current configuration.
32422 # Compiler output produced by configure, useful for debugging
32423 # configure, is in config.log if it exists.
32424 
32425 debug=false
32426 ac_cs_recheck=false
32427 ac_cs_silent=false
32428 
32429 SHELL=\${CONFIG_SHELL-$SHELL}
32430 export SHELL
32431 _ASEOF
32432 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
32433 ## -------------------- ##
32434 ## M4sh Initialization. ##
32435 ## -------------------- ##
32436 
32437 # Be more Bourne compatible
32438 DUALCASE=1; export DUALCASE # for MKS sh
32439 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
32440   emulate sh
32441   NULLCMD=:
32442   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
32443   # is contrary to our usage.  Disable this feature.
32444   alias -g '${1+"$@"}'='"$@"'
32445   setopt NO_GLOB_SUBST
32446 else
32447   case `(set -o) 2>/dev/null` in #(
32448   *posix*) :
32449     set -o posix ;; #(
32450   *) :
32451      ;;
32452 esac
32453 fi
32454 
32455 
32456 as_nl='
32457 '
32458 export as_nl
32459 # Printing a long string crashes Solaris 7 /usr/bin/printf.
32460 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
32461 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
32462 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
32463 # Prefer a ksh shell builtin over an external printf program on Solaris,
32464 # but without wasting forks for bash or zsh.
32465 if test -z "$BASH_VERSION$ZSH_VERSION" \
32466     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
32467   as_echo='print -r --'
32468   as_echo_n='print -rn --'
32469 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
32470   as_echo='printf %s\n'
32471   as_echo_n='printf %s'
32472 else
32473   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
32474     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
32475     as_echo_n='/usr/ucb/echo -n'
32476   else
32477     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
32478     as_echo_n_body='eval
32479       arg=$1;
32480       case $arg in #(
32481       *"$as_nl"*)
32482         expr "X$arg" : "X\\(.*\\)$as_nl";
32483         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
32484       esac;
32485       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
32486     '
32487     export as_echo_n_body
32488     as_echo_n='sh -c $as_echo_n_body as_echo'
32489   fi
32490   export as_echo_body
32491   as_echo='sh -c $as_echo_body as_echo'
32492 fi
32493 
32494 # The user is always right.
32495 if test "${PATH_SEPARATOR+set}" != set; then
32496   PATH_SEPARATOR=:
32497   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
32498     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
32499       PATH_SEPARATOR=';'
32500   }
32501 fi
32502 
32503 
32504 # IFS
32505 # We need space, tab and new line, in precisely that order.  Quoting is
32506 # there to prevent editors from complaining about space-tab.
32507 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
32508 # splitting by setting IFS to empty value.)
32509 IFS=" ""        $as_nl"
32510 
32511 # Find who we are.  Look in the path if we contain no directory separator.
32512 as_myself=
32513 case $0 in #((
32514   *[\\/]* ) as_myself=$0 ;;
32515   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32516 for as_dir in $PATH
32517 do
32518   IFS=$as_save_IFS
32519   test -z "$as_dir" && as_dir=.
32520     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
32521   done
32522 IFS=$as_save_IFS
32523 
32524      ;;
32525 esac
32526 # We did not find ourselves, most probably we were run as `sh COMMAND'
32527 # in which case we are not to be found in the path.
32528 if test "x$as_myself" = x; then
32529   as_myself=$0
32530 fi
32531 if test ! -f "$as_myself"; then
32532   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
32533   exit 1
32534 fi
32535 
32536 # Unset variables that we do not need and which cause bugs (e.g. in
32537 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
32538 # suppresses any "Segmentation fault" message there.  '((' could
32539 # trigger a bug in pdksh 5.2.14.
32540 for as_var in BASH_ENV ENV MAIL MAILPATH
32541 do eval test x\${$as_var+set} = xset \
32542   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
32543 done
32544 PS1='$ '
32545 PS2='> '
32546 PS4='+ '
32547 
32548 # NLS nuisances.
32549 LC_ALL=C
32550 export LC_ALL
32551 LANGUAGE=C
32552 export LANGUAGE
32553 
32554 # CDPATH.
32555 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
32556 
32557 
32558 # as_fn_error STATUS ERROR [LINENO LOG_FD]
32559 # ----------------------------------------
32560 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
32561 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
32562 # script with STATUS, using 1 if that was 0.
32563 as_fn_error ()
32564 {
32565   as_status=$1; test $as_status -eq 0 && as_status=1
32566   if test "$4"; then
32567     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
32568     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
32569   fi
32570   $as_echo "$as_me: error: $2" >&2
32571   as_fn_exit $as_status
32572 } # as_fn_error
32573 
32574 
32575 # as_fn_set_status STATUS
32576 # -----------------------
32577 # Set $? to STATUS, without forking.
32578 as_fn_set_status ()
32579 {
32580   return $1
32581 } # as_fn_set_status
32582 
32583 # as_fn_exit STATUS
32584 # -----------------
32585 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
32586 as_fn_exit ()
32587 {
32588   set +e
32589   as_fn_set_status $1
32590   exit $1
32591 } # as_fn_exit
32592 
32593 # as_fn_unset VAR
32594 # ---------------
32595 # Portably unset VAR.
32596 as_fn_unset ()
32597 {
32598   { eval $1=; unset $1;}
32599 }
32600 as_unset=as_fn_unset
32601 # as_fn_append VAR VALUE
32602 # ----------------------
32603 # Append the text in VALUE to the end of the definition contained in VAR. Take
32604 # advantage of any shell optimizations that allow amortized linear growth over
32605 # repeated appends, instead of the typical quadratic growth present in naive
32606 # implementations.
32607 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
32608   eval 'as_fn_append ()
32609   {
32610     eval $1+=\$2
32611   }'
32612 else
32613   as_fn_append ()
32614   {
32615     eval $1=\$$1\$2
32616   }
32617 fi # as_fn_append
32618 
32619 # as_fn_arith ARG...
32620 # ------------------
32621 # Perform arithmetic evaluation on the ARGs, and store the result in the
32622 # global $as_val. Take advantage of shells that can avoid forks. The arguments
32623 # must be portable across $(()) and expr.
32624 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
32625   eval 'as_fn_arith ()
32626   {
32627     as_val=$(( $* ))
32628   }'
32629 else
32630   as_fn_arith ()
32631   {
32632     as_val=`expr "$@" || test $? -eq 1`
32633   }
32634 fi # as_fn_arith
32635 
32636 
32637 if expr a : '\(a\)' >/dev/null 2>&1 &&
32638    test "X`expr 00001 : '.*\(...\)'`" = X001; then
32639   as_expr=expr
32640 else
32641   as_expr=false
32642 fi
32643 
32644 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
32645   as_basename=basename
32646 else
32647   as_basename=false
32648 fi
32649 
32650 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
32651   as_dirname=dirname
32652 else
32653   as_dirname=false
32654 fi
32655 
32656 as_me=`$as_basename -- "$0" ||
32657 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
32658          X"$0" : 'X\(//\)$' \| \
32659          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
32660 $as_echo X/"$0" |
32661     sed '/^.*\/\([^/][^/]*\)\/*$/{
32662             s//\1/
32663             q
32664           }
32665           /^X\/\(\/\/\)$/{
32666             s//\1/
32667             q
32668           }
32669           /^X\/\(\/\).*/{
32670             s//\1/
32671             q
32672           }
32673           s/.*/./; q'`
32674 
32675 # Avoid depending upon Character Ranges.
32676 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
32677 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
32678 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
32679 as_cr_digits='0123456789'
32680 as_cr_alnum=$as_cr_Letters$as_cr_digits
32681 
32682 ECHO_C= ECHO_N= ECHO_T=
32683 case `echo -n x` in #(((((
32684 -n*)
32685   case `echo 'xy\c'` in
32686   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
32687   xy)  ECHO_C='\c';;
32688   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
32689        ECHO_T=' ';;
32690   esac;;
32691 *)
32692   ECHO_N='-n';;
32693 esac
32694 
32695 rm -f conf$$ conf$$.exe conf$$.file
32696 if test -d conf$$.dir; then
32697   rm -f conf$$.dir/conf$$.file
32698 else
32699   rm -f conf$$.dir
32700   mkdir conf$$.dir 2>/dev/null
32701 fi
32702 if (echo >conf$$.file) 2>/dev/null; then
32703   if ln -s conf$$.file conf$$ 2>/dev/null; then
32704     as_ln_s='ln -s'
32705     # ... but there are two gotchas:
32706     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
32707     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
32708     # In both cases, we have to default to `cp -p'.
32709     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
32710       as_ln_s='cp -p'
32711   elif ln conf$$.file conf$$ 2>/dev/null; then
32712     as_ln_s=ln
32713   else
32714     as_ln_s='cp -p'
32715   fi
32716 else
32717   as_ln_s='cp -p'
32718 fi
32719 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
32720 rmdir conf$$.dir 2>/dev/null
32721 
32722 
32723 # as_fn_mkdir_p
32724 # -------------
32725 # Create "$as_dir" as a directory, including parents if necessary.
32726 as_fn_mkdir_p ()
32727 {
32728 
32729   case $as_dir in #(
32730   -*) as_dir=./$as_dir;;
32731   esac
32732   test -d "$as_dir" || eval $as_mkdir_p || {
32733     as_dirs=
32734     while :; do
32735       case $as_dir in #(
32736       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
32737       *) as_qdir=$as_dir;;
32738       esac
32739       as_dirs="'$as_qdir' $as_dirs"
32740       as_dir=`$as_dirname -- "$as_dir" ||
32741 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
32742          X"$as_dir" : 'X\(//\)[^/]' \| \
32743          X"$as_dir" : 'X\(//\)$' \| \
32744          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
32745 $as_echo X"$as_dir" |
32746     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
32747             s//\1/
32748             q
32749           }
32750           /^X\(\/\/\)[^/].*/{
32751             s//\1/
32752             q
32753           }
32754           /^X\(\/\/\)$/{
32755             s//\1/
32756             q
32757           }
32758           /^X\(\/\).*/{
32759             s//\1/
32760             q
32761           }
32762           s/.*/./; q'`
32763       test -d "$as_dir" && break
32764     done
32765     test -z "$as_dirs" || eval "mkdir $as_dirs"
32766   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
32767 
32768 
32769 } # as_fn_mkdir_p
32770 if mkdir -p . 2>/dev/null; then
32771   as_mkdir_p='mkdir -p "$as_dir"'
32772 else
32773   test -d ./-p && rmdir ./-p
32774   as_mkdir_p=false
32775 fi
32776 
32777 if test -x / >/dev/null 2>&1; then
32778   as_test_x='test -x'
32779 else
32780   if ls -dL / >/dev/null 2>&1; then
32781     as_ls_L_option=L
32782   else
32783     as_ls_L_option=
32784   fi
32785   as_test_x='
32786     eval sh -c '\''
32787       if test -d "$1"; then
32788         test -d "$1/.";
32789       else
32790         case $1 in #(
32791         -*)set "./$1";;
32792         esac;
32793         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
32794         ???[sx]*):;;*)false;;esac;fi
32795     '\'' sh
32796   '
32797 fi
32798 as_executable_p=$as_test_x
32799 
32800 # Sed expression to map a string onto a valid CPP name.
32801 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
32802 
32803 # Sed expression to map a string onto a valid variable name.
32804 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
32805 
32806 
32807 exec 6>&1
32808 ## ----------------------------------- ##
32809 ## Main body of $CONFIG_STATUS script. ##
32810 ## ----------------------------------- ##
32811 _ASEOF
32812 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
32813 
32814 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32815 # Save the log message, to keep $0 and so on meaningful, and to
32816 # report actual input values of CONFIG_FILES etc. instead of their
32817 # values after options handling.
32818 ac_log="
32819 This file was extended by OpenJDK $as_me jdk8, which was
32820 generated by GNU Autoconf 2.68.  Invocation command line was
32821 
32822   CONFIG_FILES    = $CONFIG_FILES
32823   CONFIG_HEADERS  = $CONFIG_HEADERS
32824   CONFIG_LINKS    = $CONFIG_LINKS
32825   CONFIG_COMMANDS = $CONFIG_COMMANDS
32826   $ $0 $@
32827 
32828 on `(hostname || uname -n) 2>/dev/null | sed 1q`
32829 "
32830 
32831 _ACEOF
32832 
32833 case $ac_config_files in *"
32834 "*) set x $ac_config_files; shift; ac_config_files=$*;;
32835 esac
32836 
32837 case $ac_config_headers in *"
32838 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
32839 esac
32840 
32841 
32842 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32843 # Files that config.status was made for.
32844 config_files="$ac_config_files"
32845 config_headers="$ac_config_headers"
32846 
32847 _ACEOF
32848 
32849 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32850 ac_cs_usage="\
32851 \`$as_me' instantiates files and other configuration actions
32852 from templates according to the current configuration.  Unless the files
32853 and actions are specified as TAGs, all are instantiated by default.
32854 
32855 Usage: $0 [OPTION]... [TAG]...
32856 
32857   -h, --help       print this help, then exit
32858   -V, --version    print version number and configuration settings, then exit
32859       --config     print configuration, then exit
32860   -q, --quiet, --silent
32861                    do not print progress messages
32862   -d, --debug      don't remove temporary files
32863       --recheck    update $as_me by reconfiguring in the same conditions
32864       --file=FILE[:TEMPLATE]
32865                    instantiate the configuration file FILE
32866       --header=FILE[:TEMPLATE]
32867                    instantiate the configuration header FILE
32868 
32869 Configuration files:
32870 $config_files
32871 
32872 Configuration headers:
32873 $config_headers
32874 
32875 Report bugs to <build-dev@openjdk.java.net>.
32876 OpenJDK home page: <http://openjdk.java.net>."
32877 
32878 _ACEOF
32879 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32880 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
32881 ac_cs_version="\\
32882 OpenJDK config.status jdk8
32883 configured by $0, generated by GNU Autoconf 2.68,
32884   with options \\"\$ac_cs_config\\"
32885 
32886 Copyright (C) 2010 Free Software Foundation, Inc.
32887 This config.status script is free software; the Free Software Foundation
32888 gives unlimited permission to copy, distribute and modify it."
32889 
32890 ac_pwd='$ac_pwd'
32891 srcdir='$srcdir'
32892 AWK='$AWK'
32893 test -n "\$AWK" || AWK=awk
32894 _ACEOF
32895 
32896 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32897 # The default lists apply if the user does not specify any file.
32898 ac_need_defaults=:
32899 while test $# != 0
32900 do
32901   case $1 in
32902   --*=?*)
32903     ac_option=`expr "X$1" : 'X\([^=]*\)='`
32904     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
32905     ac_shift=:
32906     ;;
32907   --*=)
32908     ac_option=`expr "X$1" : 'X\([^=]*\)='`
32909     ac_optarg=
32910     ac_shift=:
32911     ;;
32912   *)
32913     ac_option=$1
32914     ac_optarg=$2
32915     ac_shift=shift
32916     ;;
32917   esac
32918 
32919   case $ac_option in
32920   # Handling of the options.
32921   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
32922     ac_cs_recheck=: ;;
32923   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
32924     $as_echo "$ac_cs_version"; exit ;;
32925   --config | --confi | --conf | --con | --co | --c )
32926     $as_echo "$ac_cs_config"; exit ;;
32927   --debug | --debu | --deb | --de | --d | -d )
32928     debug=: ;;
32929   --file | --fil | --fi | --f )
32930     $ac_shift
32931     case $ac_optarg in
32932     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
32933     '') as_fn_error $? "missing file argument" ;;
32934     esac
32935     as_fn_append CONFIG_FILES " '$ac_optarg'"
32936     ac_need_defaults=false;;
32937   --header | --heade | --head | --hea )
32938     $ac_shift
32939     case $ac_optarg in
32940     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
32941     esac
32942     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
32943     ac_need_defaults=false;;
32944   --he | --h)
32945     # Conflict between --help and --header
32946     as_fn_error $? "ambiguous option: \`$1'
32947 Try \`$0 --help' for more information.";;
32948   --help | --hel | -h )
32949     $as_echo "$ac_cs_usage"; exit ;;
32950   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
32951   | -silent | --silent | --silen | --sile | --sil | --si | --s)
32952     ac_cs_silent=: ;;
32953 
32954   # This is an error.
32955   -*) as_fn_error $? "unrecognized option: \`$1'
32956 Try \`$0 --help' for more information." ;;
32957 
32958   *) as_fn_append ac_config_targets " $1"
32959      ac_need_defaults=false ;;
32960 
32961   esac
32962   shift
32963 done
32964 
32965 ac_configure_extra_args=
32966 
32967 if $ac_cs_silent; then
32968   exec 6>/dev/null
32969   ac_configure_extra_args="$ac_configure_extra_args --silent"
32970 fi
32971 
32972 _ACEOF
32973 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32974 if \$ac_cs_recheck; then
32975   set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
32976   shift
32977   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
32978   CONFIG_SHELL='$SHELL'
32979   export CONFIG_SHELL
32980   exec "\$@"
32981 fi
32982 
32983 _ACEOF
32984 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32985 exec 5>>config.log
32986 {
32987   echo
32988   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
32989 ## Running $as_me. ##
32990 _ASBOX
32991   $as_echo "$ac_log"
32992 } >&5
32993 
32994 _ACEOF
32995 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32996 _ACEOF
32997 
32998 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32999 
33000 # Handling of arguments.
33001 for ac_config_target in $ac_config_targets
33002 do
33003   case $ac_config_target in
33004     "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
33005     "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
33006     "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
33007     "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
33008     "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
33009     "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
33010     "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
33011 
33012   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
33013   esac
33014 done
33015 
33016 
33017 # If the user did not use the arguments to specify the items to instantiate,
33018 # then the envvar interface is used.  Set only those that are not.
33019 # We use the long form for the default assignment because of an extremely
33020 # bizarre bug on SunOS 4.1.3.
33021 if $ac_need_defaults; then
33022   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
33023   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
33024 fi
33025 
33026 # Have a temporary directory for convenience.  Make it in the build tree
33027 # simply because there is no reason against having it here, and in addition,
33028 # creating and moving files from /tmp can sometimes cause problems.
33029 # Hook for its removal unless debugging.
33030 # Note that there is a small window in which the directory will not be cleaned:
33031 # after its creation but before its name has been assigned to `$tmp'.
33032 $debug ||
33033 {
33034   tmp= ac_tmp=
33035   trap 'exit_status=$?
33036   : "${ac_tmp:=$tmp}"
33037   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
33038 ' 0
33039   trap 'as_fn_exit 1' 1 2 13 15
33040 }
33041 # Create a (secure) tmp directory for tmp files.
33042 
33043 {
33044   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
33045   test -d "$tmp"
33046 }  ||
33047 {
33048   tmp=./conf$$-$RANDOM
33049   (umask 077 && mkdir "$tmp")
33050 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
33051 ac_tmp=$tmp
33052 
33053 # Set up the scripts for CONFIG_FILES section.
33054 # No need to generate them if there are no CONFIG_FILES.
33055 # This happens for instance with `./config.status config.h'.
33056 if test -n "$CONFIG_FILES"; then
33057 
33058 
33059 ac_cr=`echo X | tr X '\015'`
33060 # On cygwin, bash can eat \r inside `` if the user requested igncr.
33061 # But we know of no other shell where ac_cr would be empty at this
33062 # point, so we can use a bashism as a fallback.
33063 if test "x$ac_cr" = x; then
33064   eval ac_cr=\$\'\\r\'
33065 fi
33066 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
33067 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
33068   ac_cs_awk_cr='\\r'
33069 else
33070   ac_cs_awk_cr=$ac_cr
33071 fi
33072 
33073 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
33074 _ACEOF
33075 
33076 
33077 {
33078   echo "cat >conf$$subs.awk <<_ACEOF" &&
33079   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
33080   echo "_ACEOF"
33081 } >conf$$subs.sh ||
33082   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
33083 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
33084 ac_delim='%!_!# '
33085 for ac_last_try in false false false false false :; do
33086   . ./conf$$subs.sh ||
33087     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
33088 
33089   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
33090   if test $ac_delim_n = $ac_delim_num; then
33091     break
33092   elif $ac_last_try; then
33093     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
33094   else
33095     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
33096   fi
33097 done
33098 rm -f conf$$subs.sh
33099 
33100 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33101 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
33102 _ACEOF
33103 sed -n '
33104 h
33105 s/^/S["/; s/!.*/"]=/
33106 p
33107 g
33108 s/^[^!]*!//
33109 :repl
33110 t repl
33111 s/'"$ac_delim"'$//
33112 t delim
33113 :nl
33114 h
33115 s/\(.\{148\}\)..*/\1/
33116 t more1
33117 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
33118 p
33119 n
33120 b repl
33121 :more1
33122 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
33123 p
33124 g
33125 s/.\{148\}//
33126 t nl
33127 :delim
33128 h
33129 s/\(.\{148\}\)..*/\1/
33130 t more2
33131 s/["\\]/\\&/g; s/^/"/; s/$/"/
33132 p
33133 b
33134 :more2
33135 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
33136 p
33137 g
33138 s/.\{148\}//
33139 t delim
33140 ' <conf$$subs.awk | sed '
33141 /^[^""]/{
33142   N
33143   s/\n//
33144 }
33145 ' >>$CONFIG_STATUS || ac_write_fail=1
33146 rm -f conf$$subs.awk
33147 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33148 _ACAWK
33149 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
33150   for (key in S) S_is_set[key] = 1
33151   FS = ""
33152 
33153 }
33154 {
33155   line = $ 0
33156   nfields = split(line, field, "@")
33157   substed = 0
33158   len = length(field[1])
33159   for (i = 2; i < nfields; i++) {
33160     key = field[i]
33161     keylen = length(key)
33162     if (S_is_set[key]) {
33163       value = S[key]
33164       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
33165       len += length(value) + length(field[++i])
33166       substed = 1
33167     } else
33168       len += 1 + keylen
33169   }
33170 
33171   print line
33172 }
33173 
33174 _ACAWK
33175 _ACEOF
33176 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33177 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
33178   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
33179 else
33180   cat
33181 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
33182   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
33183 _ACEOF
33184 
33185 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
33186 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
33187 # trailing colons and then remove the whole line if VPATH becomes empty
33188 # (actually we leave an empty line to preserve line numbers).
33189 if test "x$srcdir" = x.; then
33190   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
33191 h
33192 s///
33193 s/^/:/
33194 s/[      ]*$/:/
33195 s/:\$(srcdir):/:/g
33196 s/:\${srcdir}:/:/g
33197 s/:@srcdir@:/:/g
33198 s/^:*//
33199 s/:*$//
33200 x
33201 s/\(=[   ]*\).*/\1/
33202 G
33203 s/\n//
33204 s/^[^=]*=[       ]*$//
33205 }'
33206 fi
33207 
33208 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33209 fi # test -n "$CONFIG_FILES"
33210 
33211 # Set up the scripts for CONFIG_HEADERS section.
33212 # No need to generate them if there are no CONFIG_HEADERS.
33213 # This happens for instance with `./config.status Makefile'.
33214 if test -n "$CONFIG_HEADERS"; then
33215 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
33216 BEGIN {
33217 _ACEOF
33218 
33219 # Transform confdefs.h into an awk script `defines.awk', embedded as
33220 # here-document in config.status, that substitutes the proper values into
33221 # config.h.in to produce config.h.
33222 
33223 # Create a delimiter string that does not exist in confdefs.h, to ease
33224 # handling of long lines.
33225 ac_delim='%!_!# '
33226 for ac_last_try in false false :; do
33227   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
33228   if test -z "$ac_tt"; then
33229     break
33230   elif $ac_last_try; then
33231     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
33232   else
33233     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
33234   fi
33235 done
33236 
33237 # For the awk script, D is an array of macro values keyed by name,
33238 # likewise P contains macro parameters if any.  Preserve backslash
33239 # newline sequences.
33240 
33241 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
33242 sed -n '
33243 s/.\{148\}/&'"$ac_delim"'/g
33244 t rset
33245 :rset
33246 s/^[     ]*#[    ]*define[       ][      ]*/ /
33247 t def
33248 d
33249 :def
33250 s/\\$//
33251 t bsnl
33252 s/["\\]/\\&/g
33253 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
33254 D["\1"]=" \3"/p
33255 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
33256 d
33257 :bsnl
33258 s/["\\]/\\&/g
33259 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
33260 D["\1"]=" \3\\\\\\n"\\/p
33261 t cont
33262 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
33263 t cont
33264 d
33265 :cont
33266 n
33267 s/.\{148\}/&'"$ac_delim"'/g
33268 t clear
33269 :clear
33270 s/\\$//
33271 t bsnlc
33272 s/["\\]/\\&/g; s/^/"/; s/$/"/p
33273 d
33274 :bsnlc
33275 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
33276 b cont
33277 ' <confdefs.h | sed '
33278 s/'"$ac_delim"'/"\\\
33279 "/g' >>$CONFIG_STATUS || ac_write_fail=1
33280 
33281 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33282   for (key in D) D_is_set[key] = 1
33283   FS = ""
33284 }
33285 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
33286   line = \$ 0
33287   split(line, arg, " ")
33288   if (arg[1] == "#") {
33289     defundef = arg[2]
33290     mac1 = arg[3]
33291   } else {
33292     defundef = substr(arg[1], 2)
33293     mac1 = arg[2]
33294   }
33295   split(mac1, mac2, "(") #)
33296   macro = mac2[1]
33297   prefix = substr(line, 1, index(line, defundef) - 1)
33298   if (D_is_set[macro]) {
33299     # Preserve the white space surrounding the "#".
33300     print prefix "define", macro P[macro] D[macro]
33301     next
33302   } else {
33303     # Replace #undef with comments.  This is necessary, for example,
33304     # in the case of _POSIX_SOURCE, which is predefined and required
33305     # on some systems where configure will not decide to define it.
33306     if (defundef == "undef") {
33307       print "/*", prefix defundef, macro, "*/"
33308       next
33309     }
33310   }
33311 }
33312 { print }
33313 _ACAWK
33314 _ACEOF
33315 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33316   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
33317 fi # test -n "$CONFIG_HEADERS"
33318 
33319 
33320 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
33321 shift
33322 for ac_tag
33323 do
33324   case $ac_tag in
33325   :[FHLC]) ac_mode=$ac_tag; continue;;
33326   esac
33327   case $ac_mode$ac_tag in
33328   :[FHL]*:*);;
33329   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
33330   :[FH]-) ac_tag=-:-;;
33331   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
33332   esac
33333   ac_save_IFS=$IFS
33334   IFS=:
33335   set x $ac_tag
33336   IFS=$ac_save_IFS
33337   shift
33338   ac_file=$1
33339   shift
33340 
33341   case $ac_mode in
33342   :L) ac_source=$1;;
33343   :[FH])
33344     ac_file_inputs=
33345     for ac_f
33346     do
33347       case $ac_f in
33348       -) ac_f="$ac_tmp/stdin";;
33349       *) # Look for the file first in the build tree, then in the source tree
33350          # (if the path is not absolute).  The absolute path cannot be DOS-style,
33351          # because $ac_f cannot contain `:'.
33352          test -f "$ac_f" ||
33353            case $ac_f in
33354            [\\/$]*) false;;
33355            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
33356            esac ||
33357            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
33358       esac
33359       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
33360       as_fn_append ac_file_inputs " '$ac_f'"
33361     done
33362 
33363     # Let's still pretend it is `configure' which instantiates (i.e., don't
33364     # use $as_me), people would be surprised to read:
33365     #    /* config.h.  Generated by config.status.  */
33366     configure_input='Generated from '`
33367           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
33368         `' by configure.'
33369     if test x"$ac_file" != x-; then
33370       configure_input="$ac_file.  $configure_input"
33371       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
33372 $as_echo "$as_me: creating $ac_file" >&6;}
33373     fi
33374     # Neutralize special characters interpreted by sed in replacement strings.
33375     case $configure_input in #(
33376     *\&* | *\|* | *\\* )
33377        ac_sed_conf_input=`$as_echo "$configure_input" |
33378        sed 's/[\\\\&|]/\\\\&/g'`;; #(
33379     *) ac_sed_conf_input=$configure_input;;
33380     esac
33381 
33382     case $ac_tag in
33383     *:-:* | *:-) cat >"$ac_tmp/stdin" \
33384       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
33385     esac
33386     ;;
33387   esac
33388 
33389   ac_dir=`$as_dirname -- "$ac_file" ||
33390 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
33391          X"$ac_file" : 'X\(//\)[^/]' \| \
33392          X"$ac_file" : 'X\(//\)$' \| \
33393          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
33394 $as_echo X"$ac_file" |
33395     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
33396             s//\1/
33397             q
33398           }
33399           /^X\(\/\/\)[^/].*/{
33400             s//\1/
33401             q
33402           }
33403           /^X\(\/\/\)$/{
33404             s//\1/
33405             q
33406           }
33407           /^X\(\/\).*/{
33408             s//\1/
33409             q
33410           }
33411           s/.*/./; q'`
33412   as_dir="$ac_dir"; as_fn_mkdir_p
33413   ac_builddir=.
33414 
33415 case "$ac_dir" in
33416 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
33417 *)
33418   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
33419   # A ".." for each directory in $ac_dir_suffix.
33420   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
33421   case $ac_top_builddir_sub in
33422   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
33423   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
33424   esac ;;
33425 esac
33426 ac_abs_top_builddir=$ac_pwd
33427 ac_abs_builddir=$ac_pwd$ac_dir_suffix
33428 # for backward compatibility:
33429 ac_top_builddir=$ac_top_build_prefix
33430 
33431 case $srcdir in
33432   .)  # We are building in place.
33433     ac_srcdir=.
33434     ac_top_srcdir=$ac_top_builddir_sub
33435     ac_abs_top_srcdir=$ac_pwd ;;
33436   [\\/]* | ?:[\\/]* )  # Absolute name.
33437     ac_srcdir=$srcdir$ac_dir_suffix;
33438     ac_top_srcdir=$srcdir
33439     ac_abs_top_srcdir=$srcdir ;;
33440   *) # Relative name.
33441     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
33442     ac_top_srcdir=$ac_top_build_prefix$srcdir
33443     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
33444 esac
33445 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
33446 
33447 
33448   case $ac_mode in
33449   :F)
33450   #
33451   # CONFIG_FILE
33452   #
33453 
33454 _ACEOF
33455 
33456 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33457 # If the template does not know about datarootdir, expand it.
33458 # FIXME: This hack should be removed a few years after 2.60.
33459 ac_datarootdir_hack=; ac_datarootdir_seen=
33460 ac_sed_dataroot='
33461 /datarootdir/ {
33462   p
33463   q
33464 }
33465 /@datadir@/p
33466 /@docdir@/p
33467 /@infodir@/p
33468 /@localedir@/p
33469 /@mandir@/p'
33470 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
33471 *datarootdir*) ac_datarootdir_seen=yes;;
33472 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
33473   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
33474 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
33475 _ACEOF
33476 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33477   ac_datarootdir_hack='
33478   s&@datadir@&$datadir&g
33479   s&@docdir@&$docdir&g
33480   s&@infodir@&$infodir&g
33481   s&@localedir@&$localedir&g
33482   s&@mandir@&$mandir&g
33483   s&\\\${datarootdir}&$datarootdir&g' ;;
33484 esac
33485 _ACEOF
33486 
33487 # Neutralize VPATH when `$srcdir' = `.'.
33488 # Shell code in configure.ac might set extrasub.
33489 # FIXME: do we really want to maintain this feature?
33490 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33491 ac_sed_extra="$ac_vpsub
33492 $extrasub
33493 _ACEOF
33494 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33495 :t
33496 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
33497 s|@configure_input@|$ac_sed_conf_input|;t t
33498 s&@top_builddir@&$ac_top_builddir_sub&;t t
33499 s&@top_build_prefix@&$ac_top_build_prefix&;t t
33500 s&@srcdir@&$ac_srcdir&;t t
33501 s&@abs_srcdir@&$ac_abs_srcdir&;t t
33502 s&@top_srcdir@&$ac_top_srcdir&;t t
33503 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
33504 s&@builddir@&$ac_builddir&;t t
33505 s&@abs_builddir@&$ac_abs_builddir&;t t
33506 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
33507 $ac_datarootdir_hack
33508 "
33509 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
33510   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
33511 
33512 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
33513   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
33514   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
33515       "$ac_tmp/out"`; test -z "$ac_out"; } &&
33516   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
33517 which seems to be undefined.  Please make sure it is defined" >&5
33518 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
33519 which seems to be undefined.  Please make sure it is defined" >&2;}
33520 
33521   rm -f "$ac_tmp/stdin"
33522   case $ac_file in
33523   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
33524   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
33525   esac \
33526   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
33527  ;;
33528   :H)
33529   #
33530   # CONFIG_HEADER
33531   #
33532   if test x"$ac_file" != x-; then
33533     {
33534       $as_echo "/* $configure_input  */" \
33535       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
33536     } >"$ac_tmp/config.h" \
33537       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
33538     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
33539       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
33540 $as_echo "$as_me: $ac_file is unchanged" >&6;}
33541     else
33542       rm -f "$ac_file"
33543       mv "$ac_tmp/config.h" "$ac_file" \
33544         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
33545     fi
33546   else
33547     $as_echo "/* $configure_input  */" \
33548       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
33549       || as_fn_error $? "could not create -" "$LINENO" 5
33550   fi
33551  ;;
33552 
33553 
33554   esac
33555 
33556 done # for ac_tag
33557 
33558 
33559 as_fn_exit 0
33560 _ACEOF
33561 ac_clean_files=$ac_clean_files_save
33562 
33563 test $ac_write_fail = 0 ||
33564   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
33565 
33566 
33567 # configure is writing to config.log, and then calls config.status.
33568 # config.status does its own redirection, appending to config.log.
33569 # Unfortunately, on DOS this fails, as config.log is still kept open
33570 # by configure, so config.status won't be able to write to it; its
33571 # output is simply discarded.  So we exec the FD to /dev/null,
33572 # effectively closing config.log, so it can be properly (re)opened and
33573 # appended to by config.status.  When coming back to configure, we
33574 # need to make the FD available again.
33575 if test "$no_create" != yes; then
33576   ac_cs_success=:
33577   ac_config_status_args=
33578   test "$silent" = yes &&
33579     ac_config_status_args="$ac_config_status_args --quiet"
33580   exec 5>/dev/null
33581   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
33582   exec 5>>config.log
33583   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
33584   # would make configure fail if this is the last instruction.
33585   $ac_cs_success || as_fn_exit 1
33586 fi
33587 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
33588   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
33589 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
33590 fi
33591 
33592 
33593 # Make the compare script executable
33594 $CHMOD +x $OUTPUT_ROOT/compare.sh
33595 
33596 # Finally output some useful information to the user
33597 
33598 # Finally output some useful information to the user
33599 
33600 if test "x$CCACHE_FOUND" != x; then
33601         if  test "x$HAS_GOOD_CCACHE" = x; then
33602                 CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
33603                 CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
33604         else
33605                 CCACHE_STATUS="installed and in use"
33606         fi
33607 else
33608         if test "x$GCC" = xyes; then
33609                 CCACHE_STATUS="not installed (consider installing)"
33610                 CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
33611         else
33612                 CCACHE_STATUS="not available for your system"
33613         fi
33614 fi
33615 
33616 printf "\n"
33617 printf "====================================================\n"
33618 printf "A new configuration has been successfully created in\n"
33619 printf "$OUTPUT_ROOT\n"
33620 if test "x$CONFIGURE_COMMAND_LINE" != x; then
33621         printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
33622 else
33623         printf "using default settings.\n"
33624 fi
33625 
33626 printf "\n"
33627 printf "Configuration summary:\n"
33628 printf "* Debug level:    $DEBUG_LEVEL\n"
33629 printf "* JDK variant:    $JDK_VARIANT\n"
33630 printf "* JVM variants:   $with_jvm_variants\n"
33631 printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
33632 
33633 printf "\n"
33634 printf "Tools summary:\n"
33635 if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
33636   printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
33637 fi
33638 printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
33639 printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
33640 printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
33641 
33642 printf "\n"
33643 printf "Build performance summary:\n"
33644 printf "* Cores to use:   $JOBS\n"
33645 printf "* Memory limit:   $MEMORY_SIZE MB\n"
33646 printf "* ccache status:  $CCACHE_STATUS\n"
33647 printf "\n"
33648 
33649 if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
33650         printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
33651         printf "$CCACHE_HELP_MSG\n"
33652 
33653     # Print a helpful message on how to acquire the necessary build dependency.
33654     # ccache is the help tag: freetyp2, cups, pulse, alsa etc
33655     MISSING_DEPENDENCY=ccache
33656     PKGHANDLER_COMMAND=
33657 
33658     case $PKGHANDLER in
33659         apt-get)
33660                 apt_help     $MISSING_DEPENDENCY ;;
33661     yum)
33662                 yum_help     $MISSING_DEPENDENCY ;;
33663         port)
33664                 port_help    $MISSING_DEPENDENCY ;;
33665         pkgutil)
33666                 pkgutil_help $MISSING_DEPENDENCY ;;
33667         pkgadd)
33668                 pkgadd_help  $MISSING_DEPENDENCY ;;
33669     * )
33670       break ;;
33671     esac
33672 
33673     if test "x$PKGHANDLER_COMMAND" != x; then
33674         HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33675     fi
33676 
33677         printf "$HELP_MSG\n"
33678         printf "\n"
33679 fi
33680 
33681 if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
33682         printf "NOTE: You have requested to build more than one version of the JVM, which\n"
33683         printf "will result in longer build times.\n"
33684         printf "\n"
33685 fi
33686 
33687 if test "x$FOUND_ALT_VARIABLES" != "x"; then
33688         printf "WARNING: You have old-style ALT_ environment variables set.\n"
33689         printf "These are not respected, and will be ignored. It is recommended\n"
33690         printf "that you clean your environment. The following variables are set:\n"
33691         printf "$FOUND_ALT_VARIABLES\n"
33692         printf "\n"
33693 fi
33694 
33695 if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
33696         printf "WARNING: Your build output directory is not on a local disk.\n"
33697         printf "This will severely degrade build performance!\n"
33698         printf "It is recommended that you create an output directory on a local disk,\n"
33699         printf "and run the configure script again from that directory.\n"
33700         printf "\n"
33701 fi
33702 
33703 if test "x$IS_RECONFIGURE" = "xyes"; then
33704         printf "WARNING: The result of this configuration has overridden an older\n"
33705         printf "configuration. You *should* run 'make clean' to make sure you get a\n"
33706         printf "proper build. Failure to do so might result in strange build problems.\n"
33707         printf "\n"
33708 fi
33709