1 #! /bin/sh
   2 # Guess values for system-dependent variables and create Makefiles.
   3 # Generated by GNU Autoconf 2.67 for OpenJDK jdk8.
   4 #
   5 # Report bugs to <build-dev@openjdk.java.net>.
   6 #
   7 #
   8 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
   9 # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
  10 # Foundation, Inc.
  11 #
  12 #
  13 # This configure script is free software; the Free Software Foundation
  14 # gives unlimited permission to copy, distribute and modify it.
  15 ## -------------------- ##
  16 ## M4sh Initialization. ##
  17 ## -------------------- ##
  18 
  19 # Be more Bourne compatible
  20 DUALCASE=1; export DUALCASE # for MKS sh
  21 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
  22   emulate sh
  23   NULLCMD=:
  24   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
  25   # is contrary to our usage.  Disable this feature.
  26   alias -g '${1+"$@"}'='"$@"'
  27   setopt NO_GLOB_SUBST
  28 else
  29   case `(set -o) 2>/dev/null` in #(
  30   *posix*) :
  31     set -o posix ;; #(
  32   *) :
  33      ;;
  34 esac
  35 fi
  36 
  37 
  38 as_nl='
  39 '
  40 export as_nl
  41 # Printing a long string crashes Solaris 7 /usr/bin/printf.
  42 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
  43 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
  44 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
  45 # Prefer a ksh shell builtin over an external printf program on Solaris,
  46 # but without wasting forks for bash or zsh.
  47 if test -z "$BASH_VERSION$ZSH_VERSION" \
  48     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
  49   as_echo='print -r --'
  50   as_echo_n='print -rn --'
  51 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
  52   as_echo='printf %s\n'
  53   as_echo_n='printf %s'
  54 else
  55   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
  56     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
  57     as_echo_n='/usr/ucb/echo -n'
  58   else
  59     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
  60     as_echo_n_body='eval
  61       arg=$1;
  62       case $arg in #(
  63       *"$as_nl"*)
  64         expr "X$arg" : "X\\(.*\\)$as_nl";
  65         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
  66       esac;
  67       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
  68     '
  69     export as_echo_n_body
  70     as_echo_n='sh -c $as_echo_n_body as_echo'
  71   fi
  72   export as_echo_body
  73   as_echo='sh -c $as_echo_body as_echo'
  74 fi
  75 
  76 # The user is always right.
  77 if test "${PATH_SEPARATOR+set}" != set; then
  78   PATH_SEPARATOR=:
  79   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
  80     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
  81       PATH_SEPARATOR=';'
  82   }
  83 fi
  84 
  85 
  86 # IFS
  87 # We need space, tab and new line, in precisely that order.  Quoting is
  88 # there to prevent editors from complaining about space-tab.
  89 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
  90 # splitting by setting IFS to empty value.)
  91 IFS=" ""        $as_nl"
  92 
  93 # Find who we are.  Look in the path if we contain no directory separator.
  94 case $0 in #((
  95   *[\\/]* ) as_myself=$0 ;;
  96   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  97 for as_dir in $PATH
  98 do
  99   IFS=$as_save_IFS
 100   test -z "$as_dir" && as_dir=.
 101     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
 102   done
 103 IFS=$as_save_IFS
 104 
 105      ;;
 106 esac
 107 # We did not find ourselves, most probably we were run as `sh COMMAND'
 108 # in which case we are not to be found in the path.
 109 if test "x$as_myself" = x; then
 110   as_myself=$0
 111 fi
 112 if test ! -f "$as_myself"; then
 113   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
 114   exit 1
 115 fi
 116 
 117 # Unset variables that we do not need and which cause bugs (e.g. in
 118 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
 119 # suppresses any "Segmentation fault" message there.  '((' could
 120 # trigger a bug in pdksh 5.2.14.
 121 for as_var in BASH_ENV ENV MAIL MAILPATH
 122 do eval test x\${$as_var+set} = xset \
 123   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
 124 done
 125 PS1='$ '
 126 PS2='> '
 127 PS4='+ '
 128 
 129 # NLS nuisances.
 130 LC_ALL=C
 131 export LC_ALL
 132 LANGUAGE=C
 133 export LANGUAGE
 134 
 135 # CDPATH.
 136 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 137 
 138 if test "x$CONFIG_SHELL" = x; then
 139   as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
 140   emulate sh
 141   NULLCMD=:
 142   # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
 143   # is contrary to our usage.  Disable this feature.
 144   alias -g '\${1+\"\$@\"}'='\"\$@\"'
 145   setopt NO_GLOB_SUBST
 146 else
 147   case \`(set -o) 2>/dev/null\` in #(
 148   *posix*) :
 149     set -o posix ;; #(
 150   *) :
 151      ;;
 152 esac
 153 fi
 154 "
 155   as_required="as_fn_return () { (exit \$1); }
 156 as_fn_success () { as_fn_return 0; }
 157 as_fn_failure () { as_fn_return 1; }
 158 as_fn_ret_success () { return 0; }
 159 as_fn_ret_failure () { return 1; }
 160 
 161 exitcode=0
 162 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
 163 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
 164 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
 165 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
 166 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
 167 
 168 else
 169   exitcode=1; echo positional parameters were not saved.
 170 fi
 171 test x\$exitcode = x0 || exit 1"
 172   as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
 173   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
 174   eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
 175   test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
 176 test \$(( 1 + 1 )) = 2 || exit 1"
 177   if (eval "$as_required") 2>/dev/null; then :
 178   as_have_required=yes
 179 else
 180   as_have_required=no
 181 fi
 182   if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
 183 
 184 else
 185   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 186 as_found=false
 187 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
 188 do
 189   IFS=$as_save_IFS
 190   test -z "$as_dir" && as_dir=.
 191   as_found=:
 192   case $as_dir in #(
 193          /*)
 194            for as_base in sh bash ksh sh5; do
 195              # Try only shells that exist, to save several forks.
 196              as_shell=$as_dir/$as_base
 197              if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
 198                     { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
 199   CONFIG_SHELL=$as_shell as_have_required=yes
 200                    if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
 201   break 2
 202 fi
 203 fi
 204            done;;
 205        esac
 206   as_found=false
 207 done
 208 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
 209               { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
 210   CONFIG_SHELL=$SHELL as_have_required=yes
 211 fi; }
 212 IFS=$as_save_IFS
 213 
 214 
 215       if test "x$CONFIG_SHELL" != x; then :
 216   # We cannot yet assume a decent shell, so we have to provide a
 217         # neutralization value for shells without unset; and this also
 218         # works around shells that cannot unset nonexistent variables.
 219         BASH_ENV=/dev/null
 220         ENV=/dev/null
 221         (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
 222         export CONFIG_SHELL
 223         exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
 224 fi
 225 
 226     if test x$as_have_required = xno; then :
 227   $as_echo "$0: This script requires a shell more modern than all"
 228   $as_echo "$0: the shells that I found on your system."
 229   if test x${ZSH_VERSION+set} = xset ; then
 230     $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
 231     $as_echo "$0: be upgraded to zsh 4.3.4 or later."
 232   else
 233     $as_echo "$0: Please tell bug-autoconf@gnu.org and
 234 $0: build-dev@openjdk.java.net about your system, including
 235 $0: any error possibly output before this message. Then
 236 $0: install a modern shell, or manually run the script
 237 $0: under such a shell if you do have one."
 238   fi
 239   exit 1
 240 fi
 241 fi
 242 fi
 243 SHELL=${CONFIG_SHELL-/bin/sh}
 244 export SHELL
 245 # Unset more variables known to interfere with behavior of common tools.
 246 CLICOLOR_FORCE= GREP_OPTIONS=
 247 unset CLICOLOR_FORCE GREP_OPTIONS
 248 
 249 ## --------------------- ##
 250 ## M4sh Shell Functions. ##
 251 ## --------------------- ##
 252 # as_fn_unset VAR
 253 # ---------------
 254 # Portably unset VAR.
 255 as_fn_unset ()
 256 {
 257   { eval $1=; unset $1;}
 258 }
 259 as_unset=as_fn_unset
 260 
 261 # as_fn_set_status STATUS
 262 # -----------------------
 263 # Set $? to STATUS, without forking.
 264 as_fn_set_status ()
 265 {
 266   return $1
 267 } # as_fn_set_status
 268 
 269 # as_fn_exit STATUS
 270 # -----------------
 271 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
 272 as_fn_exit ()
 273 {
 274   set +e
 275   as_fn_set_status $1
 276   exit $1
 277 } # as_fn_exit
 278 
 279 # as_fn_mkdir_p
 280 # -------------
 281 # Create "$as_dir" as a directory, including parents if necessary.
 282 as_fn_mkdir_p ()
 283 {
 284 
 285   case $as_dir in #(
 286   -*) as_dir=./$as_dir;;
 287   esac
 288   test -d "$as_dir" || eval $as_mkdir_p || {
 289     as_dirs=
 290     while :; do
 291       case $as_dir in #(
 292       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
 293       *) as_qdir=$as_dir;;
 294       esac
 295       as_dirs="'$as_qdir' $as_dirs"
 296       as_dir=`$as_dirname -- "$as_dir" ||
 297 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
 298          X"$as_dir" : 'X\(//\)[^/]' \| \
 299          X"$as_dir" : 'X\(//\)$' \| \
 300          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
 301 $as_echo X"$as_dir" |
 302     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
 303             s//\1/
 304             q
 305           }
 306           /^X\(\/\/\)[^/].*/{
 307             s//\1/
 308             q
 309           }
 310           /^X\(\/\/\)$/{
 311             s//\1/
 312             q
 313           }
 314           /^X\(\/\).*/{
 315             s//\1/
 316             q
 317           }
 318           s/.*/./; q'`
 319       test -d "$as_dir" && break
 320     done
 321     test -z "$as_dirs" || eval "mkdir $as_dirs"
 322   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
 323 
 324 
 325 } # as_fn_mkdir_p
 326 # as_fn_append VAR VALUE
 327 # ----------------------
 328 # Append the text in VALUE to the end of the definition contained in VAR. Take
 329 # advantage of any shell optimizations that allow amortized linear growth over
 330 # repeated appends, instead of the typical quadratic growth present in naive
 331 # implementations.
 332 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
 333   eval 'as_fn_append ()
 334   {
 335     eval $1+=\$2
 336   }'
 337 else
 338   as_fn_append ()
 339   {
 340     eval $1=\$$1\$2
 341   }
 342 fi # as_fn_append
 343 
 344 # as_fn_arith ARG...
 345 # ------------------
 346 # Perform arithmetic evaluation on the ARGs, and store the result in the
 347 # global $as_val. Take advantage of shells that can avoid forks. The arguments
 348 # must be portable across $(()) and expr.
 349 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
 350   eval 'as_fn_arith ()
 351   {
 352     as_val=$(( $* ))
 353   }'
 354 else
 355   as_fn_arith ()
 356   {
 357     as_val=`expr "$@" || test $? -eq 1`
 358   }
 359 fi # as_fn_arith
 360 
 361 
 362 # as_fn_error STATUS ERROR [LINENO LOG_FD]
 363 # ----------------------------------------
 364 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
 365 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
 366 # script with STATUS, using 1 if that was 0.
 367 as_fn_error ()
 368 {
 369   as_status=$1; test $as_status -eq 0 && as_status=1
 370   if test "$4"; then
 371     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
 372     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
 373   fi
 374   $as_echo "$as_me: error: $2" >&2
 375   as_fn_exit $as_status
 376 } # as_fn_error
 377 
 378 if expr a : '\(a\)' >/dev/null 2>&1 &&
 379    test "X`expr 00001 : '.*\(...\)'`" = X001; then
 380   as_expr=expr
 381 else
 382   as_expr=false
 383 fi
 384 
 385 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
 386   as_basename=basename
 387 else
 388   as_basename=false
 389 fi
 390 
 391 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
 392   as_dirname=dirname
 393 else
 394   as_dirname=false
 395 fi
 396 
 397 as_me=`$as_basename -- "$0" ||
 398 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
 399          X"$0" : 'X\(//\)$' \| \
 400          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
 401 $as_echo X/"$0" |
 402     sed '/^.*\/\([^/][^/]*\)\/*$/{
 403             s//\1/
 404             q
 405           }
 406           /^X\/\(\/\/\)$/{
 407             s//\1/
 408             q
 409           }
 410           /^X\/\(\/\).*/{
 411             s//\1/
 412             q
 413           }
 414           s/.*/./; q'`
 415 
 416 # Avoid depending upon Character Ranges.
 417 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
 418 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
 419 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
 420 as_cr_digits='0123456789'
 421 as_cr_alnum=$as_cr_Letters$as_cr_digits
 422 
 423 
 424   as_lineno_1=$LINENO as_lineno_1a=$LINENO
 425   as_lineno_2=$LINENO as_lineno_2a=$LINENO
 426   eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
 427   test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
 428   # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
 429   sed -n '
 430     p
 431     /[$]LINENO/=
 432   ' <$as_myself |
 433     sed '
 434       s/[$]LINENO.*/&-/
 435       t lineno
 436       b
 437       :lineno
 438       N
 439       :loop
 440       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
 441       t loop
 442       s/-\n.*//
 443     ' >$as_me.lineno &&
 444   chmod +x "$as_me.lineno" ||
 445     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
 446 
 447   # Don't try to exec as it changes $[0], causing all sort of problems
 448   # (the dirname of $[0] is not the place where we might find the
 449   # original and so on.  Autoconf is especially sensitive to this).
 450   . "./$as_me.lineno"
 451   # Exit status is that of the last command.
 452   exit
 453 }
 454 
 455 ECHO_C= ECHO_N= ECHO_T=
 456 case `echo -n x` in #(((((
 457 -n*)
 458   case `echo 'xy\c'` in
 459   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
 460   xy)  ECHO_C='\c';;
 461   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
 462        ECHO_T=' ';;
 463   esac;;
 464 *)
 465   ECHO_N='-n';;
 466 esac
 467 
 468 rm -f conf$$ conf$$.exe conf$$.file
 469 if test -d conf$$.dir; then
 470   rm -f conf$$.dir/conf$$.file
 471 else
 472   rm -f conf$$.dir
 473   mkdir conf$$.dir 2>/dev/null
 474 fi
 475 if (echo >conf$$.file) 2>/dev/null; then
 476   if ln -s conf$$.file conf$$ 2>/dev/null; then
 477     as_ln_s='ln -s'
 478     # ... but there are two gotchas:
 479     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
 480     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
 481     # In both cases, we have to default to `cp -p'.
 482     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
 483       as_ln_s='cp -p'
 484   elif ln conf$$.file conf$$ 2>/dev/null; then
 485     as_ln_s=ln
 486   else
 487     as_ln_s='cp -p'
 488   fi
 489 else
 490   as_ln_s='cp -p'
 491 fi
 492 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
 493 rmdir conf$$.dir 2>/dev/null
 494 
 495 if mkdir -p . 2>/dev/null; then
 496   as_mkdir_p='mkdir -p "$as_dir"'
 497 else
 498   test -d ./-p && rmdir ./-p
 499   as_mkdir_p=false
 500 fi
 501 
 502 if test -x / >/dev/null 2>&1; then
 503   as_test_x='test -x'
 504 else
 505   if ls -dL / >/dev/null 2>&1; then
 506     as_ls_L_option=L
 507   else
 508     as_ls_L_option=
 509   fi
 510   as_test_x='
 511     eval sh -c '\''
 512       if test -d "$1"; then
 513         test -d "$1/.";
 514       else
 515         case $1 in #(
 516         -*)set "./$1";;
 517         esac;
 518         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
 519         ???[sx]*):;;*)false;;esac;fi
 520     '\'' sh
 521   '
 522 fi
 523 as_executable_p=$as_test_x
 524 
 525 # Sed expression to map a string onto a valid CPP name.
 526 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
 527 
 528 # Sed expression to map a string onto a valid variable name.
 529 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
 530 
 531 
 532 test -n "$DJDIR" || exec 7<&0 </dev/null
 533 exec 6>&1
 534 
 535 # Name of the host.
 536 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
 537 # so uname gets run too.
 538 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
 539 
 540 #
 541 # Initializations.
 542 #
 543 ac_default_prefix=/usr/local
 544 ac_clean_files=
 545 ac_config_libobj_dir=.
 546 LIBOBJS=
 547 cross_compiling=no
 548 subdirs=
 549 MFLAGS=
 550 MAKEFLAGS=
 551 
 552 # Identity of this package.
 553 PACKAGE_NAME='OpenJDK'
 554 PACKAGE_TARNAME='openjdk'
 555 PACKAGE_VERSION='jdk8'
 556 PACKAGE_STRING='OpenJDK jdk8'
 557 PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
 558 PACKAGE_URL='http://openjdk.java.net'
 559 
 560 # Factoring default headers for most tests.
 561 ac_includes_default="\
 562 #include <stdio.h>
 563 #ifdef HAVE_SYS_TYPES_H
 564 # include <sys/types.h>
 565 #endif
 566 #ifdef HAVE_SYS_STAT_H
 567 # include <sys/stat.h>
 568 #endif
 569 #ifdef STDC_HEADERS
 570 # include <stdlib.h>
 571 # include <stddef.h>
 572 #else
 573 # ifdef HAVE_STDLIB_H
 574 #  include <stdlib.h>
 575 # endif
 576 #endif
 577 #ifdef HAVE_STRING_H
 578 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
 579 #  include <memory.h>
 580 # endif
 581 # include <string.h>
 582 #endif
 583 #ifdef HAVE_STRINGS_H
 584 # include <strings.h>
 585 #endif
 586 #ifdef HAVE_INTTYPES_H
 587 # include <inttypes.h>
 588 #endif
 589 #ifdef HAVE_STDINT_H
 590 # include <stdint.h>
 591 #endif
 592 #ifdef HAVE_UNISTD_H
 593 # include <unistd.h>
 594 #endif"
 595 
 596 ac_subst_vars='LTLIBOBJS
 597 LIBOBJS
 598 USE_PRECOMPILED_HEADER
 599 CCACHE
 600 SJAVAC_SERVER_DIR
 601 ENABLE_SJAVAC
 602 SJAVAC_SERVER_CORES
 603 SJAVAC_SERVER_JAVA
 604 JOBS
 605 MEMORY_SIZE
 606 NUM_CORES
 607 ENABLE_INTREE_EC
 608 SALIB_NAME
 609 HOTSPOT_MAKE_ARGS
 610 FIXPATH
 611 LIBCXX
 612 LLVM_LIBS
 613 LLVM_LDFLAGS
 614 LLVM_CFLAGS
 615 LLVM_CONFIG
 616 LIBFFI_LIBS
 617 LIBFFI_CFLAGS
 618 STATIC_CXX_SETTING
 619 LIBDL
 620 LIBM
 621 LIBZIP_CAN_USE_MMAP
 622 USE_EXTERNAL_LIBZ
 623 USE_EXTERNAL_LIBGIF
 624 USE_EXTERNAL_LIBJPEG
 625 ALSA_LIBS
 626 ALSA_CFLAGS
 627 FREETYPE2_LIB_PATH
 628 USING_SYSTEM_FT_LIB
 629 FREETYPE2_LIBS
 630 FREETYPE2_CFLAGS
 631 CUPS_CFLAGS
 632 OPENWIN_HOME
 633 X_EXTRA_LIBS
 634 X_LIBS
 635 X_PRE_LIBS
 636 X_CFLAGS
 637 XMKMF
 638 CXXFLAGS_DEBUG_SYMBOLS
 639 CFLAGS_DEBUG_SYMBOLS
 640 ZIP_DEBUGINFO_FILES
 641 ENABLE_DEBUG_SYMBOLS
 642 COMPILER_SUPPORTS_TARGET_BITS_FLAG
 643 ZERO_ARCHFLAG
 644 LDFLAGS_CXX_JDK
 645 LDFLAGS_JDKEXE_SUFFIX
 646 LDFLAGS_JDKLIB_SUFFIX
 647 LDFLAGS_JDKEXE
 648 LDFLAGS_JDKLIB
 649 CXXFLAGS_JDKEXE
 650 CXXFLAGS_JDKLIB
 651 CFLAGS_JDKEXE
 652 CFLAGS_JDKLIB
 653 MACOSX_VERSION_MIN
 654 PACKAGE_PATH
 655 LEGACY_EXTRA_LDFLAGS
 656 LEGACY_EXTRA_CXXFLAGS
 657 LEGACY_EXTRA_CFLAGS
 658 CXX_FLAG_DEPS
 659 C_FLAG_DEPS
 660 CXX_O_FLAG_NONE
 661 CXX_O_FLAG_NORM
 662 CXX_O_FLAG_HI
 663 CXX_O_FLAG_HIGHEST
 664 C_O_FLAG_NONE
 665 C_O_FLAG_NORM
 666 C_O_FLAG_HI
 667 C_O_FLAG_HIGHEST
 668 POST_MCS_CMD
 669 POST_STRIP_CMD
 670 SET_EXECUTABLE_ORIGIN
 671 SET_SHARED_LIBRARY_ORIGIN
 672 CXX_FLAG_REORDER
 673 C_FLAG_REORDER
 674 SET_SHARED_LIBRARY_MAPFILE
 675 SET_SHARED_LIBRARY_NAME
 676 SHARED_LIBRARY_FLAGS
 677 EXE_SUFFIX
 678 STATIC_LIBRARY_SUFFIX
 679 SHARED_LIBRARY_SUFFIX
 680 LIBRARY_PREFIX
 681 STATIC_LIBRARY
 682 SHARED_LIBRARY
 683 OBJ_SUFFIX
 684 COMPILER_NAME
 685 LIPO
 686 ac_ct_OBJDUMP
 687 OBJDUMP
 688 ac_ct_OBJCOPY
 689 OBJCOPY
 690 MCS
 691 STRIP
 692 GNM
 693 NM
 694 AS
 695 CXXCPP
 696 CPP
 697 COMPILER_TYPE
 698 RC_FLAGS
 699 DUMPBIN
 700 WINAR
 701 HOTSPOT_RC
 702 HOTSPOT_MT
 703 RC
 704 MT
 705 WINLD
 706 HOTSPOT_LD
 707 HOTSPOT_CXX
 708 ARFLAGS
 709 AR
 710 LDEXECXX
 711 LDCXX
 712 LDEXE
 713 LD
 714 ac_ct_OBJC
 715 OBJCFLAGS
 716 OBJC
 717 ac_ct_CXX
 718 CXXFLAGS
 719 CXX
 720 ac_ct_PROPER_COMPILER_CXX
 721 PROPER_COMPILER_CXX
 722 POTENTIAL_CXX
 723 TOOLS_DIR_CXX
 724 OBJEXT
 725 EXEEXT
 726 ac_ct_CC
 727 CPPFLAGS
 728 LDFLAGS
 729 CFLAGS
 730 CC
 731 ac_ct_PROPER_COMPILER_CC
 732 PROPER_COMPILER_CC
 733 POTENTIAL_CC
 734 TOOLS_DIR_CC
 735 BUILD_LD
 736 BUILD_CXX
 737 BUILD_CC
 738 MSVCR_DLL
 739 DXSDK_INCLUDE_PATH
 740 DXSDK_LIB_PATH
 741 VS_PATH
 742 VS_LIB
 743 VS_INCLUDE
 744 CYGWIN_LINK
 745 AR_OUT_OPTION
 746 LD_OUT_OPTION
 747 EXE_OUT_OPTION
 748 CC_OUT_OPTION
 749 BUILD_HOTSPOT
 750 HOTSPOT_DIST
 751 BUILD_OUTPUT
 752 OVERRIDE_SRC_ROOT
 753 ADD_SRC_ROOT
 754 JDK_TOPDIR
 755 NASHORN_TOPDIR
 756 HOTSPOT_TOPDIR
 757 JAXWS_TOPDIR
 758 JAXP_TOPDIR
 759 CORBA_TOPDIR
 760 LANGTOOLS_TOPDIR
 761 BOOT_JDK_JVMARGS
 762 JAVAC_FLAGS
 763 BOOT_JDK_SOURCETARGET
 764 BOOT_JDK
 765 BOOT_TOOLSJAR
 766 BOOT_RTJAR
 767 JAVA_CHECK
 768 JAVAC_CHECK
 769 COOKED_BUILD_NUMBER
 770 JDK_VERSION
 771 COPYRIGHT_YEAR
 772 MACOSX_BUNDLE_ID_BASE
 773 MACOSX_BUNDLE_NAME_BASE
 774 COMPANY_NAME
 775 JDK_RC_PLATFORM_NAME
 776 PRODUCT_SUFFIX
 777 PRODUCT_NAME
 778 LAUNCHER_NAME
 779 MILESTONE
 780 JDK_BUILD_NUMBER
 781 JDK_UPDATE_VERSION
 782 JDK_MICRO_VERSION
 783 JDK_MINOR_VERSION
 784 JDK_MAJOR_VERSION
 785 USER_RELEASE_SUFFIX
 786 COMPRESS_JARS
 787 UNLIMITED_CRYPTO
 788 CACERTS_FILE
 789 TEST_IN_BUILD
 790 BUILD_HEADLESS
 791 SUPPORT_HEADFUL
 792 SUPPORT_HEADLESS
 793 BDEPS_FTP
 794 BDEPS_UNZIP
 795 OS_VERSION_MICRO
 796 OS_VERSION_MINOR
 797 OS_VERSION_MAJOR
 798 PKG_CONFIG
 799 XATTR
 800 TIME
 801 STAT
 802 HG
 803 READELF
 804 OTOOL
 805 LDD
 806 ZIP
 807 UNZIP
 808 FIND_DELETE
 809 MAKE
 810 CHECK_TOOLSDIR_MAKE
 811 CHECK_TOOLSDIR_GMAKE
 812 CHECK_MAKE
 813 CHECK_GMAKE
 814 PKGHANDLER
 815 OUTPUT_ROOT
 816 CONF_NAME
 817 SPEC
 818 BUILD_VARIANT_RELEASE
 819 DEBUG_CLASSFILES
 820 FASTDEBUG
 821 VARIANT
 822 DEBUG_LEVEL
 823 MACOSX_UNIVERSAL
 824 INCLUDE_SA
 825 JVM_VARIANT_ZEROSHARK
 826 JVM_VARIANT_ZERO
 827 JVM_VARIANT_KERNEL
 828 JVM_VARIANT_MINIMAL1
 829 JVM_VARIANT_CLIENT
 830 JVM_VARIANT_SERVER
 831 JVM_VARIANTS
 832 JDK_VARIANT
 833 SET_OPENJDK
 834 BUILD_LOG_WRAPPER
 835 BUILD_LOG_PREVIOUS
 836 BUILD_LOG
 837 SYS_ROOT
 838 PATH_SEP
 839 SRC_ROOT
 840 ZERO_ARCHDEF
 841 DEFINE_CROSS_COMPILE_ARCH
 842 LP64
 843 OPENJDK_TARGET_OS_API_DIR
 844 OPENJDK_TARGET_CPU_JLI_CFLAGS
 845 OPENJDK_TARGET_CPU_OSARCH
 846 OPENJDK_TARGET_CPU_ISADIR
 847 OPENJDK_TARGET_CPU_LIBDIR
 848 OPENJDK_TARGET_CPU_LEGACY_LIB
 849 OPENJDK_TARGET_CPU_LEGACY
 850 REQUIRED_OS_VERSION
 851 REQUIRED_OS_NAME
 852 COMPILE_TYPE
 853 OPENJDK_TARGET_CPU_ENDIAN
 854 OPENJDK_TARGET_CPU_BITS
 855 OPENJDK_TARGET_CPU_ARCH
 856 OPENJDK_TARGET_CPU
 857 OPENJDK_TARGET_OS_API
 858 OPENJDK_TARGET_OS
 859 OPENJDK_BUILD_CPU_ENDIAN
 860 OPENJDK_BUILD_CPU_BITS
 861 OPENJDK_BUILD_CPU_ARCH
 862 OPENJDK_BUILD_CPU
 863 OPENJDK_BUILD_OS_API
 864 OPENJDK_BUILD_OS
 865 OPENJDK_BUILD_AUTOCONF_NAME
 866 OPENJDK_TARGET_AUTOCONF_NAME
 867 target_os
 868 target_vendor
 869 target_cpu
 870 target
 871 host_os
 872 host_vendor
 873 host_cpu
 874 host
 875 build_os
 876 build_vendor
 877 build_cpu
 878 build
 879 SETFILE
 880 DF
 881 READLINK
 882 CYGPATH
 883 NAWK
 884 SED
 885 FGREP
 886 EGREP
 887 GREP
 888 AWK
 889 XARGS
 890 WHICH
 891 WC
 892 UNIQ
 893 UNAME
 894 TR
 895 TOUCH
 896 TEE
 897 TAR
 898 TAIL
 899 SORT
 900 SH
 901 RM
 902 THEPWDCMD
 903 PRINTF
 904 MV
 905 MKTEMP
 906 MKDIR
 907 LS
 908 LN
 909 HEAD
 910 FIND
 911 FILE
 912 EXPR
 913 ECHO
 914 DIRNAME
 915 DIFF
 916 DATE
 917 CUT
 918 CPIO
 919 CP
 920 COMM
 921 CMP
 922 CHMOD
 923 CAT
 924 BASH
 925 BASENAME
 926 DATE_WHEN_CONFIGURED
 927 CONFIGURE_COMMAND_LINE
 928 CUSTOM_MAKE_DIR
 929 target_alias
 930 host_alias
 931 build_alias
 932 LIBS
 933 ECHO_T
 934 ECHO_N
 935 ECHO_C
 936 DEFS
 937 mandir
 938 localedir
 939 libdir
 940 psdir
 941 pdfdir
 942 dvidir
 943 htmldir
 944 infodir
 945 docdir
 946 oldincludedir
 947 includedir
 948 localstatedir
 949 sharedstatedir
 950 sysconfdir
 951 datadir
 952 datarootdir
 953 libexecdir
 954 sbindir
 955 bindir
 956 program_transform_name
 957 prefix
 958 exec_prefix
 959 PACKAGE_URL
 960 PACKAGE_BUGREPORT
 961 PACKAGE_STRING
 962 PACKAGE_VERSION
 963 PACKAGE_TARNAME
 964 PACKAGE_NAME
 965 PATH_SEPARATOR
 966 SHELL'
 967 ac_subst_files=''
 968 ac_user_opts='
 969 enable_option_checking
 970 with_custom_make_dir
 971 with_target_bits
 972 with_sys_root
 973 with_tools_dir
 974 with_devkit
 975 enable_openjdk_only
 976 with_jdk_variant
 977 with_jvm_variants
 978 enable_debug
 979 with_debug_level
 980 with_conf_name
 981 with_builddeps_conf
 982 with_builddeps_server
 983 with_builddeps_dir
 984 with_builddeps_group
 985 enable_headful
 986 enable_hotspot_test_in_build
 987 with_cacerts_file
 988 enable_unlimited_crypto
 989 with_milestone
 990 with_build_number
 991 with_user_release_suffix
 992 with_boot_jdk
 993 with_boot_jdk_jvmargs
 994 with_add_source_root
 995 with_override_source_root
 996 with_adds_and_overrides
 997 with_override_langtools
 998 with_override_corba
 999 with_override_jaxp
1000 with_override_jaxws
1001 with_override_hotspot
1002 with_override_jdk
1003 with_import_hotspot
1004 with_msvcr_dll
1005 with_dxsdk
1006 with_dxsdk_lib
1007 with_dxsdk_include
1008 with_extra_cflags
1009 with_extra_cxxflags
1010 with_extra_ldflags
1011 enable_debug_symbols
1012 enable_zip_debug_info
1013 enable_macosx_runtime_support
1014 with_x
1015 with_cups
1016 with_cups_include
1017 with_freetype
1018 with_alsa
1019 with_alsa_include
1020 with_alsa_lib
1021 with_giflib
1022 with_zlib
1023 with_stdc__lib
1024 with_num_cores
1025 with_memory_size
1026 with_jobs
1027 with_sjavac_server_java
1028 with_sjavac_server_cores
1029 enable_sjavac
1030 enable_ccache
1031 with_ccache_dir
1032 enable_precompiled_headers
1033 '
1034       ac_precious_vars='build_alias
1035 host_alias
1036 target_alias
1037 PKG_CONFIG
1038 CC
1039 CFLAGS
1040 LDFLAGS
1041 LIBS
1042 CPPFLAGS
1043 CXX
1044 CXXFLAGS
1045 CCC
1046 OBJC
1047 OBJCFLAGS
1048 CPP
1049 CXXCPP
1050 XMKMF
1051 FREETYPE2_CFLAGS
1052 FREETYPE2_LIBS
1053 ALSA_CFLAGS
1054 ALSA_LIBS
1055 LIBFFI_CFLAGS
1056 LIBFFI_LIBS'
1057 
1058 
1059 # Initialize some variables set by options.
1060 ac_init_help=
1061 ac_init_version=false
1062 ac_unrecognized_opts=
1063 ac_unrecognized_sep=
1064 # The variables have the same names as the options, with
1065 # dashes changed to underlines.
1066 cache_file=/dev/null
1067 exec_prefix=NONE
1068 no_create=
1069 no_recursion=
1070 prefix=NONE
1071 program_prefix=NONE
1072 program_suffix=NONE
1073 program_transform_name=s,x,x,
1074 silent=
1075 site=
1076 srcdir=
1077 verbose=
1078 x_includes=NONE
1079 x_libraries=NONE
1080 
1081 # Installation directory options.
1082 # These are left unexpanded so users can "make install exec_prefix=/foo"
1083 # and all the variables that are supposed to be based on exec_prefix
1084 # by default will actually change.
1085 # Use braces instead of parens because sh, perl, etc. also accept them.
1086 # (The list follows the same order as the GNU Coding Standards.)
1087 bindir='${exec_prefix}/bin'
1088 sbindir='${exec_prefix}/sbin'
1089 libexecdir='${exec_prefix}/libexec'
1090 datarootdir='${prefix}/share'
1091 datadir='${datarootdir}'
1092 sysconfdir='${prefix}/etc'
1093 sharedstatedir='${prefix}/com'
1094 localstatedir='${prefix}/var'
1095 includedir='${prefix}/include'
1096 oldincludedir='/usr/include'
1097 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1098 infodir='${datarootdir}/info'
1099 htmldir='${docdir}'
1100 dvidir='${docdir}'
1101 pdfdir='${docdir}'
1102 psdir='${docdir}'
1103 libdir='${exec_prefix}/lib'
1104 localedir='${datarootdir}/locale'
1105 mandir='${datarootdir}/man'
1106 
1107 ac_prev=
1108 ac_dashdash=
1109 for ac_option
1110 do
1111   # If the previous option needs an argument, assign it.
1112   if test -n "$ac_prev"; then
1113     eval $ac_prev=\$ac_option
1114     ac_prev=
1115     continue
1116   fi
1117 
1118   case $ac_option in
1119   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1120   *=)   ac_optarg= ;;
1121   *)    ac_optarg=yes ;;
1122   esac
1123 
1124   # Accept the important Cygnus configure options, so we can diagnose typos.
1125 
1126   case $ac_dashdash$ac_option in
1127   --)
1128     ac_dashdash=yes ;;
1129 
1130   -bindir | --bindir | --bindi | --bind | --bin | --bi)
1131     ac_prev=bindir ;;
1132   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1133     bindir=$ac_optarg ;;
1134 
1135   -build | --build | --buil | --bui | --bu)
1136     ac_prev=build_alias ;;
1137   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1138     build_alias=$ac_optarg ;;
1139 
1140   -cache-file | --cache-file | --cache-fil | --cache-fi \
1141   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1142     ac_prev=cache_file ;;
1143   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1144   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1145     cache_file=$ac_optarg ;;
1146 
1147   --config-cache | -C)
1148     cache_file=config.cache ;;
1149 
1150   -datadir | --datadir | --datadi | --datad)
1151     ac_prev=datadir ;;
1152   -datadir=* | --datadir=* | --datadi=* | --datad=*)
1153     datadir=$ac_optarg ;;
1154 
1155   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1156   | --dataroo | --dataro | --datar)
1157     ac_prev=datarootdir ;;
1158   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1159   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1160     datarootdir=$ac_optarg ;;
1161 
1162   -disable-* | --disable-*)
1163     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1164     # Reject names that are not valid shell variable names.
1165     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1166       as_fn_error $? "invalid feature name: $ac_useropt"
1167     ac_useropt_orig=$ac_useropt
1168     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1169     case $ac_user_opts in
1170       *"
1171 "enable_$ac_useropt"
1172 "*) ;;
1173       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1174          ac_unrecognized_sep=', ';;
1175     esac
1176     eval enable_$ac_useropt=no ;;
1177 
1178   -docdir | --docdir | --docdi | --doc | --do)
1179     ac_prev=docdir ;;
1180   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1181     docdir=$ac_optarg ;;
1182 
1183   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1184     ac_prev=dvidir ;;
1185   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1186     dvidir=$ac_optarg ;;
1187 
1188   -enable-* | --enable-*)
1189     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1190     # Reject names that are not valid shell variable names.
1191     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1192       as_fn_error $? "invalid feature name: $ac_useropt"
1193     ac_useropt_orig=$ac_useropt
1194     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1195     case $ac_user_opts in
1196       *"
1197 "enable_$ac_useropt"
1198 "*) ;;
1199       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1200          ac_unrecognized_sep=', ';;
1201     esac
1202     eval enable_$ac_useropt=\$ac_optarg ;;
1203 
1204   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1205   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1206   | --exec | --exe | --ex)
1207     ac_prev=exec_prefix ;;
1208   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1209   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1210   | --exec=* | --exe=* | --ex=*)
1211     exec_prefix=$ac_optarg ;;
1212 
1213   -gas | --gas | --ga | --g)
1214     # Obsolete; use --with-gas.
1215     with_gas=yes ;;
1216 
1217   -help | --help | --hel | --he | -h)
1218     ac_init_help=long ;;
1219   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1220     ac_init_help=recursive ;;
1221   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1222     ac_init_help=short ;;
1223 
1224   -host | --host | --hos | --ho)
1225     ac_prev=host_alias ;;
1226   -host=* | --host=* | --hos=* | --ho=*)
1227     host_alias=$ac_optarg ;;
1228 
1229   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1230     ac_prev=htmldir ;;
1231   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1232   | --ht=*)
1233     htmldir=$ac_optarg ;;
1234 
1235   -includedir | --includedir | --includedi | --included | --include \
1236   | --includ | --inclu | --incl | --inc)
1237     ac_prev=includedir ;;
1238   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1239   | --includ=* | --inclu=* | --incl=* | --inc=*)
1240     includedir=$ac_optarg ;;
1241 
1242   -infodir | --infodir | --infodi | --infod | --info | --inf)
1243     ac_prev=infodir ;;
1244   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1245     infodir=$ac_optarg ;;
1246 
1247   -libdir | --libdir | --libdi | --libd)
1248     ac_prev=libdir ;;
1249   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1250     libdir=$ac_optarg ;;
1251 
1252   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1253   | --libexe | --libex | --libe)
1254     ac_prev=libexecdir ;;
1255   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1256   | --libexe=* | --libex=* | --libe=*)
1257     libexecdir=$ac_optarg ;;
1258 
1259   -localedir | --localedir | --localedi | --localed | --locale)
1260     ac_prev=localedir ;;
1261   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1262     localedir=$ac_optarg ;;
1263 
1264   -localstatedir | --localstatedir | --localstatedi | --localstated \
1265   | --localstate | --localstat | --localsta | --localst | --locals)
1266     ac_prev=localstatedir ;;
1267   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1268   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1269     localstatedir=$ac_optarg ;;
1270 
1271   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1272     ac_prev=mandir ;;
1273   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1274     mandir=$ac_optarg ;;
1275 
1276   -nfp | --nfp | --nf)
1277     # Obsolete; use --without-fp.
1278     with_fp=no ;;
1279 
1280   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1281   | --no-cr | --no-c | -n)
1282     no_create=yes ;;
1283 
1284   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1285   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1286     no_recursion=yes ;;
1287 
1288   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1289   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1290   | --oldin | --oldi | --old | --ol | --o)
1291     ac_prev=oldincludedir ;;
1292   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1293   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1294   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1295     oldincludedir=$ac_optarg ;;
1296 
1297   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1298     ac_prev=prefix ;;
1299   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1300     prefix=$ac_optarg ;;
1301 
1302   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1303   | --program-pre | --program-pr | --program-p)
1304     ac_prev=program_prefix ;;
1305   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1306   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1307     program_prefix=$ac_optarg ;;
1308 
1309   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1310   | --program-suf | --program-su | --program-s)
1311     ac_prev=program_suffix ;;
1312   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1313   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1314     program_suffix=$ac_optarg ;;
1315 
1316   -program-transform-name | --program-transform-name \
1317   | --program-transform-nam | --program-transform-na \
1318   | --program-transform-n | --program-transform- \
1319   | --program-transform | --program-transfor \
1320   | --program-transfo | --program-transf \
1321   | --program-trans | --program-tran \
1322   | --progr-tra | --program-tr | --program-t)
1323     ac_prev=program_transform_name ;;
1324   -program-transform-name=* | --program-transform-name=* \
1325   | --program-transform-nam=* | --program-transform-na=* \
1326   | --program-transform-n=* | --program-transform-=* \
1327   | --program-transform=* | --program-transfor=* \
1328   | --program-transfo=* | --program-transf=* \
1329   | --program-trans=* | --program-tran=* \
1330   | --progr-tra=* | --program-tr=* | --program-t=*)
1331     program_transform_name=$ac_optarg ;;
1332 
1333   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1334     ac_prev=pdfdir ;;
1335   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1336     pdfdir=$ac_optarg ;;
1337 
1338   -psdir | --psdir | --psdi | --psd | --ps)
1339     ac_prev=psdir ;;
1340   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1341     psdir=$ac_optarg ;;
1342 
1343   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1344   | -silent | --silent | --silen | --sile | --sil)
1345     silent=yes ;;
1346 
1347   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1348     ac_prev=sbindir ;;
1349   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1350   | --sbi=* | --sb=*)
1351     sbindir=$ac_optarg ;;
1352 
1353   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1354   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1355   | --sharedst | --shareds | --shared | --share | --shar \
1356   | --sha | --sh)
1357     ac_prev=sharedstatedir ;;
1358   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1359   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1360   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1361   | --sha=* | --sh=*)
1362     sharedstatedir=$ac_optarg ;;
1363 
1364   -site | --site | --sit)
1365     ac_prev=site ;;
1366   -site=* | --site=* | --sit=*)
1367     site=$ac_optarg ;;
1368 
1369   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1370     ac_prev=srcdir ;;
1371   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1372     srcdir=$ac_optarg ;;
1373 
1374   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1375   | --syscon | --sysco | --sysc | --sys | --sy)
1376     ac_prev=sysconfdir ;;
1377   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1378   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1379     sysconfdir=$ac_optarg ;;
1380 
1381   -target | --target | --targe | --targ | --tar | --ta | --t)
1382     ac_prev=target_alias ;;
1383   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1384     target_alias=$ac_optarg ;;
1385 
1386   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1387     verbose=yes ;;
1388 
1389   -version | --version | --versio | --versi | --vers | -V)
1390     ac_init_version=: ;;
1391 
1392   -with-* | --with-*)
1393     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1394     # Reject names that are not valid shell variable names.
1395     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1396       as_fn_error $? "invalid package name: $ac_useropt"
1397     ac_useropt_orig=$ac_useropt
1398     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1399     case $ac_user_opts in
1400       *"
1401 "with_$ac_useropt"
1402 "*) ;;
1403       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1404          ac_unrecognized_sep=', ';;
1405     esac
1406     eval with_$ac_useropt=\$ac_optarg ;;
1407 
1408   -without-* | --without-*)
1409     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1410     # Reject names that are not valid shell variable names.
1411     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1412       as_fn_error $? "invalid package name: $ac_useropt"
1413     ac_useropt_orig=$ac_useropt
1414     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1415     case $ac_user_opts in
1416       *"
1417 "with_$ac_useropt"
1418 "*) ;;
1419       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1420          ac_unrecognized_sep=', ';;
1421     esac
1422     eval with_$ac_useropt=no ;;
1423 
1424   --x)
1425     # Obsolete; use --with-x.
1426     with_x=yes ;;
1427 
1428   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1429   | --x-incl | --x-inc | --x-in | --x-i)
1430     ac_prev=x_includes ;;
1431   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1432   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1433     x_includes=$ac_optarg ;;
1434 
1435   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1436   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1437     ac_prev=x_libraries ;;
1438   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1439   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1440     x_libraries=$ac_optarg ;;
1441 
1442   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1443 Try \`$0 --help' for more information"
1444     ;;
1445 
1446   *=*)
1447     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1448     # Reject names that are not valid shell variable names.
1449     case $ac_envvar in #(
1450       '' | [0-9]* | *[!_$as_cr_alnum]* )
1451       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1452     esac
1453     eval $ac_envvar=\$ac_optarg
1454     export $ac_envvar ;;
1455 
1456   *)
1457     # FIXME: should be removed in autoconf 3.0.
1458     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1459     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1460       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1461     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1462     ;;
1463 
1464   esac
1465 done
1466 
1467 if test -n "$ac_prev"; then
1468   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1469   as_fn_error $? "missing argument to $ac_option"
1470 fi
1471 
1472 if test -n "$ac_unrecognized_opts"; then
1473   case $enable_option_checking in
1474     no) ;;
1475     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1476     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1477   esac
1478 fi
1479 
1480 # Check all directory arguments for consistency.
1481 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1482                 datadir sysconfdir sharedstatedir localstatedir includedir \
1483                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1484                 libdir localedir mandir
1485 do
1486   eval ac_val=\$$ac_var
1487   # Remove trailing slashes.
1488   case $ac_val in
1489     */ )
1490       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1491       eval $ac_var=\$ac_val;;
1492   esac
1493   # Be sure to have absolute directory names.
1494   case $ac_val in
1495     [\\/$]* | ?:[\\/]* )  continue;;
1496     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1497   esac
1498   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1499 done
1500 
1501 # There might be people who depend on the old broken behavior: `$host'
1502 # used to hold the argument of --host etc.
1503 # FIXME: To remove some day.
1504 build=$build_alias
1505 host=$host_alias
1506 target=$target_alias
1507 
1508 # FIXME: To remove some day.
1509 if test "x$host_alias" != x; then
1510   if test "x$build_alias" = x; then
1511     cross_compiling=maybe
1512     $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1513     If a cross compiler is detected then cross compile mode will be used" >&2
1514   elif test "x$build_alias" != "x$host_alias"; then
1515     cross_compiling=yes
1516   fi
1517 fi
1518 
1519 ac_tool_prefix=
1520 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1521 
1522 test "$silent" = yes && exec 6>/dev/null
1523 
1524 
1525 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1526 ac_ls_di=`ls -di .` &&
1527 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1528   as_fn_error $? "working directory cannot be determined"
1529 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1530   as_fn_error $? "pwd does not report name of working directory"
1531 
1532 
1533 # Find the source files, if location was not specified.
1534 if test -z "$srcdir"; then
1535   ac_srcdir_defaulted=yes
1536   # Try the directory containing this script, then the parent directory.
1537   ac_confdir=`$as_dirname -- "$as_myself" ||
1538 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1539          X"$as_myself" : 'X\(//\)[^/]' \| \
1540          X"$as_myself" : 'X\(//\)$' \| \
1541          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1542 $as_echo X"$as_myself" |
1543     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1544             s//\1/
1545             q
1546           }
1547           /^X\(\/\/\)[^/].*/{
1548             s//\1/
1549             q
1550           }
1551           /^X\(\/\/\)$/{
1552             s//\1/
1553             q
1554           }
1555           /^X\(\/\).*/{
1556             s//\1/
1557             q
1558           }
1559           s/.*/./; q'`
1560   srcdir=$ac_confdir
1561   if test ! -r "$srcdir/$ac_unique_file"; then
1562     srcdir=..
1563   fi
1564 else
1565   ac_srcdir_defaulted=no
1566 fi
1567 if test ! -r "$srcdir/$ac_unique_file"; then
1568   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1569   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1570 fi
1571 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1572 ac_abs_confdir=`(
1573         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1574         pwd)`
1575 # When building in place, set srcdir=.
1576 if test "$ac_abs_confdir" = "$ac_pwd"; then
1577   srcdir=.
1578 fi
1579 # Remove unnecessary trailing slashes from srcdir.
1580 # Double slashes in file names in object file debugging info
1581 # mess up M-x gdb in Emacs.
1582 case $srcdir in
1583 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1584 esac
1585 for ac_var in $ac_precious_vars; do
1586   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1587   eval ac_env_${ac_var}_value=\$${ac_var}
1588   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1589   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1590 done
1591 
1592 #
1593 # Report the --help message.
1594 #
1595 if test "$ac_init_help" = "long"; then
1596   # Omit some internal or obsolete options to make the list less imposing.
1597   # This message is too long to be a string in the A/UX 3.1 sh.
1598   cat <<_ACEOF
1599 \`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1600 
1601 Usage: $0 [OPTION]... [VAR=VALUE]...
1602 
1603 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1604 VAR=VALUE.  See below for descriptions of some of the useful variables.
1605 
1606 Defaults for the options are specified in brackets.
1607 
1608 Configuration:
1609   -h, --help              display this help and exit
1610       --help=short        display options specific to this package
1611       --help=recursive    display the short help of all the included packages
1612   -V, --version           display version information and exit
1613   -q, --quiet, --silent   do not print \`checking ...' messages
1614       --cache-file=FILE   cache test results in FILE [disabled]
1615   -C, --config-cache      alias for \`--cache-file=config.cache'
1616   -n, --no-create         do not create output files
1617       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1618 
1619 Installation directories:
1620   --prefix=PREFIX         install architecture-independent files in PREFIX
1621                           [$ac_default_prefix]
1622   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1623                           [PREFIX]
1624 
1625 By default, \`make install' will install all the files in
1626 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1627 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1628 for instance \`--prefix=\$HOME'.
1629 
1630 For better control, use the options below.
1631 
1632 Fine tuning of the installation directories:
1633   --bindir=DIR            user executables [EPREFIX/bin]
1634   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1635   --libexecdir=DIR        program executables [EPREFIX/libexec]
1636   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1637   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1638   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1639   --libdir=DIR            object code libraries [EPREFIX/lib]
1640   --includedir=DIR        C header files [PREFIX/include]
1641   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1642   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1643   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1644   --infodir=DIR           info documentation [DATAROOTDIR/info]
1645   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1646   --mandir=DIR            man documentation [DATAROOTDIR/man]
1647   --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1648   --htmldir=DIR           html documentation [DOCDIR]
1649   --dvidir=DIR            dvi documentation [DOCDIR]
1650   --pdfdir=DIR            pdf documentation [DOCDIR]
1651   --psdir=DIR             ps documentation [DOCDIR]
1652 _ACEOF
1653 
1654   cat <<\_ACEOF
1655 
1656 X features:
1657   --x-includes=DIR    X include files are in DIR
1658   --x-libraries=DIR   X library files are in DIR
1659 
1660 System types:
1661   --build=BUILD     configure for building on BUILD [guessed]
1662   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1663   --target=TARGET   configure for building compilers for TARGET [HOST]
1664 _ACEOF
1665 fi
1666 
1667 if test -n "$ac_init_help"; then
1668   case $ac_init_help in
1669      short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1670    esac
1671   cat <<\_ACEOF
1672 
1673 Optional Features:
1674   --disable-option-checking  ignore unrecognized --enable/--with options
1675   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1676   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1677   --enable-openjdk-only   suppress building custom source even if present
1678                           [disabled]
1679   --enable-debug          set the debug level to fastdebug (shorthand for
1680                           --with-debug-level=fastdebug) [disabled]
1681   --disable-headful       disable building headful support (graphical UI
1682                           support) [enabled]
1683   --enable-hotspot-test-in-build
1684                           run the Queens test after Hotspot build [disabled]
1685   --enable-unlimited-crypto
1686                           Enable unlimited crypto policy [disabled]
1687   --disable-debug-symbols disable generation of debug symbols [enabled]
1688   --disable-zip-debug-info
1689                           disable zipping of debug-info files [enabled]
1690   --disable-macosx-runtime-support
1691                           disable the use of MacOSX Java runtime support
1692                           framework [enabled]
1693   --enable-sjavac         use sjavac to do fast incremental compiles
1694                           [disabled]
1695   --disable-ccache        disable using ccache to speed up recompilations
1696                           [enabled]
1697   --disable-precompiled-headers
1698                           disable using precompiled headers when compiling C++
1699                           [enabled]
1700 
1701 Optional Packages:
1702   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1703   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1704   --with-custom-make-dir  use this directory for custom build/make files
1705   --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1706                           support it), e.g. --with-target-bits=32 [guessed]
1707   --with-sys-root         pass this sys-root to the compilers and tools (for
1708                           cross-compiling)
1709   --with-tools-dir        search this directory for compilers and tools (for
1710                           cross-compiling)
1711   --with-devkit           use this directory as base for tools-dir and
1712                           sys-root (for cross-compiling)
1713   --with-jdk-variant      JDK variant to build (normal) [normal]
1714   --with-jvm-variants     JVM variants (separated by commas) to build (server,
1715                           client, minimal1, kernel, zero, zeroshark) [server]
1716   --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1717                           [release]
1718   --with-conf-name        use this as the name of the configuration [generated
1719                           from important configuration options]
1720   --with-builddeps-conf   use this configuration file for the builddeps
1721   --with-builddeps-server download and use build dependencies from this server
1722                           url
1723   --with-builddeps-dir    store downloaded build dependencies here
1724                           [/localhome/builddeps]
1725   --with-builddeps-group  chgrp the downloaded build dependencies to this
1726                           group
1727   --with-cacerts-file     specify alternative cacerts file
1728   --with-milestone        Set milestone value for build [internal]
1729   --with-build-number     Set build number value for build [b00]
1730   --with-user-release-suffix
1731                           Add a custom string to the version string if build
1732                           number isn't set.[username_builddateb00]
1733   --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1734   --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1735                           invocations of the Boot JDK, overriding the default
1736                           values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1737                           -enableassertions"
1738   --with-add-source-root  for each and every source directory, look in this
1739                           additional source root for the same directory; if it
1740                           exists and have files in it, include it in the build
1741   --with-override-source-root
1742                           for each and every source directory, look in this
1743                           override source root for the same directory; if it
1744                           exists, use that directory instead and ignore the
1745                           directory in the original source root
1746   --with-adds-and-overrides
1747                           use the subdirs 'adds' and 'overrides' in the
1748                           specified directory as add-source-root and
1749                           override-source-root
1750   --with-override-langtools
1751                           use this langtools dir for the build
1752   --with-override-corba   use this corba dir for the build
1753   --with-override-jaxp    use this jaxp dir for the build
1754   --with-override-jaxws   use this jaxws dir for the build
1755   --with-override-hotspot use this hotspot dir for the build
1756   --with-override-jdk     use this jdk dir for the build
1757   --with-import-hotspot   import hotspot binaries from this jdk image or
1758                           hotspot build dist dir instead of building from
1759                           source
1760   --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1761                           only) [probed]
1762   --with-dxsdk            the DirectX SDK (Windows only) [probed]
1763   --with-dxsdk-lib        the DirectX SDK lib directory (Windows only)
1764                           [probed]
1765   --with-dxsdk-include    the DirectX SDK include directory (Windows only)
1766                           [probed]
1767   --with-extra-cflags     extra flags to be used when compiling jdk c-files
1768   --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1769   --with-extra-ldflags    extra flags to be used when linking jdk
1770   --with-x                use the X Window System
1771   --with-cups             specify prefix directory for the cups package
1772                           (expecting the headers under PATH/include)
1773   --with-cups-include     specify directory for the cups include files
1774   --with-freetype         specify prefix directory for the freetype2 package
1775                           (expecting the libraries under PATH/lib and the
1776                           headers under PATH/include)
1777   --with-alsa             specify prefix directory for the alsa package
1778                           (expecting the libraries under PATH/lib and the
1779                           headers under PATH/include)
1780   --with-alsa-include     specify directory for the alsa include files
1781   --with-alsa-lib         specify directory for the alsa library
1782   --with-giflib           use giflib from build system or OpenJDK source
1783                           (system, bundled) [bundled]
1784   --with-zlib             use zlib from build system or OpenJDK source
1785                           (system, bundled) [bundled]
1786   --with-stdc++lib=<static>,<dynamic>,<default>
1787                           force linking of the C++ runtime on Linux to either
1788                           static or dynamic, default is static with dynamic as
1789                           fallback
1790   --with-num-cores        number of cores in the build system, e.g.
1791                           --with-num-cores=8 [probed]
1792   --with-memory-size      memory (in MB) available in the build system, e.g.
1793                           --with-memory-size=1024 [probed]
1794   --with-jobs             number of parallel jobs to let make run [calculated
1795                           based on cores and memory]
1796   --with-sjavac-server-java
1797                           use this java binary for running the sjavac
1798                           background server [Boot JDK java]
1799   --with-sjavac-server-cores
1800                           use at most this number of concurrent threads on the
1801                           sjavac server [probed]
1802   --with-ccache-dir       where to store ccache files [~/.ccache]
1803 
1804 Some influential environment variables:
1805   PKG_CONFIG  path to pkg-config utility
1806   CC          C compiler command
1807   CFLAGS      C compiler flags
1808   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1809               nonstandard directory <lib dir>
1810   LIBS        libraries to pass to the linker, e.g. -l<library>
1811   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1812               you have headers in a nonstandard directory <include dir>
1813   CXX         C++ compiler command
1814   CXXFLAGS    C++ compiler flags
1815   OBJC        Objective C compiler command
1816   OBJCFLAGS   Objective C compiler flags
1817   CPP         C preprocessor
1818   CXXCPP      C++ preprocessor
1819   XMKMF       Path to xmkmf, Makefile generator for X Window System
1820   FREETYPE2_CFLAGS
1821               C compiler flags for FREETYPE2, overriding pkg-config
1822   FREETYPE2_LIBS
1823               linker flags for FREETYPE2, overriding pkg-config
1824   ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1825   ALSA_LIBS   linker flags for ALSA, overriding pkg-config
1826   LIBFFI_CFLAGS
1827               C compiler flags for LIBFFI, overriding pkg-config
1828   LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
1829 
1830 Use these variables to override the choices made by `configure' or to help
1831 it to find libraries and programs with nonstandard names/locations.
1832 
1833 Report bugs to <build-dev@openjdk.java.net>.
1834 OpenJDK home page: <http://openjdk.java.net>.
1835 _ACEOF
1836 ac_status=$?
1837 fi
1838 
1839 if test "$ac_init_help" = "recursive"; then
1840   # If there are subdirs, report their specific --help.
1841   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1842     test -d "$ac_dir" ||
1843       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1844       continue
1845     ac_builddir=.
1846 
1847 case "$ac_dir" in
1848 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1849 *)
1850   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1851   # A ".." for each directory in $ac_dir_suffix.
1852   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1853   case $ac_top_builddir_sub in
1854   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1855   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1856   esac ;;
1857 esac
1858 ac_abs_top_builddir=$ac_pwd
1859 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1860 # for backward compatibility:
1861 ac_top_builddir=$ac_top_build_prefix
1862 
1863 case $srcdir in
1864   .)  # We are building in place.
1865     ac_srcdir=.
1866     ac_top_srcdir=$ac_top_builddir_sub
1867     ac_abs_top_srcdir=$ac_pwd ;;
1868   [\\/]* | ?:[\\/]* )  # Absolute name.
1869     ac_srcdir=$srcdir$ac_dir_suffix;
1870     ac_top_srcdir=$srcdir
1871     ac_abs_top_srcdir=$srcdir ;;
1872   *) # Relative name.
1873     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1874     ac_top_srcdir=$ac_top_build_prefix$srcdir
1875     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1876 esac
1877 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1878 
1879     cd "$ac_dir" || { ac_status=$?; continue; }
1880     # Check for guested configure.
1881     if test -f "$ac_srcdir/configure.gnu"; then
1882       echo &&
1883       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1884     elif test -f "$ac_srcdir/configure"; then
1885       echo &&
1886       $SHELL "$ac_srcdir/configure" --help=recursive
1887     else
1888       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1889     fi || ac_status=$?
1890     cd "$ac_pwd" || { ac_status=$?; break; }
1891   done
1892 fi
1893 
1894 test -n "$ac_init_help" && exit $ac_status
1895 if $ac_init_version; then
1896   cat <<\_ACEOF
1897 OpenJDK configure jdk8
1898 generated by GNU Autoconf 2.67
1899 
1900 Copyright (C) 2010 Free Software Foundation, Inc.
1901 This configure script is free software; the Free Software Foundation
1902 gives unlimited permission to copy, distribute and modify it.
1903 _ACEOF
1904   exit
1905 fi
1906 
1907 ## ------------------------ ##
1908 ## Autoconf initialization. ##
1909 ## ------------------------ ##
1910 
1911 # ac_fn_c_try_compile LINENO
1912 # --------------------------
1913 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1914 ac_fn_c_try_compile ()
1915 {
1916   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1917   rm -f conftest.$ac_objext
1918   if { { ac_try="$ac_compile"
1919 case "(($ac_try" in
1920   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1921   *) ac_try_echo=$ac_try;;
1922 esac
1923 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1924 $as_echo "$ac_try_echo"; } >&5
1925   (eval "$ac_compile") 2>conftest.err
1926   ac_status=$?
1927   if test -s conftest.err; then
1928     grep -v '^ *+' conftest.err >conftest.er1
1929     cat conftest.er1 >&5
1930     mv -f conftest.er1 conftest.err
1931   fi
1932   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1933   test $ac_status = 0; } && {
1934          test -z "$ac_c_werror_flag" ||
1935          test ! -s conftest.err
1936        } && test -s conftest.$ac_objext; then :
1937   ac_retval=0
1938 else
1939   $as_echo "$as_me: failed program was:" >&5
1940 sed 's/^/| /' conftest.$ac_ext >&5
1941 
1942         ac_retval=1
1943 fi
1944   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1945   as_fn_set_status $ac_retval
1946 
1947 } # ac_fn_c_try_compile
1948 
1949 # ac_fn_cxx_try_compile LINENO
1950 # ----------------------------
1951 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1952 ac_fn_cxx_try_compile ()
1953 {
1954   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1955   rm -f conftest.$ac_objext
1956   if { { ac_try="$ac_compile"
1957 case "(($ac_try" in
1958   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1959   *) ac_try_echo=$ac_try;;
1960 esac
1961 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1962 $as_echo "$ac_try_echo"; } >&5
1963   (eval "$ac_compile") 2>conftest.err
1964   ac_status=$?
1965   if test -s conftest.err; then
1966     grep -v '^ *+' conftest.err >conftest.er1
1967     cat conftest.er1 >&5
1968     mv -f conftest.er1 conftest.err
1969   fi
1970   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1971   test $ac_status = 0; } && {
1972          test -z "$ac_cxx_werror_flag" ||
1973          test ! -s conftest.err
1974        } && test -s conftest.$ac_objext; then :
1975   ac_retval=0
1976 else
1977   $as_echo "$as_me: failed program was:" >&5
1978 sed 's/^/| /' conftest.$ac_ext >&5
1979 
1980         ac_retval=1
1981 fi
1982   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1983   as_fn_set_status $ac_retval
1984 
1985 } # ac_fn_cxx_try_compile
1986 
1987 # ac_fn_objc_try_compile LINENO
1988 # -----------------------------
1989 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1990 ac_fn_objc_try_compile ()
1991 {
1992   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1993   rm -f conftest.$ac_objext
1994   if { { ac_try="$ac_compile"
1995 case "(($ac_try" in
1996   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1997   *) ac_try_echo=$ac_try;;
1998 esac
1999 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2000 $as_echo "$ac_try_echo"; } >&5
2001   (eval "$ac_compile") 2>conftest.err
2002   ac_status=$?
2003   if test -s conftest.err; then
2004     grep -v '^ *+' conftest.err >conftest.er1
2005     cat conftest.er1 >&5
2006     mv -f conftest.er1 conftest.err
2007   fi
2008   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2009   test $ac_status = 0; } && {
2010          test -z "$ac_objc_werror_flag" ||
2011          test ! -s conftest.err
2012        } && test -s conftest.$ac_objext; then :
2013   ac_retval=0
2014 else
2015   $as_echo "$as_me: failed program was:" >&5
2016 sed 's/^/| /' conftest.$ac_ext >&5
2017 
2018         ac_retval=1
2019 fi
2020   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2021   as_fn_set_status $ac_retval
2022 
2023 } # ac_fn_objc_try_compile
2024 
2025 # ac_fn_c_try_cpp LINENO
2026 # ----------------------
2027 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2028 ac_fn_c_try_cpp ()
2029 {
2030   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2031   if { { ac_try="$ac_cpp conftest.$ac_ext"
2032 case "(($ac_try" in
2033   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2034   *) ac_try_echo=$ac_try;;
2035 esac
2036 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2037 $as_echo "$ac_try_echo"; } >&5
2038   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2039   ac_status=$?
2040   if test -s conftest.err; then
2041     grep -v '^ *+' conftest.err >conftest.er1
2042     cat conftest.er1 >&5
2043     mv -f conftest.er1 conftest.err
2044   fi
2045   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2046   test $ac_status = 0; } > conftest.i && {
2047          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2048          test ! -s conftest.err
2049        }; then :
2050   ac_retval=0
2051 else
2052   $as_echo "$as_me: failed program was:" >&5
2053 sed 's/^/| /' conftest.$ac_ext >&5
2054 
2055     ac_retval=1
2056 fi
2057   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2058   as_fn_set_status $ac_retval
2059 
2060 } # ac_fn_c_try_cpp
2061 
2062 # ac_fn_cxx_try_cpp LINENO
2063 # ------------------------
2064 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2065 ac_fn_cxx_try_cpp ()
2066 {
2067   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2068   if { { ac_try="$ac_cpp conftest.$ac_ext"
2069 case "(($ac_try" in
2070   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2071   *) ac_try_echo=$ac_try;;
2072 esac
2073 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2074 $as_echo "$ac_try_echo"; } >&5
2075   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2076   ac_status=$?
2077   if test -s conftest.err; then
2078     grep -v '^ *+' conftest.err >conftest.er1
2079     cat conftest.er1 >&5
2080     mv -f conftest.er1 conftest.err
2081   fi
2082   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2083   test $ac_status = 0; } > conftest.i && {
2084          test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2085          test ! -s conftest.err
2086        }; then :
2087   ac_retval=0
2088 else
2089   $as_echo "$as_me: failed program was:" >&5
2090 sed 's/^/| /' conftest.$ac_ext >&5
2091 
2092     ac_retval=1
2093 fi
2094   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2095   as_fn_set_status $ac_retval
2096 
2097 } # ac_fn_cxx_try_cpp
2098 
2099 # ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2100 # ---------------------------------------------------------
2101 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2102 # the include files in INCLUDES and setting the cache variable VAR
2103 # accordingly.
2104 ac_fn_cxx_check_header_mongrel ()
2105 {
2106   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2107   if eval "test \"\${$3+set}\"" = set; then :
2108   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2109 $as_echo_n "checking for $2... " >&6; }
2110 if eval "test \"\${$3+set}\"" = set; then :
2111   $as_echo_n "(cached) " >&6
2112 fi
2113 eval ac_res=\$$3
2114                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2115 $as_echo "$ac_res" >&6; }
2116 else
2117   # Is the header compilable?
2118 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2119 $as_echo_n "checking $2 usability... " >&6; }
2120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2121 /* end confdefs.h.  */
2122 $4
2123 #include <$2>
2124 _ACEOF
2125 if ac_fn_cxx_try_compile "$LINENO"; then :
2126   ac_header_compiler=yes
2127 else
2128   ac_header_compiler=no
2129 fi
2130 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2132 $as_echo "$ac_header_compiler" >&6; }
2133 
2134 # Is the header present?
2135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2136 $as_echo_n "checking $2 presence... " >&6; }
2137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2138 /* end confdefs.h.  */
2139 #include <$2>
2140 _ACEOF
2141 if ac_fn_cxx_try_cpp "$LINENO"; then :
2142   ac_header_preproc=yes
2143 else
2144   ac_header_preproc=no
2145 fi
2146 rm -f conftest.err conftest.i conftest.$ac_ext
2147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2148 $as_echo "$ac_header_preproc" >&6; }
2149 
2150 # So?  What about this header?
2151 case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2152   yes:no: )
2153     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2154 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2155     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2156 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2157     ;;
2158   no:yes:* )
2159     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2160 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2161     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2162 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2163     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2164 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2165     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2166 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2167     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2168 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2169 ( $as_echo "## ----------------------------------------- ##
2170 ## Report this to build-dev@openjdk.java.net ##
2171 ## ----------------------------------------- ##"
2172      ) | sed "s/^/$as_me: WARNING:     /" >&2
2173     ;;
2174 esac
2175   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2176 $as_echo_n "checking for $2... " >&6; }
2177 if eval "test \"\${$3+set}\"" = set; then :
2178   $as_echo_n "(cached) " >&6
2179 else
2180   eval "$3=\$ac_header_compiler"
2181 fi
2182 eval ac_res=\$$3
2183                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2184 $as_echo "$ac_res" >&6; }
2185 fi
2186   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2187 
2188 } # ac_fn_cxx_check_header_mongrel
2189 
2190 # ac_fn_cxx_try_run LINENO
2191 # ------------------------
2192 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2193 # that executables *can* be run.
2194 ac_fn_cxx_try_run ()
2195 {
2196   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2197   if { { ac_try="$ac_link"
2198 case "(($ac_try" in
2199   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2200   *) ac_try_echo=$ac_try;;
2201 esac
2202 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2203 $as_echo "$ac_try_echo"; } >&5
2204   (eval "$ac_link") 2>&5
2205   ac_status=$?
2206   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2207   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2208   { { case "(($ac_try" in
2209   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2210   *) ac_try_echo=$ac_try;;
2211 esac
2212 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2213 $as_echo "$ac_try_echo"; } >&5
2214   (eval "$ac_try") 2>&5
2215   ac_status=$?
2216   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2217   test $ac_status = 0; }; }; then :
2218   ac_retval=0
2219 else
2220   $as_echo "$as_me: program exited with status $ac_status" >&5
2221        $as_echo "$as_me: failed program was:" >&5
2222 sed 's/^/| /' conftest.$ac_ext >&5
2223 
2224        ac_retval=$ac_status
2225 fi
2226   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2227   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2228   as_fn_set_status $ac_retval
2229 
2230 } # ac_fn_cxx_try_run
2231 
2232 # ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2233 # ---------------------------------------------------------
2234 # Tests whether HEADER exists and can be compiled using the include files in
2235 # INCLUDES, setting the cache variable VAR accordingly.
2236 ac_fn_cxx_check_header_compile ()
2237 {
2238   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2239   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2240 $as_echo_n "checking for $2... " >&6; }
2241 if eval "test \"\${$3+set}\"" = set; then :
2242   $as_echo_n "(cached) " >&6
2243 else
2244   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2245 /* end confdefs.h.  */
2246 $4
2247 #include <$2>
2248 _ACEOF
2249 if ac_fn_cxx_try_compile "$LINENO"; then :
2250   eval "$3=yes"
2251 else
2252   eval "$3=no"
2253 fi
2254 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2255 fi
2256 eval ac_res=\$$3
2257                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2258 $as_echo "$ac_res" >&6; }
2259   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2260 
2261 } # ac_fn_cxx_check_header_compile
2262 
2263 # ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2264 # ----------------------------------------------
2265 # Tries to find the compile-time value of EXPR in a program that includes
2266 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2267 # computed
2268 ac_fn_cxx_compute_int ()
2269 {
2270   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2271   if test "$cross_compiling" = yes; then
2272     # Depending upon the size, compute the lo and hi bounds.
2273 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2274 /* end confdefs.h.  */
2275 $4
2276 int
2277 main ()
2278 {
2279 static int test_array [1 - 2 * !(($2) >= 0)];
2280 test_array [0] = 0
2281 
2282   ;
2283   return 0;
2284 }
2285 _ACEOF
2286 if ac_fn_cxx_try_compile "$LINENO"; then :
2287   ac_lo=0 ac_mid=0
2288   while :; do
2289     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2290 /* end confdefs.h.  */
2291 $4
2292 int
2293 main ()
2294 {
2295 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2296 test_array [0] = 0
2297 
2298   ;
2299   return 0;
2300 }
2301 _ACEOF
2302 if ac_fn_cxx_try_compile "$LINENO"; then :
2303   ac_hi=$ac_mid; break
2304 else
2305   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2306                         if test $ac_lo -le $ac_mid; then
2307                           ac_lo= ac_hi=
2308                           break
2309                         fi
2310                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2311 fi
2312 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2313   done
2314 else
2315   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2316 /* end confdefs.h.  */
2317 $4
2318 int
2319 main ()
2320 {
2321 static int test_array [1 - 2 * !(($2) < 0)];
2322 test_array [0] = 0
2323 
2324   ;
2325   return 0;
2326 }
2327 _ACEOF
2328 if ac_fn_cxx_try_compile "$LINENO"; then :
2329   ac_hi=-1 ac_mid=-1
2330   while :; do
2331     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2332 /* end confdefs.h.  */
2333 $4
2334 int
2335 main ()
2336 {
2337 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2338 test_array [0] = 0
2339 
2340   ;
2341   return 0;
2342 }
2343 _ACEOF
2344 if ac_fn_cxx_try_compile "$LINENO"; then :
2345   ac_lo=$ac_mid; break
2346 else
2347   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2348                         if test $ac_mid -le $ac_hi; then
2349                           ac_lo= ac_hi=
2350                           break
2351                         fi
2352                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2353 fi
2354 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2355   done
2356 else
2357   ac_lo= ac_hi=
2358 fi
2359 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2360 fi
2361 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2362 # Binary search between lo and hi bounds.
2363 while test "x$ac_lo" != "x$ac_hi"; do
2364   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2365   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2366 /* end confdefs.h.  */
2367 $4
2368 int
2369 main ()
2370 {
2371 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2372 test_array [0] = 0
2373 
2374   ;
2375   return 0;
2376 }
2377 _ACEOF
2378 if ac_fn_cxx_try_compile "$LINENO"; then :
2379   ac_hi=$ac_mid
2380 else
2381   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2382 fi
2383 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2384 done
2385 case $ac_lo in #((
2386 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2387 '') ac_retval=1 ;;
2388 esac
2389   else
2390     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2391 /* end confdefs.h.  */
2392 $4
2393 static long int longval () { return $2; }
2394 static unsigned long int ulongval () { return $2; }
2395 #include <stdio.h>
2396 #include <stdlib.h>
2397 int
2398 main ()
2399 {
2400 
2401   FILE *f = fopen ("conftest.val", "w");
2402   if (! f)
2403     return 1;
2404   if (($2) < 0)
2405     {
2406       long int i = longval ();
2407       if (i != ($2))
2408         return 1;
2409       fprintf (f, "%ld", i);
2410     }
2411   else
2412     {
2413       unsigned long int i = ulongval ();
2414       if (i != ($2))
2415         return 1;
2416       fprintf (f, "%lu", i);
2417     }
2418   /* Do not output a trailing newline, as this causes \r\n confusion
2419      on some platforms.  */
2420   return ferror (f) || fclose (f) != 0;
2421 
2422   ;
2423   return 0;
2424 }
2425 _ACEOF
2426 if ac_fn_cxx_try_run "$LINENO"; then :
2427   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2428 else
2429   ac_retval=1
2430 fi
2431 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2432   conftest.$ac_objext conftest.beam conftest.$ac_ext
2433 rm -f conftest.val
2434 
2435   fi
2436   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2437   as_fn_set_status $ac_retval
2438 
2439 } # ac_fn_cxx_compute_int
2440 
2441 # ac_fn_cxx_try_link LINENO
2442 # -------------------------
2443 # Try to link conftest.$ac_ext, and return whether this succeeded.
2444 ac_fn_cxx_try_link ()
2445 {
2446   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2447   rm -f conftest.$ac_objext conftest$ac_exeext
2448   if { { ac_try="$ac_link"
2449 case "(($ac_try" in
2450   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2451   *) ac_try_echo=$ac_try;;
2452 esac
2453 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2454 $as_echo "$ac_try_echo"; } >&5
2455   (eval "$ac_link") 2>conftest.err
2456   ac_status=$?
2457   if test -s conftest.err; then
2458     grep -v '^ *+' conftest.err >conftest.er1
2459     cat conftest.er1 >&5
2460     mv -f conftest.er1 conftest.err
2461   fi
2462   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2463   test $ac_status = 0; } && {
2464          test -z "$ac_cxx_werror_flag" ||
2465          test ! -s conftest.err
2466        } && test -s conftest$ac_exeext && {
2467          test "$cross_compiling" = yes ||
2468          $as_test_x conftest$ac_exeext
2469        }; then :
2470   ac_retval=0
2471 else
2472   $as_echo "$as_me: failed program was:" >&5
2473 sed 's/^/| /' conftest.$ac_ext >&5
2474 
2475         ac_retval=1
2476 fi
2477   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2478   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2479   # interfere with the next link command; also delete a directory that is
2480   # left behind by Apple's compiler.  We do this before executing the actions.
2481   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2482   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2483   as_fn_set_status $ac_retval
2484 
2485 } # ac_fn_cxx_try_link
2486 
2487 # ac_fn_cxx_check_func LINENO FUNC VAR
2488 # ------------------------------------
2489 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2490 ac_fn_cxx_check_func ()
2491 {
2492   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2493   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2494 $as_echo_n "checking for $2... " >&6; }
2495 if eval "test \"\${$3+set}\"" = set; then :
2496   $as_echo_n "(cached) " >&6
2497 else
2498   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2499 /* end confdefs.h.  */
2500 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2501    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2502 #define $2 innocuous_$2
2503 
2504 /* System header to define __stub macros and hopefully few prototypes,
2505     which can conflict with char $2 (); below.
2506     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2507     <limits.h> exists even on freestanding compilers.  */
2508 
2509 #ifdef __STDC__
2510 # include <limits.h>
2511 #else
2512 # include <assert.h>
2513 #endif
2514 
2515 #undef $2
2516 
2517 /* Override any GCC internal prototype to avoid an error.
2518    Use char because int might match the return type of a GCC
2519    builtin and then its argument prototype would still apply.  */
2520 #ifdef __cplusplus
2521 extern "C"
2522 #endif
2523 char $2 ();
2524 /* The GNU C library defines this for functions which it implements
2525     to always fail with ENOSYS.  Some functions are actually named
2526     something starting with __ and the normal name is an alias.  */
2527 #if defined __stub_$2 || defined __stub___$2
2528 choke me
2529 #endif
2530 
2531 int
2532 main ()
2533 {
2534 return $2 ();
2535   ;
2536   return 0;
2537 }
2538 _ACEOF
2539 if ac_fn_cxx_try_link "$LINENO"; then :
2540   eval "$3=yes"
2541 else
2542   eval "$3=no"
2543 fi
2544 rm -f core conftest.err conftest.$ac_objext \
2545     conftest$ac_exeext conftest.$ac_ext
2546 fi
2547 eval ac_res=\$$3
2548                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2549 $as_echo "$ac_res" >&6; }
2550   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2551 
2552 } # ac_fn_cxx_check_func
2553 
2554 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2555 # -------------------------------------------------------
2556 # Tests whether HEADER exists and can be compiled using the include files in
2557 # INCLUDES, setting the cache variable VAR accordingly.
2558 ac_fn_c_check_header_compile ()
2559 {
2560   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2561   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2562 $as_echo_n "checking for $2... " >&6; }
2563 if eval "test \"\${$3+set}\"" = set; then :
2564   $as_echo_n "(cached) " >&6
2565 else
2566   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2567 /* end confdefs.h.  */
2568 $4
2569 #include <$2>
2570 _ACEOF
2571 if ac_fn_c_try_compile "$LINENO"; then :
2572   eval "$3=yes"
2573 else
2574   eval "$3=no"
2575 fi
2576 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2577 fi
2578 eval ac_res=\$$3
2579                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2580 $as_echo "$ac_res" >&6; }
2581   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2582 
2583 } # ac_fn_c_check_header_compile
2584 cat >config.log <<_ACEOF
2585 This file contains any messages produced by compilers while
2586 running configure, to aid debugging if configure makes a mistake.
2587 
2588 It was created by OpenJDK $as_me jdk8, which was
2589 generated by GNU Autoconf 2.67.  Invocation command line was
2590 
2591   $ $0 $@
2592 
2593 _ACEOF
2594 exec 5>>config.log
2595 {
2596 cat <<_ASUNAME
2597 ## --------- ##
2598 ## Platform. ##
2599 ## --------- ##
2600 
2601 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2602 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2603 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2604 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2605 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2606 
2607 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2608 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2609 
2610 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2611 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2612 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2613 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2614 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2615 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2616 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2617 
2618 _ASUNAME
2619 
2620 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2621 for as_dir in $PATH
2622 do
2623   IFS=$as_save_IFS
2624   test -z "$as_dir" && as_dir=.
2625     $as_echo "PATH: $as_dir"
2626   done
2627 IFS=$as_save_IFS
2628 
2629 } >&5
2630 
2631 cat >&5 <<_ACEOF
2632 
2633 
2634 ## ----------- ##
2635 ## Core tests. ##
2636 ## ----------- ##
2637 
2638 _ACEOF
2639 
2640 
2641 # Keep a trace of the command line.
2642 # Strip out --no-create and --no-recursion so they do not pile up.
2643 # Strip out --silent because we don't want to record it for future runs.
2644 # Also quote any args containing shell meta-characters.
2645 # Make two passes to allow for proper duplicate-argument suppression.
2646 ac_configure_args=
2647 ac_configure_args0=
2648 ac_configure_args1=
2649 ac_must_keep_next=false
2650 for ac_pass in 1 2
2651 do
2652   for ac_arg
2653   do
2654     case $ac_arg in
2655     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2656     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2657     | -silent | --silent | --silen | --sile | --sil)
2658       continue ;;
2659     *\'*)
2660       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2661     esac
2662     case $ac_pass in
2663     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2664     2)
2665       as_fn_append ac_configure_args1 " '$ac_arg'"
2666       if test $ac_must_keep_next = true; then
2667         ac_must_keep_next=false # Got value, back to normal.
2668       else
2669         case $ac_arg in
2670           *=* | --config-cache | -C | -disable-* | --disable-* \
2671           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2672           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2673           | -with-* | --with-* | -without-* | --without-* | --x)
2674             case "$ac_configure_args0 " in
2675               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2676             esac
2677             ;;
2678           -* ) ac_must_keep_next=true ;;
2679         esac
2680       fi
2681       as_fn_append ac_configure_args " '$ac_arg'"
2682       ;;
2683     esac
2684   done
2685 done
2686 { ac_configure_args0=; unset ac_configure_args0;}
2687 { ac_configure_args1=; unset ac_configure_args1;}
2688 
2689 # When interrupted or exit'd, cleanup temporary files, and complete
2690 # config.log.  We remove comments because anyway the quotes in there
2691 # would cause problems or look ugly.
2692 # WARNING: Use '\'' to represent an apostrophe within the trap.
2693 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2694 trap 'exit_status=$?
2695   # Save into config.log some information that might help in debugging.
2696   {
2697     echo
2698 
2699     $as_echo "## ---------------- ##
2700 ## Cache variables. ##
2701 ## ---------------- ##"
2702     echo
2703     # The following way of writing the cache mishandles newlines in values,
2704 (
2705   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2706     eval ac_val=\$$ac_var
2707     case $ac_val in #(
2708     *${as_nl}*)
2709       case $ac_var in #(
2710       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2711 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2712       esac
2713       case $ac_var in #(
2714       _ | IFS | as_nl) ;; #(
2715       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2716       *) { eval $ac_var=; unset $ac_var;} ;;
2717       esac ;;
2718     esac
2719   done
2720   (set) 2>&1 |
2721     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2722     *${as_nl}ac_space=\ *)
2723       sed -n \
2724         "s/'\''/'\''\\\\'\'''\''/g;
2725           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2726       ;; #(
2727     *)
2728       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2729       ;;
2730     esac |
2731     sort
2732 )
2733     echo
2734 
2735     $as_echo "## ----------------- ##
2736 ## Output variables. ##
2737 ## ----------------- ##"
2738     echo
2739     for ac_var in $ac_subst_vars
2740     do
2741       eval ac_val=\$$ac_var
2742       case $ac_val in
2743       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2744       esac
2745       $as_echo "$ac_var='\''$ac_val'\''"
2746     done | sort
2747     echo
2748 
2749     if test -n "$ac_subst_files"; then
2750       $as_echo "## ------------------- ##
2751 ## File substitutions. ##
2752 ## ------------------- ##"
2753       echo
2754       for ac_var in $ac_subst_files
2755       do
2756         eval ac_val=\$$ac_var
2757         case $ac_val in
2758         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2759         esac
2760         $as_echo "$ac_var='\''$ac_val'\''"
2761       done | sort
2762       echo
2763     fi
2764 
2765     if test -s confdefs.h; then
2766       $as_echo "## ----------- ##
2767 ## confdefs.h. ##
2768 ## ----------- ##"
2769       echo
2770       cat confdefs.h
2771       echo
2772     fi
2773     test "$ac_signal" != 0 &&
2774       $as_echo "$as_me: caught signal $ac_signal"
2775     $as_echo "$as_me: exit $exit_status"
2776   } >&5
2777   rm -f core *.core core.conftest.* &&
2778     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2779     exit $exit_status
2780 ' 0
2781 for ac_signal in 1 2 13 15; do
2782   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2783 done
2784 ac_signal=0
2785 
2786 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2787 rm -f -r conftest* confdefs.h
2788 
2789 $as_echo "/* confdefs.h */" > confdefs.h
2790 
2791 # Predefined preprocessor variables.
2792 
2793 cat >>confdefs.h <<_ACEOF
2794 #define PACKAGE_NAME "$PACKAGE_NAME"
2795 _ACEOF
2796 
2797 cat >>confdefs.h <<_ACEOF
2798 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2799 _ACEOF
2800 
2801 cat >>confdefs.h <<_ACEOF
2802 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2803 _ACEOF
2804 
2805 cat >>confdefs.h <<_ACEOF
2806 #define PACKAGE_STRING "$PACKAGE_STRING"
2807 _ACEOF
2808 
2809 cat >>confdefs.h <<_ACEOF
2810 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2811 _ACEOF
2812 
2813 cat >>confdefs.h <<_ACEOF
2814 #define PACKAGE_URL "$PACKAGE_URL"
2815 _ACEOF
2816 
2817 
2818 # Let the site file select an alternate cache file if it wants to.
2819 # Prefer an explicitly selected file to automatically selected ones.
2820 ac_site_file1=NONE
2821 ac_site_file2=NONE
2822 if test -n "$CONFIG_SITE"; then
2823   # We do not want a PATH search for config.site.
2824   case $CONFIG_SITE in #((
2825     -*)  ac_site_file1=./$CONFIG_SITE;;
2826     */*) ac_site_file1=$CONFIG_SITE;;
2827     *)   ac_site_file1=./$CONFIG_SITE;;
2828   esac
2829 elif test "x$prefix" != xNONE; then
2830   ac_site_file1=$prefix/share/config.site
2831   ac_site_file2=$prefix/etc/config.site
2832 else
2833   ac_site_file1=$ac_default_prefix/share/config.site
2834   ac_site_file2=$ac_default_prefix/etc/config.site
2835 fi
2836 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2837 do
2838   test "x$ac_site_file" = xNONE && continue
2839   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2840     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2841 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2842     sed 's/^/| /' "$ac_site_file" >&5
2843     . "$ac_site_file" \
2844       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2845 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2846 as_fn_error $? "failed to load site script $ac_site_file
2847 See \`config.log' for more details" "$LINENO" 5 ; }
2848   fi
2849 done
2850 
2851 if test -r "$cache_file"; then
2852   # Some versions of bash will fail to source /dev/null (special files
2853   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2854   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2855     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2856 $as_echo "$as_me: loading cache $cache_file" >&6;}
2857     case $cache_file in
2858       [\\/]* | ?:[\\/]* ) . "$cache_file";;
2859       *)                      . "./$cache_file";;
2860     esac
2861   fi
2862 else
2863   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2864 $as_echo "$as_me: creating cache $cache_file" >&6;}
2865   >$cache_file
2866 fi
2867 
2868 # Check that the precious variables saved in the cache have kept the same
2869 # value.
2870 ac_cache_corrupted=false
2871 for ac_var in $ac_precious_vars; do
2872   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2873   eval ac_new_set=\$ac_env_${ac_var}_set
2874   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2875   eval ac_new_val=\$ac_env_${ac_var}_value
2876   case $ac_old_set,$ac_new_set in
2877     set,)
2878       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2879 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2880       ac_cache_corrupted=: ;;
2881     ,set)
2882       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2883 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2884       ac_cache_corrupted=: ;;
2885     ,);;
2886     *)
2887       if test "x$ac_old_val" != "x$ac_new_val"; then
2888         # differences in whitespace do not lead to failure.
2889         ac_old_val_w=`echo x $ac_old_val`
2890         ac_new_val_w=`echo x $ac_new_val`
2891         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2892           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2893 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2894           ac_cache_corrupted=:
2895         else
2896           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2897 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2898           eval $ac_var=\$ac_old_val
2899         fi
2900         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2901 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2902         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2903 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2904       fi;;
2905   esac
2906   # Pass precious variables to config.status.
2907   if test "$ac_new_set" = set; then
2908     case $ac_new_val in
2909     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2910     *) ac_arg=$ac_var=$ac_new_val ;;
2911     esac
2912     case " $ac_configure_args " in
2913       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2914       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2915     esac
2916   fi
2917 done
2918 if $ac_cache_corrupted; then
2919   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2920 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2921   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2922 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2923   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2924 fi
2925 ## -------------------- ##
2926 ## Main body of script. ##
2927 ## -------------------- ##
2928 
2929 ac_ext=c
2930 ac_cpp='$CPP $CPPFLAGS'
2931 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2932 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2933 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2934 
2935 
2936 
2937 ac_aux_dir=
2938 for ac_dir in build-aux "$srcdir"/build-aux; do
2939   if test -f "$ac_dir/install-sh"; then
2940     ac_aux_dir=$ac_dir
2941     ac_install_sh="$ac_aux_dir/install-sh -c"
2942     break
2943   elif test -f "$ac_dir/install.sh"; then
2944     ac_aux_dir=$ac_dir
2945     ac_install_sh="$ac_aux_dir/install.sh -c"
2946     break
2947   elif test -f "$ac_dir/shtool"; then
2948     ac_aux_dir=$ac_dir
2949     ac_install_sh="$ac_aux_dir/shtool install -c"
2950     break
2951   fi
2952 done
2953 if test -z "$ac_aux_dir"; then
2954   as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
2955 fi
2956 
2957 # These three variables are undocumented and unsupported,
2958 # and are intended to be withdrawn in a future Autoconf release.
2959 # They can cause serious problems if a builder's source tree is in a directory
2960 # whose full name contains unusual characters.
2961 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2962 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2963 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2964 
2965 
2966 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
2967 
2968 #
2969 # Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
2970 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2971 #
2972 # This code is free software; you can redistribute it and/or modify it
2973 # under the terms of the GNU General Public License version 2 only, as
2974 # published by the Free Software Foundation.  Oracle designates this
2975 # particular file as subject to the "Classpath" exception as provided
2976 # by Oracle in the LICENSE file that accompanied this code.
2977 #
2978 # This code is distributed in the hope that it will be useful, but WITHOUT
2979 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2980 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
2981 # version 2 for more details (a copy is included in the LICENSE file that
2982 # accompanied this code).
2983 #
2984 # You should have received a copy of the GNU General Public License version
2985 # 2 along with this work; if not, write to the Free Software Foundation,
2986 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2987 #
2988 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2989 # or visit www.oracle.com if you need additional information or have any
2990 # questions.
2991 #
2992 
2993 #
2994 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
2995 #
2996 # This program is free software; you can redistribute it and/or modify
2997 # it under the terms of the GNU General Public License as published by
2998 # the Free Software Foundation; either version 2 of the License, or
2999 # (at your option) any later version.
3000 #
3001 # This program is distributed in the hope that it will be useful, but
3002 # WITHOUT ANY WARRANTY; without even the implied warranty of
3003 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3004 # General Public License for more details.
3005 #
3006 # You should have received a copy of the GNU General Public License
3007 # along with this program; if not, write to the Free Software
3008 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3009 #
3010 # As a special exception to the GNU General Public License, if you
3011 # distribute this file as part of a program that contains a
3012 # configuration script generated by Autoconf, you may include it under
3013 # the same distribution terms that you use for the rest of that program.
3014 
3015 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
3016 # ----------------------------------
3017 # PKG_PROG_PKG_CONFIG
3018 
3019 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3020 #
3021 # Check to see whether a particular set of modules exists.  Similar
3022 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
3023 #
3024 #
3025 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
3026 # this or PKG_CHECK_MODULES is called, or make sure to call
3027 # PKG_CHECK_EXISTS manually
3028 # --------------------------------------------------------------
3029 
3030 
3031 
3032 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3033 # ---------------------------------------------
3034 # _PKG_CONFIG
3035 
3036 # _PKG_SHORT_ERRORS_SUPPORTED
3037 # -----------------------------
3038 # _PKG_SHORT_ERRORS_SUPPORTED
3039 
3040 
3041 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3042 # [ACTION-IF-NOT-FOUND])
3043 #
3044 #
3045 # Note that if there is a possibility the first call to
3046 # PKG_CHECK_MODULES might not happen, you should be sure to include an
3047 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3048 #
3049 #
3050 # --------------------------------------------------------------
3051 # PKG_CHECK_MODULES
3052 
3053 
3054 # Include these first...
3055 #
3056 # Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3057 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3058 #
3059 # This code is free software; you can redistribute it and/or modify it
3060 # under the terms of the GNU General Public License version 2 only, as
3061 # published by the Free Software Foundation.  Oracle designates this
3062 # particular file as subject to the "Classpath" exception as provided
3063 # by Oracle in the LICENSE file that accompanied this code.
3064 #
3065 # This code is distributed in the hope that it will be useful, but WITHOUT
3066 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3067 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3068 # version 2 for more details (a copy is included in the LICENSE file that
3069 # accompanied this code).
3070 #
3071 # You should have received a copy of the GNU General Public License version
3072 # 2 along with this work; if not, write to the Free Software Foundation,
3073 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3074 #
3075 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3076 # or visit www.oracle.com if you need additional information or have any
3077 # questions.
3078 #
3079 
3080 
3081 
3082 # This will make sure the given variable points to a full and proper
3083 # path. This means:
3084 # 1) There will be no spaces in the path. On posix platforms,
3085 #    spaces in the path will result in an error. On Windows,
3086 #    the path will be rewritten using short-style to be space-free.
3087 # 2) The path will be absolute, and it will be in unix-style (on
3088 #     cygwin).
3089 # $1: The name of the variable to fix
3090 
3091 
3092 # This will make sure the given variable points to a executable
3093 # with a full and proper path. This means:
3094 # 1) There will be no spaces in the path. On posix platforms,
3095 #    spaces in the path will result in an error. On Windows,
3096 #    the path will be rewritten using short-style to be space-free.
3097 # 2) The path will be absolute, and it will be in unix-style (on
3098 #     cygwin).
3099 # Any arguments given to the executable is preserved.
3100 # If the input variable does not have a directory specification, then
3101 # it need to be in the PATH.
3102 # $1: The name of the variable to fix
3103 
3104 
3105 
3106 
3107 
3108 
3109 # Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3110 # $1: variable to check
3111 # $2: executable name to print in warning (optional)
3112 
3113 
3114 # Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
3115 # Arguments as AC_PATH_PROG:
3116 # $1: variable to set
3117 # $2: executable name to look for
3118 
3119 
3120 # Setup the most fundamental tools that relies on not much else to set up,
3121 # but is used by much of the early bootstrap code.
3122 
3123 
3124 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3125 
3126 
3127 
3128 
3129 
3130 
3131 
3132 #%%% Simple tools %%%
3133 
3134 # Check if we have found a usable version of make
3135 # $1: the path to a potential make binary (or empty)
3136 # $2: the description on how we found this
3137 
3138 
3139 # Goes looking for a usable version of GNU make.
3140 
3141 
3142 
3143 
3144 
3145 
3146 # Check if build directory is on local disk. If not possible to determine,
3147 # we prefer to claim it's local.
3148 # Argument 1: directory to test
3149 # Argument 2: what to do if it is on local disk
3150 # Argument 3: what to do otherwise (remote disk or failure)
3151 
3152 
3153 # Check that source files have basic read permissions set. This might
3154 # not be the case in cygwin in certain conditions.
3155 
3156 
3157 
3158 
3159 #
3160 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3161 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3162 #
3163 # This code is free software; you can redistribute it and/or modify it
3164 # under the terms of the GNU General Public License version 2 only, as
3165 # published by the Free Software Foundation.  Oracle designates this
3166 # particular file as subject to the "Classpath" exception as provided
3167 # by Oracle in the LICENSE file that accompanied this code.
3168 #
3169 # This code is distributed in the hope that it will be useful, but WITHOUT
3170 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3171 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3172 # version 2 for more details (a copy is included in the LICENSE file that
3173 # accompanied this code).
3174 #
3175 # You should have received a copy of the GNU General Public License version
3176 # 2 along with this work; if not, write to the Free Software Foundation,
3177 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3178 #
3179 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3180 # or visit www.oracle.com if you need additional information or have any
3181 # questions.
3182 #
3183 
3184 
3185 
3186 
3187 
3188 # Helper function which possibly converts a path using DOS-style short mode.
3189 # If so, the updated path is stored in $new_path.
3190 # $1: The path to check
3191 
3192 
3193 # Helper function which possibly converts a path using DOS-style short mode.
3194 # If so, the updated path is stored in $new_path.
3195 # $1: The path to check
3196 
3197 
3198 # FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3199 # and could probably be heavily simplified. However, all changes in this
3200 # area tend to need lot of testing in different scenarios, and in lack of
3201 # proper unit testing, cleaning this up has not been deemed worth the effort
3202 # at the moment.
3203 
3204 
3205 
3206 
3207 
3208 
3209 
3210 
3211 
3212 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3213 
3214 
3215 
3216 
3217 #
3218 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3219 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3220 #
3221 # This code is free software; you can redistribute it and/or modify it
3222 # under the terms of the GNU General Public License version 2 only, as
3223 # published by the Free Software Foundation.  Oracle designates this
3224 # particular file as subject to the "Classpath" exception as provided
3225 # by Oracle in the LICENSE file that accompanied this code.
3226 #
3227 # This code is distributed in the hope that it will be useful, but WITHOUT
3228 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3229 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3230 # version 2 for more details (a copy is included in the LICENSE file that
3231 # accompanied this code).
3232 #
3233 # You should have received a copy of the GNU General Public License version
3234 # 2 along with this work; if not, write to the Free Software Foundation,
3235 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3236 #
3237 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3238 # or visit www.oracle.com if you need additional information or have any
3239 # questions.
3240 #
3241 
3242 
3243 
3244 
3245 
3246 
3247 
3248 
3249 
3250 
3251 
3252 # ... then the rest
3253 #
3254 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3255 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3256 #
3257 # This code is free software; you can redistribute it and/or modify it
3258 # under the terms of the GNU General Public License version 2 only, as
3259 # published by the Free Software Foundation.  Oracle designates this
3260 # particular file as subject to the "Classpath" exception as provided
3261 # by Oracle in the LICENSE file that accompanied this code.
3262 #
3263 # This code is distributed in the hope that it will be useful, but WITHOUT
3264 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3265 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3266 # version 2 for more details (a copy is included in the LICENSE file that
3267 # accompanied this code).
3268 #
3269 # You should have received a copy of the GNU General Public License version
3270 # 2 along with this work; if not, write to the Free Software Foundation,
3271 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3272 #
3273 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3274 # or visit www.oracle.com if you need additional information or have any
3275 # questions.
3276 #
3277 
3278 # Execute the check given as argument, and verify the result
3279 # If the Boot JDK was previously found, do nothing
3280 # $1 A command line (typically autoconf macro) to execute
3281 
3282 
3283 # Test: Is bootjdk explicitely set by command line arguments?
3284 
3285 
3286 # Test: Is bootjdk available from builddeps?
3287 
3288 
3289 # Test: Is $JAVA_HOME set?
3290 
3291 
3292 # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3293 
3294 
3295 # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3296 
3297 
3298 # Look for a jdk in the given path. If there are multiple, try to select the newest.
3299 # If found, set BOOT_JDK and BOOT_JDK_FOUND.
3300 # $1 = Path to directory containing jdk installations.
3301 # $2 = String to append to the found JDK directory to get the proper JDK home
3302 
3303 
3304 # Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3305 # environmental variable as base for where to look.
3306 # $1 Name of an environmal variable, assumed to point to the Program Files directory.
3307 
3308 
3309 # Test: Is there a JDK installed in default, well-known locations?
3310 
3311 
3312 # Check that a command-line tool in the Boot JDK is correct
3313 # $1 = name of variable to assign
3314 # $2 = name of binary
3315 
3316 
3317 ###############################################################################
3318 #
3319 # We need a Boot JDK to bootstrap the build.
3320 #
3321 
3322 
3323 
3324 
3325 
3326 #
3327 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3328 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3329 #
3330 # This code is free software; you can redistribute it and/or modify it
3331 # under the terms of the GNU General Public License version 2 only, as
3332 # published by the Free Software Foundation.  Oracle designates this
3333 # particular file as subject to the "Classpath" exception as provided
3334 # by Oracle in the LICENSE file that accompanied this code.
3335 #
3336 # This code is distributed in the hope that it will be useful, but WITHOUT
3337 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3338 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3339 # version 2 for more details (a copy is included in the LICENSE file that
3340 # accompanied this code).
3341 #
3342 # You should have received a copy of the GNU General Public License version
3343 # 2 along with this work; if not, write to the Free Software Foundation,
3344 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3345 #
3346 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3347 # or visit www.oracle.com if you need additional information or have any
3348 # questions.
3349 #
3350 
3351 
3352 
3353 
3354 
3355 
3356 
3357 
3358 
3359 
3360 
3361 
3362 
3363 
3364 
3365 
3366 
3367 
3368 #
3369 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3370 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3371 #
3372 # This code is free software; you can redistribute it and/or modify it
3373 # under the terms of the GNU General Public License version 2 only, as
3374 # published by the Free Software Foundation.  Oracle designates this
3375 # particular file as subject to the "Classpath" exception as provided
3376 # by Oracle in the LICENSE file that accompanied this code.
3377 #
3378 # This code is distributed in the hope that it will be useful, but WITHOUT
3379 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3380 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3381 # version 2 for more details (a copy is included in the LICENSE file that
3382 # accompanied this code).
3383 #
3384 # You should have received a copy of the GNU General Public License version
3385 # 2 along with this work; if not, write to the Free Software Foundation,
3386 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3387 #
3388 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3389 # or visit www.oracle.com if you need additional information or have any
3390 # questions.
3391 #
3392 
3393 
3394 
3395 
3396 
3397 cygwin_help() {
3398     case $1 in
3399     unzip)
3400         PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;;
3401     zip)
3402         PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;;
3403     make)
3404         PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;;
3405     * )
3406        break ;;
3407     esac
3408 }
3409 
3410 apt_help() {
3411     case $1 in
3412     devkit)
3413         PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3414     openjdk)
3415         PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3416     alsa)
3417         PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3418     cups)
3419         PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3420     freetype2)
3421         PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3422     pulse)
3423         PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3424     x11)
3425         PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev" ;;
3426     ccache)
3427         PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3428     * )
3429        break ;;
3430     esac
3431 }
3432 
3433 yum_help() {
3434     case $1 in
3435     devkit)
3436         PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3437     openjdk)
3438         PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3439     alsa)
3440         PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3441     cups)
3442         PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3443     freetype2)
3444         PKGHANDLER_COMMAND="sudo yum install freetype2-devel" ;;
3445     pulse)
3446         PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3447     x11)
3448         PKGHANDLER_COMMAND="sudo yum install libXtst-devel" ;;
3449     ccache)
3450         PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3451     * )
3452        break ;;
3453     esac
3454 }
3455 
3456 port_help() {
3457     PKGHANDLER_COMMAND=""
3458 }
3459 
3460 pkgutil_help() {
3461     PKGHANDLER_COMMAND=""
3462 }
3463 
3464 pkgadd_help() {
3465     PKGHANDLER_COMMAND=""
3466 }
3467 
3468 
3469 
3470 #
3471 # Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3472 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3473 #
3474 # This code is free software; you can redistribute it and/or modify it
3475 # under the terms of the GNU General Public License version 2 only, as
3476 # published by the Free Software Foundation.  Oracle designates this
3477 # particular file as subject to the "Classpath" exception as provided
3478 # by Oracle in the LICENSE file that accompanied this code.
3479 #
3480 # This code is distributed in the hope that it will be useful, but WITHOUT
3481 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3482 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3483 # version 2 for more details (a copy is included in the LICENSE file that
3484 # accompanied this code).
3485 #
3486 # You should have received a copy of the GNU General Public License version
3487 # 2 along with this work; if not, write to the Free Software Foundation,
3488 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3489 #
3490 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3491 # or visit www.oracle.com if you need additional information or have any
3492 # questions.
3493 #
3494 
3495 
3496 
3497 
3498 
3499 
3500 
3501 
3502 ###############################################################################
3503 #
3504 # Should we build only OpenJDK even if closed sources are present?
3505 #
3506 
3507 
3508 
3509 
3510 ###############################################################################
3511 #
3512 # Setup version numbers
3513 #
3514 
3515 
3516 
3517 
3518 
3519 
3520 # Support for customization of the build process. Some build files
3521 # will include counterparts from this location, if they exist. This allows
3522 # for a degree of customization of the build targets and the rules/recipes
3523 # to create them
3524 
3525 # Check whether --with-custom-make-dir was given.
3526 if test "${with_custom_make_dir+set}" = set; then :
3527   withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3528 fi
3529 
3530 
3531 
3532 #
3533 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3534 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3535 #
3536 # This code is free software; you can redistribute it and/or modify it
3537 # under the terms of the GNU General Public License version 2 only, as
3538 # published by the Free Software Foundation.  Oracle designates this
3539 # particular file as subject to the "Classpath" exception as provided
3540 # by Oracle in the LICENSE file that accompanied this code.
3541 #
3542 # This code is distributed in the hope that it will be useful, but WITHOUT
3543 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3544 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3545 # version 2 for more details (a copy is included in the LICENSE file that
3546 # accompanied this code).
3547 #
3548 # You should have received a copy of the GNU General Public License version
3549 # 2 along with this work; if not, write to the Free Software Foundation,
3550 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3551 #
3552 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3553 # or visit www.oracle.com if you need additional information or have any
3554 # questions.
3555 #
3556 
3557 
3558 
3559 
3560 
3561 
3562 
3563 
3564 
3565 
3566 
3567 
3568 
3569 
3570 
3571 #
3572 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3573 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3574 #
3575 # This code is free software; you can redistribute it and/or modify it
3576 # under the terms of the GNU General Public License version 2 only, as
3577 # published by the Free Software Foundation.  Oracle designates this
3578 # particular file as subject to the "Classpath" exception as provided
3579 # by Oracle in the LICENSE file that accompanied this code.
3580 #
3581 # This code is distributed in the hope that it will be useful, but WITHOUT
3582 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3583 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3584 # version 2 for more details (a copy is included in the LICENSE file that
3585 # accompanied this code).
3586 #
3587 # You should have received a copy of the GNU General Public License version
3588 # 2 along with this work; if not, write to the Free Software Foundation,
3589 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3590 #
3591 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3592 # or visit www.oracle.com if you need additional information or have any
3593 # questions.
3594 #
3595 
3596 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3597 # Converts autoconf style CPU name to OpenJDK style, into
3598 # VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3599 
3600 
3601 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3602 # Converts autoconf style OS name to OpenJDK style, into
3603 # VAR_OS and VAR_OS_API.
3604 
3605 
3606 # Expects $host_os $host_cpu $build_os and $build_cpu
3607 # and $with_target_bits to have been setup!
3608 #
3609 # Translate the standard triplet(quadruplet) definition
3610 # of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3611 # OPENJDK_BUILD_OS, etc.
3612 
3613 
3614 # Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3615 # accordingly. Must be done after setting up build and target system, but before
3616 # doing anything else with these values.
3617 
3618 
3619     # Setup the legacy variables, for controlling the old makefiles.
3620     #
3621 
3622 
3623 
3624 
3625 #%%% Build and target systems %%%
3626 
3627 
3628 
3629 
3630 # Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3631 # Add -mX to various FLAGS variables.
3632 
3633 
3634 
3635 
3636 
3637 
3638 #
3639 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3640 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3641 #
3642 # This code is free software; you can redistribute it and/or modify it
3643 # under the terms of the GNU General Public License version 2 only, as
3644 # published by the Free Software Foundation.  Oracle designates this
3645 # particular file as subject to the "Classpath" exception as provided
3646 # by Oracle in the LICENSE file that accompanied this code.
3647 #
3648 # This code is distributed in the hope that it will be useful, but WITHOUT
3649 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3650 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3651 # version 2 for more details (a copy is included in the LICENSE file that
3652 # accompanied this code).
3653 #
3654 # You should have received a copy of the GNU General Public License version
3655 # 2 along with this work; if not, write to the Free Software Foundation,
3656 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3657 #
3658 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3659 # or visit www.oracle.com if you need additional information or have any
3660 # questions.
3661 #
3662 
3663 
3664 
3665 
3666 
3667 
3668 
3669 
3670 #
3671 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3672 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3673 #
3674 # This code is free software; you can redistribute it and/or modify it
3675 # under the terms of the GNU General Public License version 2 only, as
3676 # published by the Free Software Foundation.  Oracle designates this
3677 # particular file as subject to the "Classpath" exception as provided
3678 # by Oracle in the LICENSE file that accompanied this code.
3679 #
3680 # This code is distributed in the hope that it will be useful, but WITHOUT
3681 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3682 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3683 # version 2 for more details (a copy is included in the LICENSE file that
3684 # accompanied this code).
3685 #
3686 # You should have received a copy of the GNU General Public License version
3687 # 2 along with this work; if not, write to the Free Software Foundation,
3688 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3689 #
3690 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3691 # or visit www.oracle.com if you need additional information or have any
3692 # questions.
3693 #
3694 
3695 # $1 = compiler to test (CC or CXX)
3696 # $2 = human readable name of compiler (C or C++)
3697 
3698 
3699 
3700 
3701 
3702 # $1 = compiler to test (CC or CXX)
3703 # $2 = human readable name of compiler (C or C++)
3704 # $3 = list of compiler names to search for
3705 
3706 
3707 
3708 
3709 
3710 
3711 
3712 
3713 
3714 
3715 
3716 
3717 
3718 # TOOLCHAIN_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3719 #                                   [RUN-IF-FALSE])
3720 # ------------------------------------------------------------
3721 # Check that the c and c++ compilers support an argument
3722 
3723 
3724 
3725 
3726 #
3727 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3728 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3729 #
3730 # This code is free software; you can redistribute it and/or modify it
3731 # under the terms of the GNU General Public License version 2 only, as
3732 # published by the Free Software Foundation.  Oracle designates this
3733 # particular file as subject to the "Classpath" exception as provided
3734 # by Oracle in the LICENSE file that accompanied this code.
3735 #
3736 # This code is distributed in the hope that it will be useful, but WITHOUT
3737 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3738 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3739 # version 2 for more details (a copy is included in the LICENSE file that
3740 # accompanied this code).
3741 #
3742 # You should have received a copy of the GNU General Public License version
3743 # 2 along with this work; if not, write to the Free Software Foundation,
3744 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3745 #
3746 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3747 # or visit www.oracle.com if you need additional information or have any
3748 # questions.
3749 #
3750 
3751 
3752 
3753 
3754 
3755 
3756 
3757 # Check if the VS env variables were setup prior to running configure.
3758 # If not, then find vcvarsall.bat and run it automatically, and integrate
3759 # the set env variables into the spec file.
3760 
3761 
3762 
3763 # Setup the DXSDK paths
3764 
3765 
3766 
3767 
3768 
3769 
3770 # This line needs to be here, verbatim, after all includes and the dummy hook
3771 # definitions. It is replaced with custom functionality when building
3772 # custom sources.
3773 #CUSTOM_AUTOCONF_INCLUDE
3774 
3775 # Do not change or remove the following line, it is needed for consistency checks:
3776 DATE_WHEN_GENERATED=1369310526
3777 
3778 ###############################################################################
3779 #
3780 # Initialization / Boot-strapping
3781 #
3782 # The bootstrapping process needs to solve the "chicken or the egg" problem,
3783 # thus it jumps back and forth, each time gaining something needed later on.
3784 #
3785 ###############################################################################
3786 
3787 # Basic initialization that must happen first of all
3788 
3789 # Save the original command line. This is passed to us by the wrapper configure script.
3790 
3791 DATE_WHEN_CONFIGURED=`LANG=C date`
3792 
3793 { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3794 $as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3795 { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3796 $as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3797 
3798 
3799 
3800 # Start with tools that do not need have cross compilation support
3801 # and can be expected to be found in the default PATH. These tools are
3802 # used by configure. Nor are these tools expected to be found in the
3803 # devkit from the builddeps server either, since they are
3804 # needed to download the devkit.
3805 
3806 # First are all the simple required tools.
3807 
3808     for ac_prog in basename
3809 do
3810   # Extract the first word of "$ac_prog", so it can be a program name with args.
3811 set dummy $ac_prog; ac_word=$2
3812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3813 $as_echo_n "checking for $ac_word... " >&6; }
3814 if test "${ac_cv_path_BASENAME+set}" = set; then :
3815   $as_echo_n "(cached) " >&6
3816 else
3817   case $BASENAME in
3818   [\\/]* | ?:[\\/]*)
3819   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3820   ;;
3821   *)
3822   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3823 for as_dir in $PATH
3824 do
3825   IFS=$as_save_IFS
3826   test -z "$as_dir" && as_dir=.
3827     for ac_exec_ext in '' $ac_executable_extensions; do
3828   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3829     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3830     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3831     break 2
3832   fi
3833 done
3834   done
3835 IFS=$as_save_IFS
3836 
3837   ;;
3838 esac
3839 fi
3840 BASENAME=$ac_cv_path_BASENAME
3841 if test -n "$BASENAME"; then
3842   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
3843 $as_echo "$BASENAME" >&6; }
3844 else
3845   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3846 $as_echo "no" >&6; }
3847 fi
3848 
3849 
3850   test -n "$BASENAME" && break
3851 done
3852 
3853 
3854     if test "x$BASENAME" = x; then
3855         if test "xbasename" = x; then
3856           PROG_NAME=basename
3857         else
3858           PROG_NAME=basename
3859         fi
3860         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3861 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3862         as_fn_error $? "Cannot continue" "$LINENO" 5
3863     fi
3864 
3865 
3866 
3867     for ac_prog in bash
3868 do
3869   # Extract the first word of "$ac_prog", so it can be a program name with args.
3870 set dummy $ac_prog; ac_word=$2
3871 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3872 $as_echo_n "checking for $ac_word... " >&6; }
3873 if test "${ac_cv_path_BASH+set}" = set; then :
3874   $as_echo_n "(cached) " >&6
3875 else
3876   case $BASH in
3877   [\\/]* | ?:[\\/]*)
3878   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3879   ;;
3880   *)
3881   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3882 for as_dir in $PATH
3883 do
3884   IFS=$as_save_IFS
3885   test -z "$as_dir" && as_dir=.
3886     for ac_exec_ext in '' $ac_executable_extensions; do
3887   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3888     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3889     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3890     break 2
3891   fi
3892 done
3893   done
3894 IFS=$as_save_IFS
3895 
3896   ;;
3897 esac
3898 fi
3899 BASH=$ac_cv_path_BASH
3900 if test -n "$BASH"; then
3901   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
3902 $as_echo "$BASH" >&6; }
3903 else
3904   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3905 $as_echo "no" >&6; }
3906 fi
3907 
3908 
3909   test -n "$BASH" && break
3910 done
3911 
3912 
3913     if test "x$BASH" = x; then
3914         if test "xbash" = x; then
3915           PROG_NAME=bash
3916         else
3917           PROG_NAME=bash
3918         fi
3919         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3920 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3921         as_fn_error $? "Cannot continue" "$LINENO" 5
3922     fi
3923 
3924 
3925 
3926     for ac_prog in cat
3927 do
3928   # Extract the first word of "$ac_prog", so it can be a program name with args.
3929 set dummy $ac_prog; ac_word=$2
3930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3931 $as_echo_n "checking for $ac_word... " >&6; }
3932 if test "${ac_cv_path_CAT+set}" = set; then :
3933   $as_echo_n "(cached) " >&6
3934 else
3935   case $CAT in
3936   [\\/]* | ?:[\\/]*)
3937   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
3938   ;;
3939   *)
3940   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3941 for as_dir in $PATH
3942 do
3943   IFS=$as_save_IFS
3944   test -z "$as_dir" && as_dir=.
3945     for ac_exec_ext in '' $ac_executable_extensions; do
3946   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3947     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
3948     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3949     break 2
3950   fi
3951 done
3952   done
3953 IFS=$as_save_IFS
3954 
3955   ;;
3956 esac
3957 fi
3958 CAT=$ac_cv_path_CAT
3959 if test -n "$CAT"; then
3960   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
3961 $as_echo "$CAT" >&6; }
3962 else
3963   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3964 $as_echo "no" >&6; }
3965 fi
3966 
3967 
3968   test -n "$CAT" && break
3969 done
3970 
3971 
3972     if test "x$CAT" = x; then
3973         if test "xcat" = x; then
3974           PROG_NAME=cat
3975         else
3976           PROG_NAME=cat
3977         fi
3978         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3979 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3980         as_fn_error $? "Cannot continue" "$LINENO" 5
3981     fi
3982 
3983 
3984 
3985     for ac_prog in chmod
3986 do
3987   # Extract the first word of "$ac_prog", so it can be a program name with args.
3988 set dummy $ac_prog; ac_word=$2
3989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3990 $as_echo_n "checking for $ac_word... " >&6; }
3991 if test "${ac_cv_path_CHMOD+set}" = set; then :
3992   $as_echo_n "(cached) " >&6
3993 else
3994   case $CHMOD in
3995   [\\/]* | ?:[\\/]*)
3996   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
3997   ;;
3998   *)
3999   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4000 for as_dir in $PATH
4001 do
4002   IFS=$as_save_IFS
4003   test -z "$as_dir" && as_dir=.
4004     for ac_exec_ext in '' $ac_executable_extensions; do
4005   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4006     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4007     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4008     break 2
4009   fi
4010 done
4011   done
4012 IFS=$as_save_IFS
4013 
4014   ;;
4015 esac
4016 fi
4017 CHMOD=$ac_cv_path_CHMOD
4018 if test -n "$CHMOD"; then
4019   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4020 $as_echo "$CHMOD" >&6; }
4021 else
4022   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4023 $as_echo "no" >&6; }
4024 fi
4025 
4026 
4027   test -n "$CHMOD" && break
4028 done
4029 
4030 
4031     if test "x$CHMOD" = x; then
4032         if test "xchmod" = x; then
4033           PROG_NAME=chmod
4034         else
4035           PROG_NAME=chmod
4036         fi
4037         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4038 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4039         as_fn_error $? "Cannot continue" "$LINENO" 5
4040     fi
4041 
4042 
4043 
4044     for ac_prog in cmp
4045 do
4046   # Extract the first word of "$ac_prog", so it can be a program name with args.
4047 set dummy $ac_prog; ac_word=$2
4048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4049 $as_echo_n "checking for $ac_word... " >&6; }
4050 if test "${ac_cv_path_CMP+set}" = set; then :
4051   $as_echo_n "(cached) " >&6
4052 else
4053   case $CMP in
4054   [\\/]* | ?:[\\/]*)
4055   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
4056   ;;
4057   *)
4058   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4059 for as_dir in $PATH
4060 do
4061   IFS=$as_save_IFS
4062   test -z "$as_dir" && as_dir=.
4063     for ac_exec_ext in '' $ac_executable_extensions; do
4064   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4065     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
4066     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4067     break 2
4068   fi
4069 done
4070   done
4071 IFS=$as_save_IFS
4072 
4073   ;;
4074 esac
4075 fi
4076 CMP=$ac_cv_path_CMP
4077 if test -n "$CMP"; then
4078   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
4079 $as_echo "$CMP" >&6; }
4080 else
4081   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4082 $as_echo "no" >&6; }
4083 fi
4084 
4085 
4086   test -n "$CMP" && break
4087 done
4088 
4089 
4090     if test "x$CMP" = x; then
4091         if test "xcmp" = x; then
4092           PROG_NAME=cmp
4093         else
4094           PROG_NAME=cmp
4095         fi
4096         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4097 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4098         as_fn_error $? "Cannot continue" "$LINENO" 5
4099     fi
4100 
4101 
4102 
4103     for ac_prog in comm
4104 do
4105   # Extract the first word of "$ac_prog", so it can be a program name with args.
4106 set dummy $ac_prog; ac_word=$2
4107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4108 $as_echo_n "checking for $ac_word... " >&6; }
4109 if test "${ac_cv_path_COMM+set}" = set; then :
4110   $as_echo_n "(cached) " >&6
4111 else
4112   case $COMM in
4113   [\\/]* | ?:[\\/]*)
4114   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
4115   ;;
4116   *)
4117   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4118 for as_dir in $PATH
4119 do
4120   IFS=$as_save_IFS
4121   test -z "$as_dir" && as_dir=.
4122     for ac_exec_ext in '' $ac_executable_extensions; do
4123   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4124     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
4125     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4126     break 2
4127   fi
4128 done
4129   done
4130 IFS=$as_save_IFS
4131 
4132   ;;
4133 esac
4134 fi
4135 COMM=$ac_cv_path_COMM
4136 if test -n "$COMM"; then
4137   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
4138 $as_echo "$COMM" >&6; }
4139 else
4140   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4141 $as_echo "no" >&6; }
4142 fi
4143 
4144 
4145   test -n "$COMM" && break
4146 done
4147 
4148 
4149     if test "x$COMM" = x; then
4150         if test "xcomm" = x; then
4151           PROG_NAME=comm
4152         else
4153           PROG_NAME=comm
4154         fi
4155         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4156 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4157         as_fn_error $? "Cannot continue" "$LINENO" 5
4158     fi
4159 
4160 
4161 
4162     for ac_prog in cp
4163 do
4164   # Extract the first word of "$ac_prog", so it can be a program name with args.
4165 set dummy $ac_prog; ac_word=$2
4166 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4167 $as_echo_n "checking for $ac_word... " >&6; }
4168 if test "${ac_cv_path_CP+set}" = set; then :
4169   $as_echo_n "(cached) " >&6
4170 else
4171   case $CP in
4172   [\\/]* | ?:[\\/]*)
4173   ac_cv_path_CP="$CP" # Let the user override the test with a path.
4174   ;;
4175   *)
4176   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4177 for as_dir in $PATH
4178 do
4179   IFS=$as_save_IFS
4180   test -z "$as_dir" && as_dir=.
4181     for ac_exec_ext in '' $ac_executable_extensions; do
4182   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4183     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4184     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4185     break 2
4186   fi
4187 done
4188   done
4189 IFS=$as_save_IFS
4190 
4191   ;;
4192 esac
4193 fi
4194 CP=$ac_cv_path_CP
4195 if test -n "$CP"; then
4196   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4197 $as_echo "$CP" >&6; }
4198 else
4199   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4200 $as_echo "no" >&6; }
4201 fi
4202 
4203 
4204   test -n "$CP" && break
4205 done
4206 
4207 
4208     if test "x$CP" = x; then
4209         if test "xcp" = x; then
4210           PROG_NAME=cp
4211         else
4212           PROG_NAME=cp
4213         fi
4214         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4215 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4216         as_fn_error $? "Cannot continue" "$LINENO" 5
4217     fi
4218 
4219 
4220 
4221     for ac_prog in cpio
4222 do
4223   # Extract the first word of "$ac_prog", so it can be a program name with args.
4224 set dummy $ac_prog; ac_word=$2
4225 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4226 $as_echo_n "checking for $ac_word... " >&6; }
4227 if test "${ac_cv_path_CPIO+set}" = set; then :
4228   $as_echo_n "(cached) " >&6
4229 else
4230   case $CPIO in
4231   [\\/]* | ?:[\\/]*)
4232   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
4233   ;;
4234   *)
4235   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4236 for as_dir in $PATH
4237 do
4238   IFS=$as_save_IFS
4239   test -z "$as_dir" && as_dir=.
4240     for ac_exec_ext in '' $ac_executable_extensions; do
4241   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4242     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
4243     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4244     break 2
4245   fi
4246 done
4247   done
4248 IFS=$as_save_IFS
4249 
4250   ;;
4251 esac
4252 fi
4253 CPIO=$ac_cv_path_CPIO
4254 if test -n "$CPIO"; then
4255   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
4256 $as_echo "$CPIO" >&6; }
4257 else
4258   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4259 $as_echo "no" >&6; }
4260 fi
4261 
4262 
4263   test -n "$CPIO" && break
4264 done
4265 
4266 
4267     if test "x$CPIO" = x; then
4268         if test "xcpio" = x; then
4269           PROG_NAME=cpio
4270         else
4271           PROG_NAME=cpio
4272         fi
4273         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4274 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4275         as_fn_error $? "Cannot continue" "$LINENO" 5
4276     fi
4277 
4278 
4279 
4280     for ac_prog in cut
4281 do
4282   # Extract the first word of "$ac_prog", so it can be a program name with args.
4283 set dummy $ac_prog; ac_word=$2
4284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4285 $as_echo_n "checking for $ac_word... " >&6; }
4286 if test "${ac_cv_path_CUT+set}" = set; then :
4287   $as_echo_n "(cached) " >&6
4288 else
4289   case $CUT in
4290   [\\/]* | ?:[\\/]*)
4291   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4292   ;;
4293   *)
4294   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4295 for as_dir in $PATH
4296 do
4297   IFS=$as_save_IFS
4298   test -z "$as_dir" && as_dir=.
4299     for ac_exec_ext in '' $ac_executable_extensions; do
4300   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4301     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4302     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4303     break 2
4304   fi
4305 done
4306   done
4307 IFS=$as_save_IFS
4308 
4309   ;;
4310 esac
4311 fi
4312 CUT=$ac_cv_path_CUT
4313 if test -n "$CUT"; then
4314   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4315 $as_echo "$CUT" >&6; }
4316 else
4317   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4318 $as_echo "no" >&6; }
4319 fi
4320 
4321 
4322   test -n "$CUT" && break
4323 done
4324 
4325 
4326     if test "x$CUT" = x; then
4327         if test "xcut" = x; then
4328           PROG_NAME=cut
4329         else
4330           PROG_NAME=cut
4331         fi
4332         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4333 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4334         as_fn_error $? "Cannot continue" "$LINENO" 5
4335     fi
4336 
4337 
4338 
4339     for ac_prog in date
4340 do
4341   # Extract the first word of "$ac_prog", so it can be a program name with args.
4342 set dummy $ac_prog; ac_word=$2
4343 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4344 $as_echo_n "checking for $ac_word... " >&6; }
4345 if test "${ac_cv_path_DATE+set}" = set; then :
4346   $as_echo_n "(cached) " >&6
4347 else
4348   case $DATE in
4349   [\\/]* | ?:[\\/]*)
4350   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4351   ;;
4352   *)
4353   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4354 for as_dir in $PATH
4355 do
4356   IFS=$as_save_IFS
4357   test -z "$as_dir" && as_dir=.
4358     for ac_exec_ext in '' $ac_executable_extensions; do
4359   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4360     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4361     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4362     break 2
4363   fi
4364 done
4365   done
4366 IFS=$as_save_IFS
4367 
4368   ;;
4369 esac
4370 fi
4371 DATE=$ac_cv_path_DATE
4372 if test -n "$DATE"; then
4373   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4374 $as_echo "$DATE" >&6; }
4375 else
4376   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4377 $as_echo "no" >&6; }
4378 fi
4379 
4380 
4381   test -n "$DATE" && break
4382 done
4383 
4384 
4385     if test "x$DATE" = x; then
4386         if test "xdate" = x; then
4387           PROG_NAME=date
4388         else
4389           PROG_NAME=date
4390         fi
4391         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4392 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4393         as_fn_error $? "Cannot continue" "$LINENO" 5
4394     fi
4395 
4396 
4397 
4398     for ac_prog in gdiff diff
4399 do
4400   # Extract the first word of "$ac_prog", so it can be a program name with args.
4401 set dummy $ac_prog; ac_word=$2
4402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4403 $as_echo_n "checking for $ac_word... " >&6; }
4404 if test "${ac_cv_path_DIFF+set}" = set; then :
4405   $as_echo_n "(cached) " >&6
4406 else
4407   case $DIFF in
4408   [\\/]* | ?:[\\/]*)
4409   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4410   ;;
4411   *)
4412   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4413 for as_dir in $PATH
4414 do
4415   IFS=$as_save_IFS
4416   test -z "$as_dir" && as_dir=.
4417     for ac_exec_ext in '' $ac_executable_extensions; do
4418   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4419     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4420     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4421     break 2
4422   fi
4423 done
4424   done
4425 IFS=$as_save_IFS
4426 
4427   ;;
4428 esac
4429 fi
4430 DIFF=$ac_cv_path_DIFF
4431 if test -n "$DIFF"; then
4432   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4433 $as_echo "$DIFF" >&6; }
4434 else
4435   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4436 $as_echo "no" >&6; }
4437 fi
4438 
4439 
4440   test -n "$DIFF" && break
4441 done
4442 
4443 
4444     if test "x$DIFF" = x; then
4445         if test "xgdiff diff" = x; then
4446           PROG_NAME=diff
4447         else
4448           PROG_NAME=gdiff diff
4449         fi
4450         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4451 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4452         as_fn_error $? "Cannot continue" "$LINENO" 5
4453     fi
4454 
4455 
4456 
4457     for ac_prog in dirname
4458 do
4459   # Extract the first word of "$ac_prog", so it can be a program name with args.
4460 set dummy $ac_prog; ac_word=$2
4461 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4462 $as_echo_n "checking for $ac_word... " >&6; }
4463 if test "${ac_cv_path_DIRNAME+set}" = set; then :
4464   $as_echo_n "(cached) " >&6
4465 else
4466   case $DIRNAME in
4467   [\\/]* | ?:[\\/]*)
4468   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
4469   ;;
4470   *)
4471   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4472 for as_dir in $PATH
4473 do
4474   IFS=$as_save_IFS
4475   test -z "$as_dir" && as_dir=.
4476     for ac_exec_ext in '' $ac_executable_extensions; do
4477   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4478     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
4479     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4480     break 2
4481   fi
4482 done
4483   done
4484 IFS=$as_save_IFS
4485 
4486   ;;
4487 esac
4488 fi
4489 DIRNAME=$ac_cv_path_DIRNAME
4490 if test -n "$DIRNAME"; then
4491   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
4492 $as_echo "$DIRNAME" >&6; }
4493 else
4494   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4495 $as_echo "no" >&6; }
4496 fi
4497 
4498 
4499   test -n "$DIRNAME" && break
4500 done
4501 
4502 
4503     if test "x$DIRNAME" = x; then
4504         if test "xdirname" = x; then
4505           PROG_NAME=dirname
4506         else
4507           PROG_NAME=dirname
4508         fi
4509         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4510 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4511         as_fn_error $? "Cannot continue" "$LINENO" 5
4512     fi
4513 
4514 
4515 
4516     for ac_prog in echo
4517 do
4518   # Extract the first word of "$ac_prog", so it can be a program name with args.
4519 set dummy $ac_prog; ac_word=$2
4520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4521 $as_echo_n "checking for $ac_word... " >&6; }
4522 if test "${ac_cv_path_ECHO+set}" = set; then :
4523   $as_echo_n "(cached) " >&6
4524 else
4525   case $ECHO in
4526   [\\/]* | ?:[\\/]*)
4527   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4528   ;;
4529   *)
4530   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4531 for as_dir in $PATH
4532 do
4533   IFS=$as_save_IFS
4534   test -z "$as_dir" && as_dir=.
4535     for ac_exec_ext in '' $ac_executable_extensions; do
4536   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4537     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4538     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4539     break 2
4540   fi
4541 done
4542   done
4543 IFS=$as_save_IFS
4544 
4545   ;;
4546 esac
4547 fi
4548 ECHO=$ac_cv_path_ECHO
4549 if test -n "$ECHO"; then
4550   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4551 $as_echo "$ECHO" >&6; }
4552 else
4553   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4554 $as_echo "no" >&6; }
4555 fi
4556 
4557 
4558   test -n "$ECHO" && break
4559 done
4560 
4561 
4562     if test "x$ECHO" = x; then
4563         if test "xecho" = x; then
4564           PROG_NAME=echo
4565         else
4566           PROG_NAME=echo
4567         fi
4568         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4569 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4570         as_fn_error $? "Cannot continue" "$LINENO" 5
4571     fi
4572 
4573 
4574 
4575     for ac_prog in expr
4576 do
4577   # Extract the first word of "$ac_prog", so it can be a program name with args.
4578 set dummy $ac_prog; ac_word=$2
4579 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4580 $as_echo_n "checking for $ac_word... " >&6; }
4581 if test "${ac_cv_path_EXPR+set}" = set; then :
4582   $as_echo_n "(cached) " >&6
4583 else
4584   case $EXPR in
4585   [\\/]* | ?:[\\/]*)
4586   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
4587   ;;
4588   *)
4589   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4590 for as_dir in $PATH
4591 do
4592   IFS=$as_save_IFS
4593   test -z "$as_dir" && as_dir=.
4594     for ac_exec_ext in '' $ac_executable_extensions; do
4595   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4596     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
4597     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4598     break 2
4599   fi
4600 done
4601   done
4602 IFS=$as_save_IFS
4603 
4604   ;;
4605 esac
4606 fi
4607 EXPR=$ac_cv_path_EXPR
4608 if test -n "$EXPR"; then
4609   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
4610 $as_echo "$EXPR" >&6; }
4611 else
4612   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4613 $as_echo "no" >&6; }
4614 fi
4615 
4616 
4617   test -n "$EXPR" && break
4618 done
4619 
4620 
4621     if test "x$EXPR" = x; then
4622         if test "xexpr" = x; then
4623           PROG_NAME=expr
4624         else
4625           PROG_NAME=expr
4626         fi
4627         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4628 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4629         as_fn_error $? "Cannot continue" "$LINENO" 5
4630     fi
4631 
4632 
4633 
4634     for ac_prog in file
4635 do
4636   # Extract the first word of "$ac_prog", so it can be a program name with args.
4637 set dummy $ac_prog; ac_word=$2
4638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4639 $as_echo_n "checking for $ac_word... " >&6; }
4640 if test "${ac_cv_path_FILE+set}" = set; then :
4641   $as_echo_n "(cached) " >&6
4642 else
4643   case $FILE in
4644   [\\/]* | ?:[\\/]*)
4645   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
4646   ;;
4647   *)
4648   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4649 for as_dir in $PATH
4650 do
4651   IFS=$as_save_IFS
4652   test -z "$as_dir" && as_dir=.
4653     for ac_exec_ext in '' $ac_executable_extensions; do
4654   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4655     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
4656     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4657     break 2
4658   fi
4659 done
4660   done
4661 IFS=$as_save_IFS
4662 
4663   ;;
4664 esac
4665 fi
4666 FILE=$ac_cv_path_FILE
4667 if test -n "$FILE"; then
4668   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
4669 $as_echo "$FILE" >&6; }
4670 else
4671   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4672 $as_echo "no" >&6; }
4673 fi
4674 
4675 
4676   test -n "$FILE" && break
4677 done
4678 
4679 
4680     if test "x$FILE" = x; then
4681         if test "xfile" = x; then
4682           PROG_NAME=file
4683         else
4684           PROG_NAME=file
4685         fi
4686         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4687 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4688         as_fn_error $? "Cannot continue" "$LINENO" 5
4689     fi
4690 
4691 
4692 
4693     for ac_prog in find
4694 do
4695   # Extract the first word of "$ac_prog", so it can be a program name with args.
4696 set dummy $ac_prog; ac_word=$2
4697 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4698 $as_echo_n "checking for $ac_word... " >&6; }
4699 if test "${ac_cv_path_FIND+set}" = set; then :
4700   $as_echo_n "(cached) " >&6
4701 else
4702   case $FIND in
4703   [\\/]* | ?:[\\/]*)
4704   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
4705   ;;
4706   *)
4707   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4708 for as_dir in $PATH
4709 do
4710   IFS=$as_save_IFS
4711   test -z "$as_dir" && as_dir=.
4712     for ac_exec_ext in '' $ac_executable_extensions; do
4713   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4714     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
4715     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4716     break 2
4717   fi
4718 done
4719   done
4720 IFS=$as_save_IFS
4721 
4722   ;;
4723 esac
4724 fi
4725 FIND=$ac_cv_path_FIND
4726 if test -n "$FIND"; then
4727   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
4728 $as_echo "$FIND" >&6; }
4729 else
4730   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4731 $as_echo "no" >&6; }
4732 fi
4733 
4734 
4735   test -n "$FIND" && break
4736 done
4737 
4738 
4739     if test "x$FIND" = x; then
4740         if test "xfind" = x; then
4741           PROG_NAME=find
4742         else
4743           PROG_NAME=find
4744         fi
4745         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4746 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4747         as_fn_error $? "Cannot continue" "$LINENO" 5
4748     fi
4749 
4750 
4751 
4752     for ac_prog in head
4753 do
4754   # Extract the first word of "$ac_prog", so it can be a program name with args.
4755 set dummy $ac_prog; ac_word=$2
4756 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4757 $as_echo_n "checking for $ac_word... " >&6; }
4758 if test "${ac_cv_path_HEAD+set}" = set; then :
4759   $as_echo_n "(cached) " >&6
4760 else
4761   case $HEAD in
4762   [\\/]* | ?:[\\/]*)
4763   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
4764   ;;
4765   *)
4766   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4767 for as_dir in $PATH
4768 do
4769   IFS=$as_save_IFS
4770   test -z "$as_dir" && as_dir=.
4771     for ac_exec_ext in '' $ac_executable_extensions; do
4772   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4773     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
4774     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4775     break 2
4776   fi
4777 done
4778   done
4779 IFS=$as_save_IFS
4780 
4781   ;;
4782 esac
4783 fi
4784 HEAD=$ac_cv_path_HEAD
4785 if test -n "$HEAD"; then
4786   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
4787 $as_echo "$HEAD" >&6; }
4788 else
4789   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4790 $as_echo "no" >&6; }
4791 fi
4792 
4793 
4794   test -n "$HEAD" && break
4795 done
4796 
4797 
4798     if test "x$HEAD" = x; then
4799         if test "xhead" = x; then
4800           PROG_NAME=head
4801         else
4802           PROG_NAME=head
4803         fi
4804         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4805 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4806         as_fn_error $? "Cannot continue" "$LINENO" 5
4807     fi
4808 
4809 
4810 
4811     for ac_prog in ln
4812 do
4813   # Extract the first word of "$ac_prog", so it can be a program name with args.
4814 set dummy $ac_prog; ac_word=$2
4815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4816 $as_echo_n "checking for $ac_word... " >&6; }
4817 if test "${ac_cv_path_LN+set}" = set; then :
4818   $as_echo_n "(cached) " >&6
4819 else
4820   case $LN in
4821   [\\/]* | ?:[\\/]*)
4822   ac_cv_path_LN="$LN" # Let the user override the test with a path.
4823   ;;
4824   *)
4825   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4826 for as_dir in $PATH
4827 do
4828   IFS=$as_save_IFS
4829   test -z "$as_dir" && as_dir=.
4830     for ac_exec_ext in '' $ac_executable_extensions; do
4831   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4832     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4833     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4834     break 2
4835   fi
4836 done
4837   done
4838 IFS=$as_save_IFS
4839 
4840   ;;
4841 esac
4842 fi
4843 LN=$ac_cv_path_LN
4844 if test -n "$LN"; then
4845   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4846 $as_echo "$LN" >&6; }
4847 else
4848   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4849 $as_echo "no" >&6; }
4850 fi
4851 
4852 
4853   test -n "$LN" && break
4854 done
4855 
4856 
4857     if test "x$LN" = x; then
4858         if test "xln" = x; then
4859           PROG_NAME=ln
4860         else
4861           PROG_NAME=ln
4862         fi
4863         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4864 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4865         as_fn_error $? "Cannot continue" "$LINENO" 5
4866     fi
4867 
4868 
4869 
4870     for ac_prog in ls
4871 do
4872   # Extract the first word of "$ac_prog", so it can be a program name with args.
4873 set dummy $ac_prog; ac_word=$2
4874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4875 $as_echo_n "checking for $ac_word... " >&6; }
4876 if test "${ac_cv_path_LS+set}" = set; then :
4877   $as_echo_n "(cached) " >&6
4878 else
4879   case $LS in
4880   [\\/]* | ?:[\\/]*)
4881   ac_cv_path_LS="$LS" # Let the user override the test with a path.
4882   ;;
4883   *)
4884   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4885 for as_dir in $PATH
4886 do
4887   IFS=$as_save_IFS
4888   test -z "$as_dir" && as_dir=.
4889     for ac_exec_ext in '' $ac_executable_extensions; do
4890   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4891     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4892     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4893     break 2
4894   fi
4895 done
4896   done
4897 IFS=$as_save_IFS
4898 
4899   ;;
4900 esac
4901 fi
4902 LS=$ac_cv_path_LS
4903 if test -n "$LS"; then
4904   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
4905 $as_echo "$LS" >&6; }
4906 else
4907   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4908 $as_echo "no" >&6; }
4909 fi
4910 
4911 
4912   test -n "$LS" && break
4913 done
4914 
4915 
4916     if test "x$LS" = x; then
4917         if test "xls" = x; then
4918           PROG_NAME=ls
4919         else
4920           PROG_NAME=ls
4921         fi
4922         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4923 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4924         as_fn_error $? "Cannot continue" "$LINENO" 5
4925     fi
4926 
4927 
4928 
4929     for ac_prog in mkdir
4930 do
4931   # Extract the first word of "$ac_prog", so it can be a program name with args.
4932 set dummy $ac_prog; ac_word=$2
4933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4934 $as_echo_n "checking for $ac_word... " >&6; }
4935 if test "${ac_cv_path_MKDIR+set}" = set; then :
4936   $as_echo_n "(cached) " >&6
4937 else
4938   case $MKDIR in
4939   [\\/]* | ?:[\\/]*)
4940   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
4941   ;;
4942   *)
4943   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4944 for as_dir in $PATH
4945 do
4946   IFS=$as_save_IFS
4947   test -z "$as_dir" && as_dir=.
4948     for ac_exec_ext in '' $ac_executable_extensions; do
4949   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4950     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
4951     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4952     break 2
4953   fi
4954 done
4955   done
4956 IFS=$as_save_IFS
4957 
4958   ;;
4959 esac
4960 fi
4961 MKDIR=$ac_cv_path_MKDIR
4962 if test -n "$MKDIR"; then
4963   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
4964 $as_echo "$MKDIR" >&6; }
4965 else
4966   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4967 $as_echo "no" >&6; }
4968 fi
4969 
4970 
4971   test -n "$MKDIR" && break
4972 done
4973 
4974 
4975     if test "x$MKDIR" = x; then
4976         if test "xmkdir" = x; then
4977           PROG_NAME=mkdir
4978         else
4979           PROG_NAME=mkdir
4980         fi
4981         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4982 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4983         as_fn_error $? "Cannot continue" "$LINENO" 5
4984     fi
4985 
4986 
4987 
4988     for ac_prog in mktemp
4989 do
4990   # Extract the first word of "$ac_prog", so it can be a program name with args.
4991 set dummy $ac_prog; ac_word=$2
4992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4993 $as_echo_n "checking for $ac_word... " >&6; }
4994 if test "${ac_cv_path_MKTEMP+set}" = set; then :
4995   $as_echo_n "(cached) " >&6
4996 else
4997   case $MKTEMP in
4998   [\\/]* | ?:[\\/]*)
4999   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
5000   ;;
5001   *)
5002   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5003 for as_dir in $PATH
5004 do
5005   IFS=$as_save_IFS
5006   test -z "$as_dir" && as_dir=.
5007     for ac_exec_ext in '' $ac_executable_extensions; do
5008   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5009     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
5010     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5011     break 2
5012   fi
5013 done
5014   done
5015 IFS=$as_save_IFS
5016 
5017   ;;
5018 esac
5019 fi
5020 MKTEMP=$ac_cv_path_MKTEMP
5021 if test -n "$MKTEMP"; then
5022   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
5023 $as_echo "$MKTEMP" >&6; }
5024 else
5025   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5026 $as_echo "no" >&6; }
5027 fi
5028 
5029 
5030   test -n "$MKTEMP" && break
5031 done
5032 
5033 
5034     if test "x$MKTEMP" = x; then
5035         if test "xmktemp" = x; then
5036           PROG_NAME=mktemp
5037         else
5038           PROG_NAME=mktemp
5039         fi
5040         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5041 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5042         as_fn_error $? "Cannot continue" "$LINENO" 5
5043     fi
5044 
5045 
5046 
5047     for ac_prog in mv
5048 do
5049   # Extract the first word of "$ac_prog", so it can be a program name with args.
5050 set dummy $ac_prog; ac_word=$2
5051 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5052 $as_echo_n "checking for $ac_word... " >&6; }
5053 if test "${ac_cv_path_MV+set}" = set; then :
5054   $as_echo_n "(cached) " >&6
5055 else
5056   case $MV in
5057   [\\/]* | ?:[\\/]*)
5058   ac_cv_path_MV="$MV" # Let the user override the test with a path.
5059   ;;
5060   *)
5061   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5062 for as_dir in $PATH
5063 do
5064   IFS=$as_save_IFS
5065   test -z "$as_dir" && as_dir=.
5066     for ac_exec_ext in '' $ac_executable_extensions; do
5067   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5068     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
5069     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5070     break 2
5071   fi
5072 done
5073   done
5074 IFS=$as_save_IFS
5075 
5076   ;;
5077 esac
5078 fi
5079 MV=$ac_cv_path_MV
5080 if test -n "$MV"; then
5081   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
5082 $as_echo "$MV" >&6; }
5083 else
5084   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5085 $as_echo "no" >&6; }
5086 fi
5087 
5088 
5089   test -n "$MV" && break
5090 done
5091 
5092 
5093     if test "x$MV" = x; then
5094         if test "xmv" = x; then
5095           PROG_NAME=mv
5096         else
5097           PROG_NAME=mv
5098         fi
5099         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5100 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5101         as_fn_error $? "Cannot continue" "$LINENO" 5
5102     fi
5103 
5104 
5105 
5106     for ac_prog in printf
5107 do
5108   # Extract the first word of "$ac_prog", so it can be a program name with args.
5109 set dummy $ac_prog; ac_word=$2
5110 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5111 $as_echo_n "checking for $ac_word... " >&6; }
5112 if test "${ac_cv_path_PRINTF+set}" = set; then :
5113   $as_echo_n "(cached) " >&6
5114 else
5115   case $PRINTF in
5116   [\\/]* | ?:[\\/]*)
5117   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
5118   ;;
5119   *)
5120   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5121 for as_dir in $PATH
5122 do
5123   IFS=$as_save_IFS
5124   test -z "$as_dir" && as_dir=.
5125     for ac_exec_ext in '' $ac_executable_extensions; do
5126   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5127     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
5128     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5129     break 2
5130   fi
5131 done
5132   done
5133 IFS=$as_save_IFS
5134 
5135   ;;
5136 esac
5137 fi
5138 PRINTF=$ac_cv_path_PRINTF
5139 if test -n "$PRINTF"; then
5140   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
5141 $as_echo "$PRINTF" >&6; }
5142 else
5143   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5144 $as_echo "no" >&6; }
5145 fi
5146 
5147 
5148   test -n "$PRINTF" && break
5149 done
5150 
5151 
5152     if test "x$PRINTF" = x; then
5153         if test "xprintf" = x; then
5154           PROG_NAME=printf
5155         else
5156           PROG_NAME=printf
5157         fi
5158         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5159 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5160         as_fn_error $? "Cannot continue" "$LINENO" 5
5161     fi
5162 
5163 
5164 
5165     for ac_prog in pwd
5166 do
5167   # Extract the first word of "$ac_prog", so it can be a program name with args.
5168 set dummy $ac_prog; ac_word=$2
5169 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5170 $as_echo_n "checking for $ac_word... " >&6; }
5171 if test "${ac_cv_path_THEPWDCMD+set}" = set; then :
5172   $as_echo_n "(cached) " >&6
5173 else
5174   case $THEPWDCMD in
5175   [\\/]* | ?:[\\/]*)
5176   ac_cv_path_THEPWDCMD="$THEPWDCMD" # Let the user override the test with a path.
5177   ;;
5178   *)
5179   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5180 for as_dir in $PATH
5181 do
5182   IFS=$as_save_IFS
5183   test -z "$as_dir" && as_dir=.
5184     for ac_exec_ext in '' $ac_executable_extensions; do
5185   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5186     ac_cv_path_THEPWDCMD="$as_dir/$ac_word$ac_exec_ext"
5187     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5188     break 2
5189   fi
5190 done
5191   done
5192 IFS=$as_save_IFS
5193 
5194   ;;
5195 esac
5196 fi
5197 THEPWDCMD=$ac_cv_path_THEPWDCMD
5198 if test -n "$THEPWDCMD"; then
5199   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $THEPWDCMD" >&5
5200 $as_echo "$THEPWDCMD" >&6; }
5201 else
5202   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5203 $as_echo "no" >&6; }
5204 fi
5205 
5206 
5207   test -n "$THEPWDCMD" && break
5208 done
5209 
5210 
5211     if test "x$THEPWDCMD" = x; then
5212         if test "xpwd" = x; then
5213           PROG_NAME=thepwdcmd
5214         else
5215           PROG_NAME=pwd
5216         fi
5217         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5218 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5219         as_fn_error $? "Cannot continue" "$LINENO" 5
5220     fi
5221 
5222 
5223 
5224     for ac_prog in rm
5225 do
5226   # Extract the first word of "$ac_prog", so it can be a program name with args.
5227 set dummy $ac_prog; ac_word=$2
5228 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5229 $as_echo_n "checking for $ac_word... " >&6; }
5230 if test "${ac_cv_path_RM+set}" = set; then :
5231   $as_echo_n "(cached) " >&6
5232 else
5233   case $RM in
5234   [\\/]* | ?:[\\/]*)
5235   ac_cv_path_RM="$RM" # Let the user override the test with a path.
5236   ;;
5237   *)
5238   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5239 for as_dir in $PATH
5240 do
5241   IFS=$as_save_IFS
5242   test -z "$as_dir" && as_dir=.
5243     for ac_exec_ext in '' $ac_executable_extensions; do
5244   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5245     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
5246     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5247     break 2
5248   fi
5249 done
5250   done
5251 IFS=$as_save_IFS
5252 
5253   ;;
5254 esac
5255 fi
5256 RM=$ac_cv_path_RM
5257 if test -n "$RM"; then
5258   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
5259 $as_echo "$RM" >&6; }
5260 else
5261   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5262 $as_echo "no" >&6; }
5263 fi
5264 
5265 
5266   test -n "$RM" && break
5267 done
5268 
5269 
5270     if test "x$RM" = x; then
5271         if test "xrm" = x; then
5272           PROG_NAME=rm
5273         else
5274           PROG_NAME=rm
5275         fi
5276         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5277 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5278         as_fn_error $? "Cannot continue" "$LINENO" 5
5279     fi
5280 
5281 
5282 
5283     for ac_prog in sh
5284 do
5285   # Extract the first word of "$ac_prog", so it can be a program name with args.
5286 set dummy $ac_prog; ac_word=$2
5287 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5288 $as_echo_n "checking for $ac_word... " >&6; }
5289 if test "${ac_cv_path_SH+set}" = set; then :
5290   $as_echo_n "(cached) " >&6
5291 else
5292   case $SH in
5293   [\\/]* | ?:[\\/]*)
5294   ac_cv_path_SH="$SH" # Let the user override the test with a path.
5295   ;;
5296   *)
5297   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5298 for as_dir in $PATH
5299 do
5300   IFS=$as_save_IFS
5301   test -z "$as_dir" && as_dir=.
5302     for ac_exec_ext in '' $ac_executable_extensions; do
5303   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5304     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5305     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5306     break 2
5307   fi
5308 done
5309   done
5310 IFS=$as_save_IFS
5311 
5312   ;;
5313 esac
5314 fi
5315 SH=$ac_cv_path_SH
5316 if test -n "$SH"; then
5317   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5318 $as_echo "$SH" >&6; }
5319 else
5320   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5321 $as_echo "no" >&6; }
5322 fi
5323 
5324 
5325   test -n "$SH" && break
5326 done
5327 
5328 
5329     if test "x$SH" = x; then
5330         if test "xsh" = x; then
5331           PROG_NAME=sh
5332         else
5333           PROG_NAME=sh
5334         fi
5335         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5336 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5337         as_fn_error $? "Cannot continue" "$LINENO" 5
5338     fi
5339 
5340 
5341 
5342     for ac_prog in sort
5343 do
5344   # Extract the first word of "$ac_prog", so it can be a program name with args.
5345 set dummy $ac_prog; ac_word=$2
5346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5347 $as_echo_n "checking for $ac_word... " >&6; }
5348 if test "${ac_cv_path_SORT+set}" = set; then :
5349   $as_echo_n "(cached) " >&6
5350 else
5351   case $SORT in
5352   [\\/]* | ?:[\\/]*)
5353   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
5354   ;;
5355   *)
5356   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5357 for as_dir in $PATH
5358 do
5359   IFS=$as_save_IFS
5360   test -z "$as_dir" && as_dir=.
5361     for ac_exec_ext in '' $ac_executable_extensions; do
5362   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5363     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
5364     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5365     break 2
5366   fi
5367 done
5368   done
5369 IFS=$as_save_IFS
5370 
5371   ;;
5372 esac
5373 fi
5374 SORT=$ac_cv_path_SORT
5375 if test -n "$SORT"; then
5376   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5377 $as_echo "$SORT" >&6; }
5378 else
5379   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5380 $as_echo "no" >&6; }
5381 fi
5382 
5383 
5384   test -n "$SORT" && break
5385 done
5386 
5387 
5388     if test "x$SORT" = x; then
5389         if test "xsort" = x; then
5390           PROG_NAME=sort
5391         else
5392           PROG_NAME=sort
5393         fi
5394         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5395 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5396         as_fn_error $? "Cannot continue" "$LINENO" 5
5397     fi
5398 
5399 
5400 
5401     for ac_prog in tail
5402 do
5403   # Extract the first word of "$ac_prog", so it can be a program name with args.
5404 set dummy $ac_prog; ac_word=$2
5405 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5406 $as_echo_n "checking for $ac_word... " >&6; }
5407 if test "${ac_cv_path_TAIL+set}" = set; then :
5408   $as_echo_n "(cached) " >&6
5409 else
5410   case $TAIL in
5411   [\\/]* | ?:[\\/]*)
5412   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5413   ;;
5414   *)
5415   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5416 for as_dir in $PATH
5417 do
5418   IFS=$as_save_IFS
5419   test -z "$as_dir" && as_dir=.
5420     for ac_exec_ext in '' $ac_executable_extensions; do
5421   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5422     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5423     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5424     break 2
5425   fi
5426 done
5427   done
5428 IFS=$as_save_IFS
5429 
5430   ;;
5431 esac
5432 fi
5433 TAIL=$ac_cv_path_TAIL
5434 if test -n "$TAIL"; then
5435   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5436 $as_echo "$TAIL" >&6; }
5437 else
5438   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5439 $as_echo "no" >&6; }
5440 fi
5441 
5442 
5443   test -n "$TAIL" && break
5444 done
5445 
5446 
5447     if test "x$TAIL" = x; then
5448         if test "xtail" = x; then
5449           PROG_NAME=tail
5450         else
5451           PROG_NAME=tail
5452         fi
5453         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5454 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5455         as_fn_error $? "Cannot continue" "$LINENO" 5
5456     fi
5457 
5458 
5459 
5460     for ac_prog in tar
5461 do
5462   # Extract the first word of "$ac_prog", so it can be a program name with args.
5463 set dummy $ac_prog; ac_word=$2
5464 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5465 $as_echo_n "checking for $ac_word... " >&6; }
5466 if test "${ac_cv_path_TAR+set}" = set; then :
5467   $as_echo_n "(cached) " >&6
5468 else
5469   case $TAR in
5470   [\\/]* | ?:[\\/]*)
5471   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5472   ;;
5473   *)
5474   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5475 for as_dir in $PATH
5476 do
5477   IFS=$as_save_IFS
5478   test -z "$as_dir" && as_dir=.
5479     for ac_exec_ext in '' $ac_executable_extensions; do
5480   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5481     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5482     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5483     break 2
5484   fi
5485 done
5486   done
5487 IFS=$as_save_IFS
5488 
5489   ;;
5490 esac
5491 fi
5492 TAR=$ac_cv_path_TAR
5493 if test -n "$TAR"; then
5494   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5495 $as_echo "$TAR" >&6; }
5496 else
5497   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5498 $as_echo "no" >&6; }
5499 fi
5500 
5501 
5502   test -n "$TAR" && break
5503 done
5504 
5505 
5506     if test "x$TAR" = x; then
5507         if test "xtar" = x; then
5508           PROG_NAME=tar
5509         else
5510           PROG_NAME=tar
5511         fi
5512         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5513 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5514         as_fn_error $? "Cannot continue" "$LINENO" 5
5515     fi
5516 
5517 
5518 
5519     for ac_prog in tee
5520 do
5521   # Extract the first word of "$ac_prog", so it can be a program name with args.
5522 set dummy $ac_prog; ac_word=$2
5523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5524 $as_echo_n "checking for $ac_word... " >&6; }
5525 if test "${ac_cv_path_TEE+set}" = set; then :
5526   $as_echo_n "(cached) " >&6
5527 else
5528   case $TEE in
5529   [\\/]* | ?:[\\/]*)
5530   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5531   ;;
5532   *)
5533   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5534 for as_dir in $PATH
5535 do
5536   IFS=$as_save_IFS
5537   test -z "$as_dir" && as_dir=.
5538     for ac_exec_ext in '' $ac_executable_extensions; do
5539   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5540     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5541     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5542     break 2
5543   fi
5544 done
5545   done
5546 IFS=$as_save_IFS
5547 
5548   ;;
5549 esac
5550 fi
5551 TEE=$ac_cv_path_TEE
5552 if test -n "$TEE"; then
5553   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5554 $as_echo "$TEE" >&6; }
5555 else
5556   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5557 $as_echo "no" >&6; }
5558 fi
5559 
5560 
5561   test -n "$TEE" && break
5562 done
5563 
5564 
5565     if test "x$TEE" = x; then
5566         if test "xtee" = x; then
5567           PROG_NAME=tee
5568         else
5569           PROG_NAME=tee
5570         fi
5571         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5572 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5573         as_fn_error $? "Cannot continue" "$LINENO" 5
5574     fi
5575 
5576 
5577 
5578     for ac_prog in touch
5579 do
5580   # Extract the first word of "$ac_prog", so it can be a program name with args.
5581 set dummy $ac_prog; ac_word=$2
5582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5583 $as_echo_n "checking for $ac_word... " >&6; }
5584 if test "${ac_cv_path_TOUCH+set}" = set; then :
5585   $as_echo_n "(cached) " >&6
5586 else
5587   case $TOUCH in
5588   [\\/]* | ?:[\\/]*)
5589   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5590   ;;
5591   *)
5592   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5593 for as_dir in $PATH
5594 do
5595   IFS=$as_save_IFS
5596   test -z "$as_dir" && as_dir=.
5597     for ac_exec_ext in '' $ac_executable_extensions; do
5598   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5599     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5600     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5601     break 2
5602   fi
5603 done
5604   done
5605 IFS=$as_save_IFS
5606 
5607   ;;
5608 esac
5609 fi
5610 TOUCH=$ac_cv_path_TOUCH
5611 if test -n "$TOUCH"; then
5612   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5613 $as_echo "$TOUCH" >&6; }
5614 else
5615   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5616 $as_echo "no" >&6; }
5617 fi
5618 
5619 
5620   test -n "$TOUCH" && break
5621 done
5622 
5623 
5624     if test "x$TOUCH" = x; then
5625         if test "xtouch" = x; then
5626           PROG_NAME=touch
5627         else
5628           PROG_NAME=touch
5629         fi
5630         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5631 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5632         as_fn_error $? "Cannot continue" "$LINENO" 5
5633     fi
5634 
5635 
5636 
5637     for ac_prog in tr
5638 do
5639   # Extract the first word of "$ac_prog", so it can be a program name with args.
5640 set dummy $ac_prog; ac_word=$2
5641 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5642 $as_echo_n "checking for $ac_word... " >&6; }
5643 if test "${ac_cv_path_TR+set}" = set; then :
5644   $as_echo_n "(cached) " >&6
5645 else
5646   case $TR in
5647   [\\/]* | ?:[\\/]*)
5648   ac_cv_path_TR="$TR" # Let the user override the test with a path.
5649   ;;
5650   *)
5651   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5652 for as_dir in $PATH
5653 do
5654   IFS=$as_save_IFS
5655   test -z "$as_dir" && as_dir=.
5656     for ac_exec_ext in '' $ac_executable_extensions; do
5657   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5658     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5659     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5660     break 2
5661   fi
5662 done
5663   done
5664 IFS=$as_save_IFS
5665 
5666   ;;
5667 esac
5668 fi
5669 TR=$ac_cv_path_TR
5670 if test -n "$TR"; then
5671   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5672 $as_echo "$TR" >&6; }
5673 else
5674   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5675 $as_echo "no" >&6; }
5676 fi
5677 
5678 
5679   test -n "$TR" && break
5680 done
5681 
5682 
5683     if test "x$TR" = x; then
5684         if test "xtr" = x; then
5685           PROG_NAME=tr
5686         else
5687           PROG_NAME=tr
5688         fi
5689         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5690 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5691         as_fn_error $? "Cannot continue" "$LINENO" 5
5692     fi
5693 
5694 
5695 
5696     for ac_prog in uname
5697 do
5698   # Extract the first word of "$ac_prog", so it can be a program name with args.
5699 set dummy $ac_prog; ac_word=$2
5700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5701 $as_echo_n "checking for $ac_word... " >&6; }
5702 if test "${ac_cv_path_UNAME+set}" = set; then :
5703   $as_echo_n "(cached) " >&6
5704 else
5705   case $UNAME in
5706   [\\/]* | ?:[\\/]*)
5707   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
5708   ;;
5709   *)
5710   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5711 for as_dir in $PATH
5712 do
5713   IFS=$as_save_IFS
5714   test -z "$as_dir" && as_dir=.
5715     for ac_exec_ext in '' $ac_executable_extensions; do
5716   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5717     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
5718     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5719     break 2
5720   fi
5721 done
5722   done
5723 IFS=$as_save_IFS
5724 
5725   ;;
5726 esac
5727 fi
5728 UNAME=$ac_cv_path_UNAME
5729 if test -n "$UNAME"; then
5730   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
5731 $as_echo "$UNAME" >&6; }
5732 else
5733   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5734 $as_echo "no" >&6; }
5735 fi
5736 
5737 
5738   test -n "$UNAME" && break
5739 done
5740 
5741 
5742     if test "x$UNAME" = x; then
5743         if test "xuname" = x; then
5744           PROG_NAME=uname
5745         else
5746           PROG_NAME=uname
5747         fi
5748         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5749 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5750         as_fn_error $? "Cannot continue" "$LINENO" 5
5751     fi
5752 
5753 
5754 
5755     for ac_prog in uniq
5756 do
5757   # Extract the first word of "$ac_prog", so it can be a program name with args.
5758 set dummy $ac_prog; ac_word=$2
5759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5760 $as_echo_n "checking for $ac_word... " >&6; }
5761 if test "${ac_cv_path_UNIQ+set}" = set; then :
5762   $as_echo_n "(cached) " >&6
5763 else
5764   case $UNIQ in
5765   [\\/]* | ?:[\\/]*)
5766   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5767   ;;
5768   *)
5769   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5770 for as_dir in $PATH
5771 do
5772   IFS=$as_save_IFS
5773   test -z "$as_dir" && as_dir=.
5774     for ac_exec_ext in '' $ac_executable_extensions; do
5775   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5776     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5777     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5778     break 2
5779   fi
5780 done
5781   done
5782 IFS=$as_save_IFS
5783 
5784   ;;
5785 esac
5786 fi
5787 UNIQ=$ac_cv_path_UNIQ
5788 if test -n "$UNIQ"; then
5789   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
5790 $as_echo "$UNIQ" >&6; }
5791 else
5792   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5793 $as_echo "no" >&6; }
5794 fi
5795 
5796 
5797   test -n "$UNIQ" && break
5798 done
5799 
5800 
5801     if test "x$UNIQ" = x; then
5802         if test "xuniq" = x; then
5803           PROG_NAME=uniq
5804         else
5805           PROG_NAME=uniq
5806         fi
5807         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5808 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5809         as_fn_error $? "Cannot continue" "$LINENO" 5
5810     fi
5811 
5812 
5813 
5814     for ac_prog in wc
5815 do
5816   # Extract the first word of "$ac_prog", so it can be a program name with args.
5817 set dummy $ac_prog; ac_word=$2
5818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5819 $as_echo_n "checking for $ac_word... " >&6; }
5820 if test "${ac_cv_path_WC+set}" = set; then :
5821   $as_echo_n "(cached) " >&6
5822 else
5823   case $WC in
5824   [\\/]* | ?:[\\/]*)
5825   ac_cv_path_WC="$WC" # Let the user override the test with a path.
5826   ;;
5827   *)
5828   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5829 for as_dir in $PATH
5830 do
5831   IFS=$as_save_IFS
5832   test -z "$as_dir" && as_dir=.
5833     for ac_exec_ext in '' $ac_executable_extensions; do
5834   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5835     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5836     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5837     break 2
5838   fi
5839 done
5840   done
5841 IFS=$as_save_IFS
5842 
5843   ;;
5844 esac
5845 fi
5846 WC=$ac_cv_path_WC
5847 if test -n "$WC"; then
5848   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
5849 $as_echo "$WC" >&6; }
5850 else
5851   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5852 $as_echo "no" >&6; }
5853 fi
5854 
5855 
5856   test -n "$WC" && break
5857 done
5858 
5859 
5860     if test "x$WC" = x; then
5861         if test "xwc" = x; then
5862           PROG_NAME=wc
5863         else
5864           PROG_NAME=wc
5865         fi
5866         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5867 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5868         as_fn_error $? "Cannot continue" "$LINENO" 5
5869     fi
5870 
5871 
5872 
5873     for ac_prog in which
5874 do
5875   # Extract the first word of "$ac_prog", so it can be a program name with args.
5876 set dummy $ac_prog; ac_word=$2
5877 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5878 $as_echo_n "checking for $ac_word... " >&6; }
5879 if test "${ac_cv_path_WHICH+set}" = set; then :
5880   $as_echo_n "(cached) " >&6
5881 else
5882   case $WHICH in
5883   [\\/]* | ?:[\\/]*)
5884   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5885   ;;
5886   *)
5887   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5888 for as_dir in $PATH
5889 do
5890   IFS=$as_save_IFS
5891   test -z "$as_dir" && as_dir=.
5892     for ac_exec_ext in '' $ac_executable_extensions; do
5893   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5894     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5895     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5896     break 2
5897   fi
5898 done
5899   done
5900 IFS=$as_save_IFS
5901 
5902   ;;
5903 esac
5904 fi
5905 WHICH=$ac_cv_path_WHICH
5906 if test -n "$WHICH"; then
5907   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
5908 $as_echo "$WHICH" >&6; }
5909 else
5910   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5911 $as_echo "no" >&6; }
5912 fi
5913 
5914 
5915   test -n "$WHICH" && break
5916 done
5917 
5918 
5919     if test "x$WHICH" = x; then
5920         if test "xwhich" = x; then
5921           PROG_NAME=which
5922         else
5923           PROG_NAME=which
5924         fi
5925         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5926 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5927         as_fn_error $? "Cannot continue" "$LINENO" 5
5928     fi
5929 
5930 
5931 
5932     for ac_prog in xargs
5933 do
5934   # Extract the first word of "$ac_prog", so it can be a program name with args.
5935 set dummy $ac_prog; ac_word=$2
5936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5937 $as_echo_n "checking for $ac_word... " >&6; }
5938 if test "${ac_cv_path_XARGS+set}" = set; then :
5939   $as_echo_n "(cached) " >&6
5940 else
5941   case $XARGS in
5942   [\\/]* | ?:[\\/]*)
5943   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5944   ;;
5945   *)
5946   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5947 for as_dir in $PATH
5948 do
5949   IFS=$as_save_IFS
5950   test -z "$as_dir" && as_dir=.
5951     for ac_exec_ext in '' $ac_executable_extensions; do
5952   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5953     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
5954     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5955     break 2
5956   fi
5957 done
5958   done
5959 IFS=$as_save_IFS
5960 
5961   ;;
5962 esac
5963 fi
5964 XARGS=$ac_cv_path_XARGS
5965 if test -n "$XARGS"; then
5966   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
5967 $as_echo "$XARGS" >&6; }
5968 else
5969   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5970 $as_echo "no" >&6; }
5971 fi
5972 
5973 
5974   test -n "$XARGS" && break
5975 done
5976 
5977 
5978     if test "x$XARGS" = x; then
5979         if test "xxargs" = x; then
5980           PROG_NAME=xargs
5981         else
5982           PROG_NAME=xargs
5983         fi
5984         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5985 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5986         as_fn_error $? "Cannot continue" "$LINENO" 5
5987     fi
5988 
5989 
5990 
5991 # Then required tools that require some special treatment.
5992 for ac_prog in gawk mawk nawk awk
5993 do
5994   # Extract the first word of "$ac_prog", so it can be a program name with args.
5995 set dummy $ac_prog; ac_word=$2
5996 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5997 $as_echo_n "checking for $ac_word... " >&6; }
5998 if test "${ac_cv_prog_AWK+set}" = set; then :
5999   $as_echo_n "(cached) " >&6
6000 else
6001   if test -n "$AWK"; then
6002   ac_cv_prog_AWK="$AWK" # Let the user override the test.
6003 else
6004 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6005 for as_dir in $PATH
6006 do
6007   IFS=$as_save_IFS
6008   test -z "$as_dir" && as_dir=.
6009     for ac_exec_ext in '' $ac_executable_extensions; do
6010   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6011     ac_cv_prog_AWK="$ac_prog"
6012     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6013     break 2
6014   fi
6015 done
6016   done
6017 IFS=$as_save_IFS
6018 
6019 fi
6020 fi
6021 AWK=$ac_cv_prog_AWK
6022 if test -n "$AWK"; then
6023   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
6024 $as_echo "$AWK" >&6; }
6025 else
6026   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6027 $as_echo "no" >&6; }
6028 fi
6029 
6030 
6031   test -n "$AWK" && break
6032 done
6033 
6034 
6035     if test "x$AWK" = x; then
6036         if test "x" = x; then
6037           PROG_NAME=awk
6038         else
6039           PROG_NAME=
6040         fi
6041         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6042 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6043         as_fn_error $? "Cannot continue" "$LINENO" 5
6044     fi
6045 
6046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6047 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6048 if test "${ac_cv_path_GREP+set}" = set; then :
6049   $as_echo_n "(cached) " >&6
6050 else
6051   if test -z "$GREP"; then
6052   ac_path_GREP_found=false
6053   # Loop through the user's path and test for each of PROGNAME-LIST
6054   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6055 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6056 do
6057   IFS=$as_save_IFS
6058   test -z "$as_dir" && as_dir=.
6059     for ac_prog in grep ggrep; do
6060     for ac_exec_ext in '' $ac_executable_extensions; do
6061       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6062       { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
6063 # Check for GNU ac_path_GREP and select it if it is found.
6064   # Check for GNU $ac_path_GREP
6065 case `"$ac_path_GREP" --version 2>&1` in
6066 *GNU*)
6067   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6068 *)
6069   ac_count=0
6070   $as_echo_n 0123456789 >"conftest.in"
6071   while :
6072   do
6073     cat "conftest.in" "conftest.in" >"conftest.tmp"
6074     mv "conftest.tmp" "conftest.in"
6075     cp "conftest.in" "conftest.nl"
6076     $as_echo 'GREP' >> "conftest.nl"
6077     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6078     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6079     as_fn_arith $ac_count + 1 && ac_count=$as_val
6080     if test $ac_count -gt ${ac_path_GREP_max-0}; then
6081       # Best one so far, save it but keep looking for a better one
6082       ac_cv_path_GREP="$ac_path_GREP"
6083       ac_path_GREP_max=$ac_count
6084     fi
6085     # 10*(2^10) chars as input seems more than enough
6086     test $ac_count -gt 10 && break
6087   done
6088   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6089 esac
6090 
6091       $ac_path_GREP_found && break 3
6092     done
6093   done
6094   done
6095 IFS=$as_save_IFS
6096   if test -z "$ac_cv_path_GREP"; then
6097     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6098   fi
6099 else
6100   ac_cv_path_GREP=$GREP
6101 fi
6102 
6103 fi
6104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6105 $as_echo "$ac_cv_path_GREP" >&6; }
6106  GREP="$ac_cv_path_GREP"
6107 
6108 
6109 
6110     if test "x$GREP" = x; then
6111         if test "x" = x; then
6112           PROG_NAME=grep
6113         else
6114           PROG_NAME=
6115         fi
6116         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6117 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6118         as_fn_error $? "Cannot continue" "$LINENO" 5
6119     fi
6120 
6121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6122 $as_echo_n "checking for egrep... " >&6; }
6123 if test "${ac_cv_path_EGREP+set}" = set; then :
6124   $as_echo_n "(cached) " >&6
6125 else
6126   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6127    then ac_cv_path_EGREP="$GREP -E"
6128    else
6129      if test -z "$EGREP"; then
6130   ac_path_EGREP_found=false
6131   # Loop through the user's path and test for each of PROGNAME-LIST
6132   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6133 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6134 do
6135   IFS=$as_save_IFS
6136   test -z "$as_dir" && as_dir=.
6137     for ac_prog in egrep; do
6138     for ac_exec_ext in '' $ac_executable_extensions; do
6139       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6140       { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
6141 # Check for GNU ac_path_EGREP and select it if it is found.
6142   # Check for GNU $ac_path_EGREP
6143 case `"$ac_path_EGREP" --version 2>&1` in
6144 *GNU*)
6145   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6146 *)
6147   ac_count=0
6148   $as_echo_n 0123456789 >"conftest.in"
6149   while :
6150   do
6151     cat "conftest.in" "conftest.in" >"conftest.tmp"
6152     mv "conftest.tmp" "conftest.in"
6153     cp "conftest.in" "conftest.nl"
6154     $as_echo 'EGREP' >> "conftest.nl"
6155     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6156     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6157     as_fn_arith $ac_count + 1 && ac_count=$as_val
6158     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6159       # Best one so far, save it but keep looking for a better one
6160       ac_cv_path_EGREP="$ac_path_EGREP"
6161       ac_path_EGREP_max=$ac_count
6162     fi
6163     # 10*(2^10) chars as input seems more than enough
6164     test $ac_count -gt 10 && break
6165   done
6166   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6167 esac
6168 
6169       $ac_path_EGREP_found && break 3
6170     done
6171   done
6172   done
6173 IFS=$as_save_IFS
6174   if test -z "$ac_cv_path_EGREP"; then
6175     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6176   fi
6177 else
6178   ac_cv_path_EGREP=$EGREP
6179 fi
6180 
6181    fi
6182 fi
6183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6184 $as_echo "$ac_cv_path_EGREP" >&6; }
6185  EGREP="$ac_cv_path_EGREP"
6186 
6187 
6188 
6189     if test "x$EGREP" = x; then
6190         if test "x" = x; then
6191           PROG_NAME=egrep
6192         else
6193           PROG_NAME=
6194         fi
6195         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6196 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6197         as_fn_error $? "Cannot continue" "$LINENO" 5
6198     fi
6199 
6200 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
6201 $as_echo_n "checking for fgrep... " >&6; }
6202 if test "${ac_cv_path_FGREP+set}" = set; then :
6203   $as_echo_n "(cached) " >&6
6204 else
6205   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
6206    then ac_cv_path_FGREP="$GREP -F"
6207    else
6208      if test -z "$FGREP"; then
6209   ac_path_FGREP_found=false
6210   # Loop through the user's path and test for each of PROGNAME-LIST
6211   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6212 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6213 do
6214   IFS=$as_save_IFS
6215   test -z "$as_dir" && as_dir=.
6216     for ac_prog in fgrep; do
6217     for ac_exec_ext in '' $ac_executable_extensions; do
6218       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6219       { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
6220 # Check for GNU ac_path_FGREP and select it if it is found.
6221   # Check for GNU $ac_path_FGREP
6222 case `"$ac_path_FGREP" --version 2>&1` in
6223 *GNU*)
6224   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6225 *)
6226   ac_count=0
6227   $as_echo_n 0123456789 >"conftest.in"
6228   while :
6229   do
6230     cat "conftest.in" "conftest.in" >"conftest.tmp"
6231     mv "conftest.tmp" "conftest.in"
6232     cp "conftest.in" "conftest.nl"
6233     $as_echo 'FGREP' >> "conftest.nl"
6234     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6235     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6236     as_fn_arith $ac_count + 1 && ac_count=$as_val
6237     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6238       # Best one so far, save it but keep looking for a better one
6239       ac_cv_path_FGREP="$ac_path_FGREP"
6240       ac_path_FGREP_max=$ac_count
6241     fi
6242     # 10*(2^10) chars as input seems more than enough
6243     test $ac_count -gt 10 && break
6244   done
6245   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6246 esac
6247 
6248       $ac_path_FGREP_found && break 3
6249     done
6250   done
6251   done
6252 IFS=$as_save_IFS
6253   if test -z "$ac_cv_path_FGREP"; then
6254     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6255   fi
6256 else
6257   ac_cv_path_FGREP=$FGREP
6258 fi
6259 
6260    fi
6261 fi
6262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6263 $as_echo "$ac_cv_path_FGREP" >&6; }
6264  FGREP="$ac_cv_path_FGREP"
6265 
6266 
6267 
6268     if test "x$FGREP" = x; then
6269         if test "x" = x; then
6270           PROG_NAME=fgrep
6271         else
6272           PROG_NAME=
6273         fi
6274         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6275 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6276         as_fn_error $? "Cannot continue" "$LINENO" 5
6277     fi
6278 
6279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6280 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
6281 if test "${ac_cv_path_SED+set}" = set; then :
6282   $as_echo_n "(cached) " >&6
6283 else
6284             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6285      for ac_i in 1 2 3 4 5 6 7; do
6286        ac_script="$ac_script$as_nl$ac_script"
6287      done
6288      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6289      { ac_script=; unset ac_script;}
6290      if test -z "$SED"; then
6291   ac_path_SED_found=false
6292   # Loop through the user's path and test for each of PROGNAME-LIST
6293   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6294 for as_dir in $PATH
6295 do
6296   IFS=$as_save_IFS
6297   test -z "$as_dir" && as_dir=.
6298     for ac_prog in sed gsed; do
6299     for ac_exec_ext in '' $ac_executable_extensions; do
6300       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6301       { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
6302 # Check for GNU ac_path_SED and select it if it is found.
6303   # Check for GNU $ac_path_SED
6304 case `"$ac_path_SED" --version 2>&1` in
6305 *GNU*)
6306   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6307 *)
6308   ac_count=0
6309   $as_echo_n 0123456789 >"conftest.in"
6310   while :
6311   do
6312     cat "conftest.in" "conftest.in" >"conftest.tmp"
6313     mv "conftest.tmp" "conftest.in"
6314     cp "conftest.in" "conftest.nl"
6315     $as_echo '' >> "conftest.nl"
6316     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6317     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6318     as_fn_arith $ac_count + 1 && ac_count=$as_val
6319     if test $ac_count -gt ${ac_path_SED_max-0}; then
6320       # Best one so far, save it but keep looking for a better one
6321       ac_cv_path_SED="$ac_path_SED"
6322       ac_path_SED_max=$ac_count
6323     fi
6324     # 10*(2^10) chars as input seems more than enough
6325     test $ac_count -gt 10 && break
6326   done
6327   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6328 esac
6329 
6330       $ac_path_SED_found && break 3
6331     done
6332   done
6333   done
6334 IFS=$as_save_IFS
6335   if test -z "$ac_cv_path_SED"; then
6336     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6337   fi
6338 else
6339   ac_cv_path_SED=$SED
6340 fi
6341 
6342 fi
6343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6344 $as_echo "$ac_cv_path_SED" >&6; }
6345  SED="$ac_cv_path_SED"
6346   rm -f conftest.sed
6347 
6348 
6349     if test "x$SED" = x; then
6350         if test "x" = x; then
6351           PROG_NAME=sed
6352         else
6353           PROG_NAME=
6354         fi
6355         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6356 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6357         as_fn_error $? "Cannot continue" "$LINENO" 5
6358     fi
6359 
6360 
6361 for ac_prog in nawk gawk awk
6362 do
6363   # Extract the first word of "$ac_prog", so it can be a program name with args.
6364 set dummy $ac_prog; ac_word=$2
6365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6366 $as_echo_n "checking for $ac_word... " >&6; }
6367 if test "${ac_cv_path_NAWK+set}" = set; then :
6368   $as_echo_n "(cached) " >&6
6369 else
6370   case $NAWK in
6371   [\\/]* | ?:[\\/]*)
6372   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
6373   ;;
6374   *)
6375   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6376 for as_dir in $PATH
6377 do
6378   IFS=$as_save_IFS
6379   test -z "$as_dir" && as_dir=.
6380     for ac_exec_ext in '' $ac_executable_extensions; do
6381   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6382     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
6383     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6384     break 2
6385   fi
6386 done
6387   done
6388 IFS=$as_save_IFS
6389 
6390   ;;
6391 esac
6392 fi
6393 NAWK=$ac_cv_path_NAWK
6394 if test -n "$NAWK"; then
6395   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6396 $as_echo "$NAWK" >&6; }
6397 else
6398   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6399 $as_echo "no" >&6; }
6400 fi
6401 
6402 
6403   test -n "$NAWK" && break
6404 done
6405 
6406 
6407     if test "x$NAWK" = x; then
6408         if test "x" = x; then
6409           PROG_NAME=nawk
6410         else
6411           PROG_NAME=
6412         fi
6413         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6414 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6415         as_fn_error $? "Cannot continue" "$LINENO" 5
6416     fi
6417 
6418 
6419 # Always force rm.
6420 RM="$RM -f"
6421 
6422 # These are not required on all platforms
6423 # Extract the first word of "cygpath", so it can be a program name with args.
6424 set dummy cygpath; ac_word=$2
6425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6426 $as_echo_n "checking for $ac_word... " >&6; }
6427 if test "${ac_cv_path_CYGPATH+set}" = set; then :
6428   $as_echo_n "(cached) " >&6
6429 else
6430   case $CYGPATH in
6431   [\\/]* | ?:[\\/]*)
6432   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
6433   ;;
6434   *)
6435   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6436 for as_dir in $PATH
6437 do
6438   IFS=$as_save_IFS
6439   test -z "$as_dir" && as_dir=.
6440     for ac_exec_ext in '' $ac_executable_extensions; do
6441   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6442     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
6443     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6444     break 2
6445   fi
6446 done
6447   done
6448 IFS=$as_save_IFS
6449 
6450   ;;
6451 esac
6452 fi
6453 CYGPATH=$ac_cv_path_CYGPATH
6454 if test -n "$CYGPATH"; then
6455   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
6456 $as_echo "$CYGPATH" >&6; }
6457 else
6458   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6459 $as_echo "no" >&6; }
6460 fi
6461 
6462 
6463 # Extract the first word of "readlink", so it can be a program name with args.
6464 set dummy readlink; ac_word=$2
6465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6466 $as_echo_n "checking for $ac_word... " >&6; }
6467 if test "${ac_cv_path_READLINK+set}" = set; then :
6468   $as_echo_n "(cached) " >&6
6469 else
6470   case $READLINK in
6471   [\\/]* | ?:[\\/]*)
6472   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
6473   ;;
6474   *)
6475   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6476 for as_dir in $PATH
6477 do
6478   IFS=$as_save_IFS
6479   test -z "$as_dir" && as_dir=.
6480     for ac_exec_ext in '' $ac_executable_extensions; do
6481   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6482     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
6483     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6484     break 2
6485   fi
6486 done
6487   done
6488 IFS=$as_save_IFS
6489 
6490   ;;
6491 esac
6492 fi
6493 READLINK=$ac_cv_path_READLINK
6494 if test -n "$READLINK"; then
6495   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
6496 $as_echo "$READLINK" >&6; }
6497 else
6498   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6499 $as_echo "no" >&6; }
6500 fi
6501 
6502 
6503 # Extract the first word of "df", so it can be a program name with args.
6504 set dummy df; ac_word=$2
6505 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6506 $as_echo_n "checking for $ac_word... " >&6; }
6507 if test "${ac_cv_path_DF+set}" = set; then :
6508   $as_echo_n "(cached) " >&6
6509 else
6510   case $DF in
6511   [\\/]* | ?:[\\/]*)
6512   ac_cv_path_DF="$DF" # Let the user override the test with a path.
6513   ;;
6514   *)
6515   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6516 for as_dir in $PATH
6517 do
6518   IFS=$as_save_IFS
6519   test -z "$as_dir" && as_dir=.
6520     for ac_exec_ext in '' $ac_executable_extensions; do
6521   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6522     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
6523     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6524     break 2
6525   fi
6526 done
6527   done
6528 IFS=$as_save_IFS
6529 
6530   ;;
6531 esac
6532 fi
6533 DF=$ac_cv_path_DF
6534 if test -n "$DF"; then
6535   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
6536 $as_echo "$DF" >&6; }
6537 else
6538   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6539 $as_echo "no" >&6; }
6540 fi
6541 
6542 
6543 # Extract the first word of "SetFile", so it can be a program name with args.
6544 set dummy SetFile; ac_word=$2
6545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6546 $as_echo_n "checking for $ac_word... " >&6; }
6547 if test "${ac_cv_path_SETFILE+set}" = set; then :
6548   $as_echo_n "(cached) " >&6
6549 else
6550   case $SETFILE in
6551   [\\/]* | ?:[\\/]*)
6552   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
6553   ;;
6554   *)
6555   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6556 for as_dir in $PATH
6557 do
6558   IFS=$as_save_IFS
6559   test -z "$as_dir" && as_dir=.
6560     for ac_exec_ext in '' $ac_executable_extensions; do
6561   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6562     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
6563     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6564     break 2
6565   fi
6566 done
6567   done
6568 IFS=$as_save_IFS
6569 
6570   ;;
6571 esac
6572 fi
6573 SETFILE=$ac_cv_path_SETFILE
6574 if test -n "$SETFILE"; then
6575   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
6576 $as_echo "$SETFILE" >&6; }
6577 else
6578   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6579 $as_echo "no" >&6; }
6580 fi
6581 
6582 
6583 
6584 
6585 # Now we can determine OpenJDK build and target platforms. This is required to
6586 # have early on.
6587 # Make sure we can run config.sub.
6588 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6589   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6590 
6591 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6592 $as_echo_n "checking build system type... " >&6; }
6593 if test "${ac_cv_build+set}" = set; then :
6594   $as_echo_n "(cached) " >&6
6595 else
6596   ac_build_alias=$build_alias
6597 test "x$ac_build_alias" = x &&
6598   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6599 test "x$ac_build_alias" = x &&
6600   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6601 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6602   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6603 
6604 fi
6605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6606 $as_echo "$ac_cv_build" >&6; }
6607 case $ac_cv_build in
6608 *-*-*) ;;
6609 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;;
6610 esac
6611 build=$ac_cv_build
6612 ac_save_IFS=$IFS; IFS='-'
6613 set x $ac_cv_build
6614 shift
6615 build_cpu=$1
6616 build_vendor=$2
6617 shift; shift
6618 # Remember, the first character of IFS is used to create $*,
6619 # except with old shells:
6620 build_os=$*
6621 IFS=$ac_save_IFS
6622 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6623 
6624 
6625 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6626 $as_echo_n "checking host system type... " >&6; }
6627 if test "${ac_cv_host+set}" = set; then :
6628   $as_echo_n "(cached) " >&6
6629 else
6630   if test "x$host_alias" = x; then
6631   ac_cv_host=$ac_cv_build
6632 else
6633   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6634     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6635 fi
6636 
6637 fi
6638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6639 $as_echo "$ac_cv_host" >&6; }
6640 case $ac_cv_host in
6641 *-*-*) ;;
6642 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;;
6643 esac
6644 host=$ac_cv_host
6645 ac_save_IFS=$IFS; IFS='-'
6646 set x $ac_cv_host
6647 shift
6648 host_cpu=$1
6649 host_vendor=$2
6650 shift; shift
6651 # Remember, the first character of IFS is used to create $*,
6652 # except with old shells:
6653 host_os=$*
6654 IFS=$ac_save_IFS
6655 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6656 
6657 
6658 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6659 $as_echo_n "checking target system type... " >&6; }
6660 if test "${ac_cv_target+set}" = set; then :
6661   $as_echo_n "(cached) " >&6
6662 else
6663   if test "x$target_alias" = x; then
6664   ac_cv_target=$ac_cv_host
6665 else
6666   ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6667     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6668 fi
6669 
6670 fi
6671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6672 $as_echo "$ac_cv_target" >&6; }
6673 case $ac_cv_target in
6674 *-*-*) ;;
6675 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5 ;;
6676 esac
6677 target=$ac_cv_target
6678 ac_save_IFS=$IFS; IFS='-'
6679 set x $ac_cv_target
6680 shift
6681 target_cpu=$1
6682 target_vendor=$2
6683 shift; shift
6684 # Remember, the first character of IFS is used to create $*,
6685 # except with old shells:
6686 target_os=$*
6687 IFS=$ac_save_IFS
6688 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6689 
6690 
6691 # The aliases save the names the user supplied, while $host etc.
6692 # will get canonicalized.
6693 test -n "$target_alias" &&
6694   test "$program_prefix$program_suffix$program_transform_name" = \
6695     NONENONEs,x,x, &&
6696   program_prefix=${target_alias}-
6697 
6698 # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
6699 # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
6700 # product you're building. The target of this build is called "host". Since this is confusing to most people, we
6701 # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
6702 # to use the configure naming style.
6703 
6704 
6705 
6706 
6707 
6708     # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
6709     # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
6710     # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
6711     # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
6712     OPENJDK_TARGET_AUTOCONF_NAME="$host"
6713     OPENJDK_BUILD_AUTOCONF_NAME="$build"
6714 
6715 
6716 
6717     # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6718 
6719   case "$build_os" in
6720     *linux*)
6721       VAR_OS=linux
6722       VAR_OS_API=posix
6723       VAR_OS_ENV=linux
6724       ;;
6725     *solaris*)
6726       VAR_OS=solaris
6727       VAR_OS_API=posix
6728       VAR_OS_ENV=solaris
6729       ;;
6730     *darwin*)
6731       VAR_OS=macosx
6732       VAR_OS_API=posix
6733       VAR_OS_ENV=macosx
6734       ;;
6735     *bsd*)
6736       VAR_OS=bsd
6737       VAR_OS_API=posix
6738       VAR_OS_ENV=bsd
6739       ;;
6740     *cygwin*)
6741       VAR_OS=windows
6742       VAR_OS_API=winapi
6743       VAR_OS_ENV=windows.cygwin
6744       ;;
6745     *mingw*)
6746       VAR_OS=windows
6747       VAR_OS_API=winapi
6748       VAR_OS_ENV=windows.msys
6749       ;;
6750     *)
6751       as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
6752       ;;
6753   esac
6754 
6755 
6756   # First argument is the cpu name from the trip/quad
6757   case "$build_cpu" in
6758     x86_64)
6759       VAR_CPU=x86_64
6760       VAR_CPU_ARCH=x86
6761       VAR_CPU_BITS=64
6762       VAR_CPU_ENDIAN=little
6763       ;;
6764     i?86)
6765       VAR_CPU=x86
6766       VAR_CPU_ARCH=x86
6767       VAR_CPU_BITS=32
6768       VAR_CPU_ENDIAN=little
6769       ;;
6770     arm*)
6771       VAR_CPU=arm
6772       VAR_CPU_ARCH=arm
6773       VAR_CPU_BITS=32
6774       VAR_CPU_ENDIAN=little
6775       ;;
6776     powerpc)
6777       VAR_CPU=ppc
6778       VAR_CPU_ARCH=ppc
6779       VAR_CPU_BITS=32
6780       VAR_CPU_ENDIAN=big
6781        ;;
6782     powerpc64)
6783       VAR_CPU=ppc64
6784       VAR_CPU_ARCH=ppc
6785       VAR_CPU_BITS=64
6786       VAR_CPU_ENDIAN=big
6787        ;;
6788     sparc)
6789       VAR_CPU=sparc
6790       VAR_CPU_ARCH=sparc
6791       VAR_CPU_BITS=32
6792       VAR_CPU_ENDIAN=big
6793        ;;
6794     sparcv9)
6795       VAR_CPU=sparcv9
6796       VAR_CPU_ARCH=sparc
6797       VAR_CPU_BITS=64
6798       VAR_CPU_ENDIAN=big
6799        ;;
6800     *)
6801       as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
6802       ;;
6803   esac
6804 
6805     # ..and setup our own variables. (Do this explicitely to facilitate searching)
6806     OPENJDK_BUILD_OS="$VAR_OS"
6807     OPENJDK_BUILD_OS_API="$VAR_OS_API"
6808     OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6809     OPENJDK_BUILD_CPU="$VAR_CPU"
6810     OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6811     OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6812     OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6813 
6814 
6815 
6816 
6817 
6818 
6819 
6820     { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
6821 $as_echo_n "checking openjdk-build os-cpu... " >&6; }
6822     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6823 $as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6824 
6825     # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6826 
6827   case "$host_os" in
6828     *linux*)
6829       VAR_OS=linux
6830       VAR_OS_API=posix
6831       VAR_OS_ENV=linux
6832       ;;
6833     *solaris*)
6834       VAR_OS=solaris
6835       VAR_OS_API=posix
6836       VAR_OS_ENV=solaris
6837       ;;
6838     *darwin*)
6839       VAR_OS=macosx
6840       VAR_OS_API=posix
6841       VAR_OS_ENV=macosx
6842       ;;
6843     *bsd*)
6844       VAR_OS=bsd
6845       VAR_OS_API=posix
6846       VAR_OS_ENV=bsd
6847       ;;
6848     *cygwin*)
6849       VAR_OS=windows
6850       VAR_OS_API=winapi
6851       VAR_OS_ENV=windows.cygwin
6852       ;;
6853     *mingw*)
6854       VAR_OS=windows
6855       VAR_OS_API=winapi
6856       VAR_OS_ENV=windows.msys
6857       ;;
6858     *)
6859       as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
6860       ;;
6861   esac
6862 
6863 
6864   # First argument is the cpu name from the trip/quad
6865   case "$host_cpu" in
6866     x86_64)
6867       VAR_CPU=x86_64
6868       VAR_CPU_ARCH=x86
6869       VAR_CPU_BITS=64
6870       VAR_CPU_ENDIAN=little
6871       ;;
6872     i?86)
6873       VAR_CPU=x86
6874       VAR_CPU_ARCH=x86
6875       VAR_CPU_BITS=32
6876       VAR_CPU_ENDIAN=little
6877       ;;
6878     arm*)
6879       VAR_CPU=arm
6880       VAR_CPU_ARCH=arm
6881       VAR_CPU_BITS=32
6882       VAR_CPU_ENDIAN=little
6883       ;;
6884     powerpc)
6885       VAR_CPU=ppc
6886       VAR_CPU_ARCH=ppc
6887       VAR_CPU_BITS=32
6888       VAR_CPU_ENDIAN=big
6889        ;;
6890     powerpc64)
6891       VAR_CPU=ppc64
6892       VAR_CPU_ARCH=ppc
6893       VAR_CPU_BITS=64
6894       VAR_CPU_ENDIAN=big
6895        ;;
6896     sparc)
6897       VAR_CPU=sparc
6898       VAR_CPU_ARCH=sparc
6899       VAR_CPU_BITS=32
6900       VAR_CPU_ENDIAN=big
6901        ;;
6902     sparcv9)
6903       VAR_CPU=sparcv9
6904       VAR_CPU_ARCH=sparc
6905       VAR_CPU_BITS=64
6906       VAR_CPU_ENDIAN=big
6907        ;;
6908     *)
6909       as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
6910       ;;
6911   esac
6912 
6913     # ... and setup our own variables. (Do this explicitely to facilitate searching)
6914     OPENJDK_TARGET_OS="$VAR_OS"
6915     OPENJDK_TARGET_OS_API="$VAR_OS_API"
6916     OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
6917     OPENJDK_TARGET_CPU="$VAR_CPU"
6918     OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
6919     OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
6920     OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6921 
6922 
6923 
6924 
6925 
6926 
6927 
6928     { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
6929 $as_echo_n "checking openjdk-target os-cpu... " >&6; }
6930     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
6931 $as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
6932 
6933 
6934 
6935 # Check whether --with-target-bits was given.
6936 if test "${with_target_bits+set}" = set; then :
6937   withval=$with_target_bits;
6938 fi
6939 
6940 
6941   # We have three types of compiles:
6942   # native  == normal compilation, target system == build system
6943   # cross   == traditional cross compilation, target system != build system; special toolchain needed
6944   # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
6945   #
6946   if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
6947     # We're doing a proper cross-compilation
6948     COMPILE_TYPE="cross"
6949   else
6950     COMPILE_TYPE="native"
6951   fi
6952 
6953   if test "x$with_target_bits" != x; then
6954     if test "x$COMPILE_TYPE" = "xcross"; then
6955       as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
6956     fi
6957 
6958     if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6959       # A reduced build is requested
6960       COMPILE_TYPE="reduced"
6961       OPENJDK_TARGET_CPU_BITS=32
6962       if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
6963         OPENJDK_TARGET_CPU=x86
6964       elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
6965         OPENJDK_TARGET_CPU=sparc
6966       else
6967         as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
6968       fi
6969     elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
6970       as_fn_error $? "It is not possible to use --with-target-bits=64 on a 32 bit system. Use proper cross-compilation instead." "$LINENO" 5
6971     elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
6972       { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
6973 $as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
6974     else
6975       as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
6976     fi
6977   fi
6978 
6979 
6980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
6981 $as_echo_n "checking compilation type... " >&6; }
6982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
6983 $as_echo "$COMPILE_TYPE" >&6; }
6984 
6985 
6986     if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
6987        REQUIRED_OS_NAME=SunOS
6988        REQUIRED_OS_VERSION=5.10
6989     fi
6990     if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
6991        REQUIRED_OS_NAME=Linux
6992        REQUIRED_OS_VERSION=2.6
6993     fi
6994     if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
6995         REQUIRED_OS_NAME=Windows
6996         if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
6997             REQUIRED_OS_VERSION=5.2
6998         else
6999             REQUIRED_OS_VERSION=5.1
7000         fi
7001     fi
7002     if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7003         REQUIRED_OS_NAME=Darwin
7004         REQUIRED_OS_VERSION=11.2
7005     fi
7006 
7007 
7008 
7009 
7010 
7011     # Also store the legacy naming of the cpu.
7012     # Ie i586 and amd64 instead of x86 and x86_64
7013     OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
7014     if test "x$OPENJDK_TARGET_CPU" = xx86; then
7015       OPENJDK_TARGET_CPU_LEGACY="i586"
7016     elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7017       # On all platforms except MacOSX replace x86_64 with amd64.
7018       OPENJDK_TARGET_CPU_LEGACY="amd64"
7019     fi
7020 
7021 
7022     # And the second legacy naming of the cpu.
7023     # Ie i386 and amd64 instead of x86 and x86_64.
7024     OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
7025     if test "x$OPENJDK_TARGET_CPU" = xx86; then
7026       OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
7027     elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7028       OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
7029     fi
7030 
7031 
7032     # This is the name of the cpu (but using i386 and amd64 instead of
7033     # x86 and x86_64, respectively), preceeded by a /, to be used when
7034     # locating libraries. On macosx, it's empty, though.
7035     OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
7036     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
7037         OPENJDK_TARGET_CPU_LIBDIR=""
7038     fi
7039 
7040 
7041     # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
7042     # /amd64 or /sparcv9. This string is appended to some library paths, like this:
7043     # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
7044     OPENJDK_TARGET_CPU_ISADIR=""
7045     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7046       if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7047           OPENJDK_TARGET_CPU_ISADIR="/amd64"
7048       elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
7049           OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
7050       fi
7051     fi
7052 
7053 
7054     # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
7055     OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
7056     if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
7057       # On linux only, we replace x86 with i386.
7058       OPENJDK_TARGET_CPU_OSARCH="i386"
7059     elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7060       # On all platforms except macosx, we replace x86_64 with amd64.
7061       OPENJDK_TARGET_CPU_OSARCH="amd64"
7062     fi
7063 
7064 
7065     OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
7066     if test "x$OPENJDK_TARGET_CPU" = xx86; then
7067       OPENJDK_TARGET_CPU_JLI="i386"
7068     elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7069       # On all platforms except macosx, we replace x86_64 with amd64.
7070       OPENJDK_TARGET_CPU_JLI="amd64"
7071     fi
7072     # Now setup the -D flags for building libjli.
7073     OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
7074     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7075       if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
7076         OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
7077       elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
7078         OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
7079       fi
7080     fi
7081 
7082 
7083     # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
7084     if test "x$OPENJDK_TARGET_OS_API" = xposix; then
7085         OPENJDK_TARGET_OS_API_DIR="solaris"
7086     fi
7087     if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
7088         OPENJDK_TARGET_OS_API_DIR="windows"
7089     fi
7090 
7091 
7092     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7093         A_LP64="LP64:="
7094         # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
7095         # unpack200.exe
7096         if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
7097             ADD_LP64="-D_LP64=1"
7098         fi
7099     fi
7100     LP64=$A_LP64
7101 
7102 
7103     if test "x$COMPILE_TYPE" = "xcross"; then
7104       # FIXME: ... or should this include reduced builds..?
7105       DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
7106     else
7107       DEFINE_CROSS_COMPILE_ARCH=""
7108     fi
7109 
7110 
7111     # ZERO_ARCHDEF is used to enable architecture-specific code
7112     case "${OPENJDK_TARGET_CPU}" in
7113       ppc*)    ZERO_ARCHDEF=PPC   ;;
7114       s390*)   ZERO_ARCHDEF=S390  ;;
7115       sparc*)  ZERO_ARCHDEF=SPARC ;;
7116       x86_64*) ZERO_ARCHDEF=AMD64 ;;
7117       x86)     ZERO_ARCHDEF=IA32  ;;
7118       *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
7119     esac
7120 
7121 
7122 
7123 
7124 
7125 # Continue setting up basic stuff. Most remaining code require fundamental tools.
7126 
7127 # Locate the directory of this script.
7128 SCRIPT="$0"
7129 
7130     if test "x$OPENJDK_BUILD_OS" != xwindows; then
7131         # Follow a chain of symbolic links. Use readlink
7132         # where it exists, else fall back to horribly
7133         # complicated shell code.
7134         if test "x$READLINK_TESTED" != yes; then
7135             # On MacOSX there is a readlink tool with a different
7136             # purpose than the GNU readlink tool. Check the found readlink.
7137             ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
7138             if test "x$ISGNU" = x; then
7139                  # A readlink that we do not know how to use.
7140                  # Are there other non-GNU readlinks out there?
7141                  READLINK_TESTED=yes
7142                  READLINK=
7143             fi
7144         fi
7145 
7146         if test "x$READLINK" != x; then
7147             SCRIPT=`$READLINK -f $SCRIPT`
7148         else
7149             # Save the current directory for restoring afterwards
7150             STARTDIR=$PWD
7151             COUNTER=0
7152             sym_link_dir=`$DIRNAME $SCRIPT`
7153             sym_link_file=`$BASENAME $SCRIPT`
7154             # Use the system pwd and not the shell builtin to resolve directory symlinks
7155             cd $sym_link_dir
7156             cd `$THEPWDCMD`
7157             sym_link_dir=`$THEPWDCMD`
7158             # Resolve file symlinks
7159             while test $COUNTER -lt 20; do
7160                 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
7161                 if test "x$ISLINK" == x; then
7162                     # This is not a symbolic link! We are done!
7163                     break
7164                 fi
7165                 # Again resolve directory symlinks since the target of the just found
7166                 # link could be in a different directory
7167                 cd `$DIRNAME $ISLINK`
7168                 sym_link_dir=`$THEPWDCMD`
7169                 sym_link_file=`$BASENAME $ISLINK`
7170                 let COUNTER=COUNTER+1
7171             done
7172             cd $STARTDIR
7173             SCRIPT=$sym_link_dir/$sym_link_file
7174         fi
7175     fi
7176 
7177 AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD`
7178 
7179 # Where is the source? It is located two levels above the configure script.
7180 CURDIR="$PWD"
7181 cd "$AUTOCONF_DIR/../.."
7182 SRC_ROOT="`$THEPWDCMD`"
7183 
7184 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7185   PATH_SEP=";"
7186 
7187   SRC_ROOT_LENGTH=`$THEPWDCMD|$WC -m`
7188   if test $SRC_ROOT_LENGTH -gt 100; then
7189       as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
7190   fi
7191 
7192   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7193     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
7194 $as_echo_n "checking cygwin release... " >&6; }
7195     CYGWIN_VERSION=`$UNAME -r`
7196     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
7197 $as_echo "$CYGWIN_VERSION" >&6; }
7198     WINDOWS_ENV_VENDOR='cygwin'
7199     WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
7200 
7201     CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
7202     if test "x$CYGWIN_VERSION_OK" = x; then
7203       { $as_echo "$as_me:${as_lineno-$LINENO}: Your cygwin is too old. You are running $CYGWIN_VERSION, but at least cygwin 1.7 is required. Please upgrade." >&5
7204 $as_echo "$as_me: Your cygwin is too old. You are running $CYGWIN_VERSION, but at least cygwin 1.7 is required. Please upgrade." >&6;}
7205       as_fn_error $? "Cannot continue" "$LINENO" 5
7206     fi
7207     if test "x$CYGPATH" = x; then
7208         as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
7209     fi
7210     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
7211 $as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
7212     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7213     cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
7214     # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
7215     CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
7216     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
7217 $as_echo "$CYGWIN_ROOT_PATH" >&6; }
7218     WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
7219     test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
7220     if test "x$test_cygdrive_prefix" = x; then
7221         as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
7222     fi
7223   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7224     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
7225 $as_echo_n "checking msys release... " >&6; }
7226     MSYS_VERSION=`$UNAME -r`
7227     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
7228 $as_echo "$MSYS_VERSION" >&6; }
7229 
7230     WINDOWS_ENV_VENDOR='msys'
7231     WINDOWS_ENV_VERSION="$MSYS_VERSION"
7232 
7233     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
7234 $as_echo_n "checking msys root directory as unix-style path... " >&6; }
7235     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7236     MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
7237 
7238   windows_path="$MSYS_ROOT_PATH"
7239   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7240     unix_path=`$CYGPATH -u "$windows_path"`
7241     MSYS_ROOT_PATH="$unix_path"
7242   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7243     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7244     MSYS_ROOT_PATH="$unix_path"
7245   fi
7246 
7247     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
7248 $as_echo "$MSYS_ROOT_PATH" >&6; }
7249     WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
7250   else
7251     as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
7252   fi
7253 
7254   # Test if windows or unix (cygwin/msys) find is first in path.
7255   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
7256 $as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
7257   FIND_BINARY_OUTPUT=`find --version 2>&1`
7258   if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
7259     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
7260 $as_echo "unix style" >&6; }
7261   elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
7262     { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
7263 $as_echo "Windows" >&6; }
7264     { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
7265 $as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
7266     { $as_echo "$as_me:${as_lineno-$LINENO}: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&5
7267 $as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
7268     as_fn_error $? "Cannot continue" "$LINENO" 5
7269   else
7270     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
7271 $as_echo "unknown" >&6; }
7272     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
7273 $as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
7274   fi
7275 
7276 else
7277   PATH_SEP=":"
7278 fi
7279 
7280 
7281 
7282 cd "$CURDIR"
7283 
7284 
7285   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7286 
7287   # Input might be given as Windows format, start by converting to
7288   # unix format.
7289   path="$SRC_ROOT"
7290   new_path=`$CYGPATH -u "$path"`
7291 
7292   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7293   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7294   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7295   # "foo.exe" is OK but "foo" is an error.
7296   #
7297   # This test is therefore slightly more accurate than "test -f" to check for file precense.
7298   # It is also a way to make sure we got the proper file name for the real test later on.
7299   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7300   if test "x$test_shortpath" = x; then
7301     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7302 $as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7303     as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
7304   fi
7305 
7306   # Call helper function which possibly converts this using DOS-style short mode.
7307   # If so, the updated path is stored in $new_path.
7308 
7309   input_path="$new_path"
7310   # Check if we need to convert this using DOS-style short mode. If the path
7311   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7312   # take no chances and rewrite it.
7313   # Note: m4 eats our [], so we need to use [ and ] instead.
7314   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7315   if test "x$has_forbidden_chars" != x; then
7316     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7317     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7318     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7319     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7320       # Going to short mode and back again did indeed matter. Since short mode is
7321       # case insensitive, let's make it lowercase to improve readability.
7322       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7323       # Now convert it back to Unix-stile (cygpath)
7324       input_path=`$CYGPATH -u "$shortmode_path"`
7325       new_path="$input_path"
7326     fi
7327   fi
7328 
7329   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7330   if test "x$test_cygdrive_prefix" = x; then
7331     # As a simple fix, exclude /usr/bin since it's not a real path.
7332     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7333       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7334       # a path prefixed by /cygdrive for fixpath to work.
7335       new_path="$CYGWIN_ROOT_PATH$input_path"
7336     fi
7337   fi
7338 
7339 
7340   if test "x$path" != "x$new_path"; then
7341     SRC_ROOT="$new_path"
7342     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7343 $as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7344   fi
7345 
7346   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7347 
7348   path="$SRC_ROOT"
7349   has_colon=`$ECHO $path | $GREP ^.:`
7350   new_path="$path"
7351   if test "x$has_colon" = x; then
7352     # Not in mixed or Windows style, start by that.
7353     new_path=`cmd //c echo $path`
7354   fi
7355 
7356 
7357   input_path="$new_path"
7358   # Check if we need to convert this using DOS-style short mode. If the path
7359   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7360   # take no chances and rewrite it.
7361   # Note: m4 eats our [], so we need to use [ and ] instead.
7362   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7363   if test "x$has_forbidden_chars" != x; then
7364     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7365     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7366   fi
7367 
7368 
7369   windows_path="$new_path"
7370   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7371     unix_path=`$CYGPATH -u "$windows_path"`
7372     new_path="$unix_path"
7373   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7374     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7375     new_path="$unix_path"
7376   fi
7377 
7378   if test "x$path" != "x$new_path"; then
7379     SRC_ROOT="$new_path"
7380     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7381 $as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7382   fi
7383 
7384   # Save the first 10 bytes of this path to the storage, so fixpath can work.
7385   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7386 
7387   else
7388     # We're on a posix platform. Hooray! :)
7389     path="$SRC_ROOT"
7390 
7391     if test ! -f "$path" && test ! -d "$path"; then
7392       as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7393     fi
7394 
7395     has_space=`$ECHO "$path" | $GREP " "`
7396     if test "x$has_space" != x; then
7397       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7398 $as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7399       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7400     fi
7401   fi
7402 
7403 
7404   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7405 
7406   # Input might be given as Windows format, start by converting to
7407   # unix format.
7408   path="$CURDIR"
7409   new_path=`$CYGPATH -u "$path"`
7410 
7411   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7412   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7413   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7414   # "foo.exe" is OK but "foo" is an error.
7415   #
7416   # This test is therefore slightly more accurate than "test -f" to check for file precense.
7417   # It is also a way to make sure we got the proper file name for the real test later on.
7418   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7419   if test "x$test_shortpath" = x; then
7420     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7421 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7422     as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
7423   fi
7424 
7425   # Call helper function which possibly converts this using DOS-style short mode.
7426   # If so, the updated path is stored in $new_path.
7427 
7428   input_path="$new_path"
7429   # Check if we need to convert this using DOS-style short mode. If the path
7430   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7431   # take no chances and rewrite it.
7432   # Note: m4 eats our [], so we need to use [ and ] instead.
7433   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7434   if test "x$has_forbidden_chars" != x; then
7435     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7436     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7437     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7438     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7439       # Going to short mode and back again did indeed matter. Since short mode is
7440       # case insensitive, let's make it lowercase to improve readability.
7441       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7442       # Now convert it back to Unix-stile (cygpath)
7443       input_path=`$CYGPATH -u "$shortmode_path"`
7444       new_path="$input_path"
7445     fi
7446   fi
7447 
7448   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7449   if test "x$test_cygdrive_prefix" = x; then
7450     # As a simple fix, exclude /usr/bin since it's not a real path.
7451     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7452       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7453       # a path prefixed by /cygdrive for fixpath to work.
7454       new_path="$CYGWIN_ROOT_PATH$input_path"
7455     fi
7456   fi
7457 
7458 
7459   if test "x$path" != "x$new_path"; then
7460     CURDIR="$new_path"
7461     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7462 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7463   fi
7464 
7465   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7466 
7467   path="$CURDIR"
7468   has_colon=`$ECHO $path | $GREP ^.:`
7469   new_path="$path"
7470   if test "x$has_colon" = x; then
7471     # Not in mixed or Windows style, start by that.
7472     new_path=`cmd //c echo $path`
7473   fi
7474 
7475 
7476   input_path="$new_path"
7477   # Check if we need to convert this using DOS-style short mode. If the path
7478   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7479   # take no chances and rewrite it.
7480   # Note: m4 eats our [], so we need to use [ and ] instead.
7481   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7482   if test "x$has_forbidden_chars" != x; then
7483     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7484     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7485   fi
7486 
7487 
7488   windows_path="$new_path"
7489   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7490     unix_path=`$CYGPATH -u "$windows_path"`
7491     new_path="$unix_path"
7492   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7493     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7494     new_path="$unix_path"
7495   fi
7496 
7497   if test "x$path" != "x$new_path"; then
7498     CURDIR="$new_path"
7499     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7500 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7501   fi
7502 
7503   # Save the first 10 bytes of this path to the storage, so fixpath can work.
7504   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7505 
7506   else
7507     # We're on a posix platform. Hooray! :)
7508     path="$CURDIR"
7509 
7510     if test ! -f "$path" && test ! -d "$path"; then
7511       as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
7512     fi
7513 
7514     has_space=`$ECHO "$path" | $GREP " "`
7515     if test "x$has_space" != x; then
7516       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7517 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7518       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7519     fi
7520   fi
7521 
7522 
7523 if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
7524     # Add extra search paths on solaris for utilities like ar and as etc...
7525     PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
7526 fi
7527 
7528 # You can force the sys-root if the sys-root encoded into the cross compiler tools
7529 # is not correct.
7530 
7531 # Check whether --with-sys-root was given.
7532 if test "${with_sys_root+set}" = set; then :
7533   withval=$with_sys_root;
7534 fi
7535 
7536 
7537 if test "x$with_sys_root" != x; then
7538   SYS_ROOT=$with_sys_root
7539 else
7540   SYS_ROOT=/
7541 fi
7542 
7543 
7544 
7545 # Check whether --with-tools-dir was given.
7546 if test "${with_tools_dir+set}" = set; then :
7547   withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
7548 fi
7549 
7550 
7551 
7552 # Check whether --with-devkit was given.
7553 if test "${with_devkit+set}" = set; then :
7554   withval=$with_devkit;
7555     if test "x$with_sys_root" != x; then
7556       as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
7557     fi
7558     if test "x$with_tools_dir" != x; then
7559       as_fn_error $? "Cannot specify both --with-devkit and --with-tools-dir at the same time" "$LINENO" 5
7560     fi
7561     TOOLS_DIR=$with_devkit/bin
7562     SYS_ROOT=$with_devkit/$host_alias/libc
7563 
7564 fi
7565 
7566 
7567 
7568 
7569 # Setup default logging of stdout and stderr to build.log in the output root.
7570 BUILD_LOG='$(OUTPUT_ROOT)/build.log'
7571 BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
7572 BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
7573 
7574 
7575 
7576 
7577 
7578 # Check if it's a pure open build or if custom sources are to be used.
7579 
7580   # Check whether --enable-openjdk-only was given.
7581 if test "${enable_openjdk_only+set}" = set; then :
7582   enableval=$enable_openjdk_only;
7583 else
7584   enable_openjdk_only="no"
7585 fi
7586 
7587 
7588   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
7589 $as_echo_n "checking for presence of closed sources... " >&6; }
7590   if test -d "$SRC_ROOT/jdk/src/closed"; then
7591     CLOSED_SOURCE_PRESENT=yes
7592   else
7593     CLOSED_SOURCE_PRESENT=no
7594   fi
7595   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
7596 $as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
7597 
7598   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
7599 $as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
7600   SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
7601   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
7602 $as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
7603 
7604   if test "x$CLOSED_SOURCE_PRESENT" = xno; then
7605     OPENJDK=true
7606     if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7607       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
7608 $as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
7609     fi
7610   else
7611     if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7612       OPENJDK=true
7613     else
7614       OPENJDK=false
7615     fi
7616   fi
7617 
7618   if test "x$OPENJDK" = "xtrue"; then
7619     SET_OPENJDK="OPENJDK=true"
7620   fi
7621 
7622 
7623 
7624 
7625 # These are needed to be able to create a configuration name (and thus the output directory)
7626 
7627 ###############################################################################
7628 #
7629 # Check which variant of the JDK that we want to build.
7630 # Currently we have:
7631 #    normal:   standard edition
7632 # but the custom make system may add other variants
7633 #
7634 # Effectively the JDK variant gives a name to a specific set of
7635 # modules to compile into the JDK. In the future, these modules
7636 # might even be Jigsaw modules.
7637 #
7638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
7639 $as_echo_n "checking which variant of the JDK to build... " >&6; }
7640 
7641 # Check whether --with-jdk-variant was given.
7642 if test "${with_jdk_variant+set}" = set; then :
7643   withval=$with_jdk_variant;
7644 fi
7645 
7646 
7647 if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7648     JDK_VARIANT="normal"
7649 else
7650     as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7651 fi
7652 
7653 
7654 
7655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
7656 $as_echo "$JDK_VARIANT" >&6; }
7657 
7658 
7659 
7660 ###############################################################################
7661 #
7662 # Check which variants of the JVM that we want to build.
7663 # Currently we have:
7664 #    server: normal interpreter and a tiered C1/C2 compiler
7665 #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
7666 #    minimal1: reduced form of client with optional VM services and features stripped out
7667 #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
7668 #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
7669 #    zero: no machine code interpreter, no compiler
7670 #    zeroshark: zero interpreter and shark/llvm compiler backend
7671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
7672 $as_echo_n "checking which variants of the JVM to build... " >&6; }
7673 
7674 # Check whether --with-jvm-variants was given.
7675 if test "${with_jvm_variants+set}" = set; then :
7676   withval=$with_jvm_variants;
7677 fi
7678 
7679 
7680 if test "x$with_jvm_variants" = x; then
7681      with_jvm_variants="server"
7682 fi
7683 
7684 JVM_VARIANTS=",$with_jvm_variants,"
7685 TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
7686 
7687 if test "x$TEST_VARIANTS" != "x,"; then
7688    as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark" "$LINENO" 5
7689 fi
7690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7691 $as_echo "$with_jvm_variants" >&6; }
7692 
7693 JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7694 JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7695 JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
7696 JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7697 JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7698 JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7699 
7700 if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7701     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7702         as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
7703     fi
7704 fi
7705 if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7706     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7707         as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
7708     fi
7709 fi
7710 if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7711     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7712         as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
7713     fi
7714 fi
7715 
7716 # Replace the commas with AND for use in the build directory name.
7717 ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
7718 COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/minimal1,/1/' -e 's/kernel,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/'`
7719 if test "x$COUNT_VARIANTS" != "x,1"; then
7720     BUILDING_MULTIPLE_JVM_VARIANTS=yes
7721 else
7722     BUILDING_MULTIPLE_JVM_VARIANTS=no
7723 fi
7724 
7725 
7726 
7727 
7728 
7729 
7730 
7731 
7732 
7733 INCLUDE_SA=true
7734 if test "x$JVM_VARIANT_ZERO" = xtrue ; then
7735     INCLUDE_SA=false
7736 fi
7737 if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
7738     INCLUDE_SA=false
7739 fi
7740 
7741 
7742 if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7743    MACOSX_UNIVERSAL="true"
7744 fi
7745 
7746 
7747 
7748 
7749 
7750 ###############################################################################
7751 #
7752 # Set the debug level
7753 #    release: no debug information, all optimizations, no asserts.
7754 #    fastdebug: debug information (-g), all optimizations, all asserts
7755 #    slowdebug: debug information (-g), no optimizations, all asserts
7756 #
7757 DEBUG_LEVEL="release"
7758 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
7759 $as_echo_n "checking which debug level to use... " >&6; }
7760 # Check whether --enable-debug was given.
7761 if test "${enable_debug+set}" = set; then :
7762   enableval=$enable_debug;
7763         ENABLE_DEBUG="${enableval}"
7764         DEBUG_LEVEL="fastdebug"
7765 
7766 else
7767   ENABLE_DEBUG="no"
7768 fi
7769 
7770 
7771 
7772 # Check whether --with-debug-level was given.
7773 if test "${with_debug_level+set}" = set; then :
7774   withval=$with_debug_level;
7775         DEBUG_LEVEL="${withval}"
7776         if test "x$ENABLE_DEBUG" = xyes; then
7777                         as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
7778         fi
7779 
7780 fi
7781 
7782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
7783 $as_echo "$DEBUG_LEVEL" >&6; }
7784 
7785 if test "x$DEBUG_LEVEL" != xrelease && \
7786    test "x$DEBUG_LEVEL" != xfastdebug && \
7787    test "x$DEBUG_LEVEL" != xslowdebug; then
7788    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
7789 fi
7790 
7791 
7792 ###############################################################################
7793 #
7794 # Setup legacy vars/targets and new vars to deal with different debug levels.
7795 #
7796 
7797 case $DEBUG_LEVEL in
7798       release )
7799           VARIANT="OPT"
7800           FASTDEBUG="false"
7801           DEBUG_CLASSFILES="false"
7802           BUILD_VARIANT_RELEASE=""
7803           HOTSPOT_DEBUG_LEVEL="product"
7804           HOTSPOT_EXPORT="product"
7805            ;;
7806       fastdebug )
7807           VARIANT="DBG"
7808           FASTDEBUG="true"
7809           DEBUG_CLASSFILES="true"
7810           BUILD_VARIANT_RELEASE="-fastdebug"
7811           HOTSPOT_DEBUG_LEVEL="fastdebug"
7812           HOTSPOT_EXPORT="fastdebug"
7813            ;;
7814       slowdebug )
7815           VARIANT="DBG"
7816           FASTDEBUG="false"
7817           DEBUG_CLASSFILES="true"
7818           BUILD_VARIANT_RELEASE="-debug"
7819           HOTSPOT_DEBUG_LEVEL="jvmg"
7820           HOTSPOT_EXPORT="debug"
7821            ;;
7822 esac
7823 
7824 #####
7825 # Generate the legacy makefile targets for hotspot.
7826 # The hotspot api for selecting the build artifacts, really, needs to be improved.
7827 # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
7828 # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
7829 # But until then ...
7830 HOTSPOT_TARGET=""
7831 
7832 if test "x$JVM_VARIANT_SERVER" = xtrue; then
7833     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
7834 fi
7835 
7836 if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7837     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
7838 fi
7839 
7840 if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7841     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
7842 fi
7843 
7844 if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7845     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
7846 fi
7847 
7848 if test "x$JVM_VARIANT_ZERO" = xtrue; then
7849     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
7850 fi
7851 
7852 if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
7853     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
7854 fi
7855 
7856 HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
7857 
7858 # On Macosx universal binaries are produced, but they only contain
7859 # 64 bit intel. This invalidates control of which jvms are built
7860 # from configure, but only server is valid anyway. Fix this
7861 # when hotspot makefiles are rewritten.
7862 if test "x$MACOSX_UNIVERSAL" = xtrue; then
7863     HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
7864 fi
7865 
7866 #####
7867 
7868 
7869 
7870 
7871 
7872 
7873 
7874 
7875 # With basic setup done, call the custom early hook.
7876 
7877 
7878 # To properly create a configuration name, we need to have the OpenJDK target
7879 # and options (variants and debug level) parsed.
7880 
7881 
7882 
7883 # Check whether --with-conf-name was given.
7884 if test "${with_conf_name+set}" = set; then :
7885   withval=$with_conf_name;  CONF_NAME=${with_conf_name}
7886 fi
7887 
7888 
7889 # Test from where we are running configure, in or outside of src root.
7890 # To enable comparison of directories, CURDIR needs to be symlink free
7891 # just like SRC_ROOT already is
7892 NOSYM_CURDIR="$CURDIR"
7893 
7894     if test "x$OPENJDK_BUILD_OS" != xwindows; then
7895         # Follow a chain of symbolic links. Use readlink
7896         # where it exists, else fall back to horribly
7897         # complicated shell code.
7898         if test "x$READLINK_TESTED" != yes; then
7899             # On MacOSX there is a readlink tool with a different
7900             # purpose than the GNU readlink tool. Check the found readlink.
7901             ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
7902             if test "x$ISGNU" = x; then
7903                  # A readlink that we do not know how to use.
7904                  # Are there other non-GNU readlinks out there?
7905                  READLINK_TESTED=yes
7906                  READLINK=
7907             fi
7908         fi
7909 
7910         if test "x$READLINK" != x; then
7911             NOSYM_CURDIR=`$READLINK -f $NOSYM_CURDIR`
7912         else
7913             # Save the current directory for restoring afterwards
7914             STARTDIR=$PWD
7915             COUNTER=0
7916             sym_link_dir=`$DIRNAME $NOSYM_CURDIR`
7917             sym_link_file=`$BASENAME $NOSYM_CURDIR`
7918             # Use the system pwd and not the shell builtin to resolve directory symlinks
7919             cd $sym_link_dir
7920             cd `$THEPWDCMD`
7921             sym_link_dir=`$THEPWDCMD`
7922             # Resolve file symlinks
7923             while test $COUNTER -lt 20; do
7924                 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
7925                 if test "x$ISLINK" == x; then
7926                     # This is not a symbolic link! We are done!
7927                     break
7928                 fi
7929                 # Again resolve directory symlinks since the target of the just found
7930                 # link could be in a different directory
7931                 cd `$DIRNAME $ISLINK`
7932                 sym_link_dir=`$THEPWDCMD`
7933                 sym_link_file=`$BASENAME $ISLINK`
7934                 let COUNTER=COUNTER+1
7935             done
7936             cd $STARTDIR
7937             NOSYM_CURDIR=$sym_link_dir/$sym_link_file
7938         fi
7939     fi
7940 
7941 if test "x$NOSYM_CURDIR" = "x$SRC_ROOT" || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common" \
7942         || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/autoconf" \
7943         || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
7944     # We are running configure from the src root.
7945     # Create a default ./build/target-variant-debuglevel output root.
7946     if test "x${CONF_NAME}" = x; then
7947         CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
7948     fi
7949     OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
7950     $MKDIR -p "$OUTPUT_ROOT"
7951     if test ! -d "$OUTPUT_ROOT"; then
7952         as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
7953     fi
7954 else
7955     # We are running configure from outside of the src dir.
7956     # Then use the current directory as output dir!
7957     # If configuration is situated in normal build directory, just use the build
7958     # directory name as configuration name, otherwise use the complete path.
7959     if test "x${CONF_NAME}" = x; then
7960         CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
7961     fi
7962     OUTPUT_ROOT="$CURDIR"
7963 
7964     # WARNING: This might be a bad thing to do. You need to be sure you want to
7965     # have a configuration in this directory. Do some sanity checks!
7966 
7967     if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
7968       # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
7969       # other files
7970       files_present=`$LS $OUTPUT_ROOT`
7971       # Configure has already touched config.log and confdefs.h in the current dir when this check
7972       # is performed.
7973       filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
7974                                              | $TR -d '\n'`
7975       if test "x$filtered_files" != x; then
7976         { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
7977 $as_echo "$as_me: Current directory is $CURDIR." >&6;}
7978         { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
7979 $as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
7980         { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
7981 $as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
7982         { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
7983 $as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
7984         { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
7985 $as_echo "$as_me: seriously mess up just about everything." >&6;}
7986         { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
7987 $as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
7988         { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
7989 $as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
7990         as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
7991       fi
7992     fi
7993 fi
7994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
7995 $as_echo_n "checking what configuration name to use... " >&6; }
7996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
7997 $as_echo "$CONF_NAME" >&6; }
7998 
7999 
8000   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8001 
8002   # Input might be given as Windows format, start by converting to
8003   # unix format.
8004   path="$OUTPUT_ROOT"
8005   new_path=`$CYGPATH -u "$path"`
8006 
8007   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8008   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8009   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8010   # "foo.exe" is OK but "foo" is an error.
8011   #
8012   # This test is therefore slightly more accurate than "test -f" to check for file precense.
8013   # It is also a way to make sure we got the proper file name for the real test later on.
8014   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8015   if test "x$test_shortpath" = x; then
8016     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8017 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8018     as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
8019   fi
8020 
8021   # Call helper function which possibly converts this using DOS-style short mode.
8022   # If so, the updated path is stored in $new_path.
8023 
8024   input_path="$new_path"
8025   # Check if we need to convert this using DOS-style short mode. If the path
8026   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8027   # take no chances and rewrite it.
8028   # Note: m4 eats our [], so we need to use [ and ] instead.
8029   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8030   if test "x$has_forbidden_chars" != x; then
8031     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8032     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8033     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8034     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8035       # Going to short mode and back again did indeed matter. Since short mode is
8036       # case insensitive, let's make it lowercase to improve readability.
8037       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8038       # Now convert it back to Unix-stile (cygpath)
8039       input_path=`$CYGPATH -u "$shortmode_path"`
8040       new_path="$input_path"
8041     fi
8042   fi
8043 
8044   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8045   if test "x$test_cygdrive_prefix" = x; then
8046     # As a simple fix, exclude /usr/bin since it's not a real path.
8047     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
8048       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8049       # a path prefixed by /cygdrive for fixpath to work.
8050       new_path="$CYGWIN_ROOT_PATH$input_path"
8051     fi
8052   fi
8053 
8054 
8055   if test "x$path" != "x$new_path"; then
8056     OUTPUT_ROOT="$new_path"
8057     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8058 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8059   fi
8060 
8061   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8062 
8063   path="$OUTPUT_ROOT"
8064   has_colon=`$ECHO $path | $GREP ^.:`
8065   new_path="$path"
8066   if test "x$has_colon" = x; then
8067     # Not in mixed or Windows style, start by that.
8068     new_path=`cmd //c echo $path`
8069   fi
8070 
8071 
8072   input_path="$new_path"
8073   # Check if we need to convert this using DOS-style short mode. If the path
8074   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8075   # take no chances and rewrite it.
8076   # Note: m4 eats our [], so we need to use [ and ] instead.
8077   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8078   if test "x$has_forbidden_chars" != x; then
8079     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8080     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8081   fi
8082 
8083 
8084   windows_path="$new_path"
8085   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8086     unix_path=`$CYGPATH -u "$windows_path"`
8087     new_path="$unix_path"
8088   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8089     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8090     new_path="$unix_path"
8091   fi
8092 
8093   if test "x$path" != "x$new_path"; then
8094     OUTPUT_ROOT="$new_path"
8095     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8096 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8097   fi
8098 
8099   # Save the first 10 bytes of this path to the storage, so fixpath can work.
8100   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8101 
8102   else
8103     # We're on a posix platform. Hooray! :)
8104     path="$OUTPUT_ROOT"
8105 
8106     if test ! -f "$path" && test ! -d "$path"; then
8107       as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
8108     fi
8109 
8110     has_space=`$ECHO "$path" | $GREP " "`
8111     if test "x$has_space" != x; then
8112       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8113 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8114       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
8115     fi
8116   fi
8117 
8118 
8119 SPEC=$OUTPUT_ROOT/spec.gmk
8120 
8121 CONF_NAME=$CONF_NAME
8122 
8123 OUTPUT_ROOT=$OUTPUT_ROOT
8124 
8125 
8126 # Most of the probed defines are put into config.h
8127 ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
8128 
8129 # The spec.gmk file contains all variables for the make system.
8130 ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
8131 
8132 # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
8133 ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
8134 
8135 # The bootcycle-spec.gmk file contains support for boot cycle builds.
8136 ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
8137 
8138 # The compare.sh is used to compare the build output to other builds.
8139 ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
8140 
8141 # Spec.sh is currently used by compare-objects.sh
8142 ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
8143 
8144 # The generated Makefile knows where the spec.gmk is and where the source is.
8145 # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
8146 # which will look for generated configurations
8147 ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
8148 
8149 
8150 # Save the arguments given to us
8151 echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
8152 
8153 
8154 # Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
8155 
8156     for ac_prog in apt-get yum port pkgutil pkgadd
8157 do
8158   # Extract the first word of "$ac_prog", so it can be a program name with args.
8159 set dummy $ac_prog; ac_word=$2
8160 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8161 $as_echo_n "checking for $ac_word... " >&6; }
8162 if test "${ac_cv_prog_PKGHANDLER+set}" = set; then :
8163   $as_echo_n "(cached) " >&6
8164 else
8165   if test -n "$PKGHANDLER"; then
8166   ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
8167 else
8168 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8169 for as_dir in $PATH
8170 do
8171   IFS=$as_save_IFS
8172   test -z "$as_dir" && as_dir=.
8173     for ac_exec_ext in '' $ac_executable_extensions; do
8174   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8175     ac_cv_prog_PKGHANDLER="$ac_prog"
8176     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8177     break 2
8178   fi
8179 done
8180   done
8181 IFS=$as_save_IFS
8182 
8183 fi
8184 fi
8185 PKGHANDLER=$ac_cv_prog_PKGHANDLER
8186 if test -n "$PKGHANDLER"; then
8187   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
8188 $as_echo "$PKGHANDLER" >&6; }
8189 else
8190   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8191 $as_echo "no" >&6; }
8192 fi
8193 
8194 
8195   test -n "$PKGHANDLER" && break
8196 done
8197 
8198 
8199 
8200 # Setup tools that requires more complex handling, or that is not needed by the configure script.
8201 
8202 
8203   # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
8204   if test "x$MAKE" != x; then
8205     # User has supplied a make, test it.
8206     if test ! -f "$MAKE"; then
8207       as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
8208     fi
8209 
8210   MAKE_CANDIDATE=""$MAKE""
8211   DESCRIPTION="user supplied MAKE=$MAKE"
8212   if test "x$MAKE_CANDIDATE" != x; then
8213     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8214 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8215     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8216     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8217     if test "x$IS_GNU_MAKE" = x; then
8218       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8219 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8220     else
8221       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8222       if test "x$IS_MODERN_MAKE" = x; then
8223         { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
8224 $as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
8225       else
8226         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8227           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8228             MAKE_EXPECTED_ENV='cygwin'
8229           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8230             MAKE_EXPECTED_ENV='msys'
8231           else
8232             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8233           fi
8234           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8235           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8236         else
8237           # Not relevant for non-Windows
8238           IS_MAKE_CORRECT_ENV=true
8239         fi
8240         if test "x$IS_MAKE_CORRECT_ENV" = x; then
8241           { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&5
8242 $as_echo "$as_me: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&6;}
8243         else
8244           FOUND_MAKE=$MAKE_CANDIDATE
8245 
8246   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8247 
8248   # First separate the path from the arguments. This will split at the first
8249   # space.
8250   complete="$FOUND_MAKE"
8251   path="${complete%% *}"
8252   tmp="$complete EOL"
8253   arguments="${tmp#* }"
8254 
8255   # Input might be given as Windows format, start by converting to
8256   # unix format.
8257   new_path=`$CYGPATH -u "$path"`
8258 
8259   # Now try to locate executable using which
8260   new_path=`$WHICH "$new_path" 2> /dev/null`
8261   # bat and cmd files are not always considered executable in cygwin causing which
8262   # to not find them
8263   if test "x$new_path" = x \
8264            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8265            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8266     new_path=`$CYGPATH -u "$path"`
8267   fi
8268   if test "x$new_path" = x; then
8269     # Oops. Which didn't find the executable.
8270     # The splitting of arguments from the executable at a space might have been incorrect,
8271     # since paths with space are more likely in Windows. Give it another try with the whole
8272     # argument.
8273     path="$complete"
8274     arguments="EOL"
8275     new_path=`$CYGPATH -u "$path"`
8276     new_path=`$WHICH "$new_path" 2> /dev/null`
8277     # bat and cmd files are not always considered executable in cygwin causing which
8278     # to not find them
8279     if test "x$new_path" = x \
8280              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8281              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8282       new_path=`$CYGPATH -u "$path"`
8283     fi
8284     if test "x$new_path" = x; then
8285       # It's still not found. Now this is an unrecoverable error.
8286       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8287 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8288       has_space=`$ECHO "$complete" | $GREP " "`
8289       if test "x$has_space" != x; then
8290         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8291 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8292       fi
8293       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8294     fi
8295   fi
8296 
8297   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8298   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8299   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8300   # "foo.exe" is OK but "foo" is an error.
8301   #
8302   # This test is therefore slightly more accurate than "test -f" to check for file precense.
8303   # It is also a way to make sure we got the proper file name for the real test later on.
8304   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8305   if test "x$test_shortpath" = x; then
8306     # Short path failed, file does not exist as specified.
8307     # Try adding .exe or .cmd
8308     if test -f "${new_path}.exe"; then
8309        input_to_shortpath="${new_path}.exe"
8310     elif test -f "${new_path}.cmd"; then
8311        input_to_shortpath="${new_path}.cmd"
8312     else
8313       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8314 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8315       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8316 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8317       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8318     fi
8319   else
8320     input_to_shortpath="$new_path"
8321   fi
8322 
8323   # Call helper function which possibly converts this using DOS-style short mode.
8324   # If so, the updated path is stored in $new_path.
8325   new_path="$input_to_shortpath"
8326 
8327   input_path="$input_to_shortpath"
8328   # Check if we need to convert this using DOS-style short mode. If the path
8329   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8330   # take no chances and rewrite it.
8331   # Note: m4 eats our [], so we need to use [ and ] instead.
8332   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8333   if test "x$has_forbidden_chars" != x; then
8334     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8335     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8336     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8337     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8338       # Going to short mode and back again did indeed matter. Since short mode is
8339       # case insensitive, let's make it lowercase to improve readability.
8340       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8341       # Now convert it back to Unix-stile (cygpath)
8342       input_path=`$CYGPATH -u "$shortmode_path"`
8343       new_path="$input_path"
8344     fi
8345   fi
8346 
8347   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8348   if test "x$test_cygdrive_prefix" = x; then
8349     # As a simple fix, exclude /usr/bin since it's not a real path.
8350     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8351       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8352       # a path prefixed by /cygdrive for fixpath to work.
8353       new_path="$CYGWIN_ROOT_PATH$input_path"
8354     fi
8355   fi
8356 
8357   # remove trailing .exe if any
8358   new_path="${new_path/%.exe/}"
8359 
8360   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8361 
8362   # First separate the path from the arguments. This will split at the first
8363   # space.
8364   complete="$FOUND_MAKE"
8365   path="${complete%% *}"
8366   tmp="$complete EOL"
8367   arguments="${tmp#* }"
8368 
8369   # Input might be given as Windows format, start by converting to
8370   # unix format.
8371   new_path="$path"
8372 
8373   windows_path="$new_path"
8374   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8375     unix_path=`$CYGPATH -u "$windows_path"`
8376     new_path="$unix_path"
8377   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8378     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8379     new_path="$unix_path"
8380   fi
8381 
8382 
8383   # Now try to locate executable using which
8384   new_path=`$WHICH "$new_path" 2> /dev/null`
8385 
8386   if test "x$new_path" = x; then
8387     # Oops. Which didn't find the executable.
8388     # The splitting of arguments from the executable at a space might have been incorrect,
8389     # since paths with space are more likely in Windows. Give it another try with the whole
8390     # argument.
8391     path="$complete"
8392     arguments="EOL"
8393     new_path="$path"
8394 
8395   windows_path="$new_path"
8396   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8397     unix_path=`$CYGPATH -u "$windows_path"`
8398     new_path="$unix_path"
8399   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8400     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8401     new_path="$unix_path"
8402   fi
8403 
8404 
8405     new_path=`$WHICH "$new_path" 2> /dev/null`
8406 
8407     if test "x$new_path" = x; then
8408       # It's still not found. Now this is an unrecoverable error.
8409       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8410 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8411       has_space=`$ECHO "$complete" | $GREP " "`
8412       if test "x$has_space" != x; then
8413         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8414 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8415       fi
8416       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8417     fi
8418   fi
8419 
8420   # Now new_path has a complete unix path to the binary
8421   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8422     # Keep paths in /bin as-is, but remove trailing .exe if any
8423     new_path="${new_path/%.exe/}"
8424     # Do not save /bin paths to all_fixpath_prefixes!
8425   else
8426     # Not in mixed or Windows style, start by that.
8427     new_path=`cmd //c echo $new_path`
8428 
8429   input_path="$new_path"
8430   # Check if we need to convert this using DOS-style short mode. If the path
8431   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8432   # take no chances and rewrite it.
8433   # Note: m4 eats our [], so we need to use [ and ] instead.
8434   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8435   if test "x$has_forbidden_chars" != x; then
8436     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8437     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8438   fi
8439 
8440     # Output is in $new_path
8441 
8442   windows_path="$new_path"
8443   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8444     unix_path=`$CYGPATH -u "$windows_path"`
8445     new_path="$unix_path"
8446   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8447     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8448     new_path="$unix_path"
8449   fi
8450 
8451     # remove trailing .exe if any
8452     new_path="${new_path/%.exe/}"
8453 
8454     # Save the first 10 bytes of this path to the storage, so fixpath can work.
8455     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8456   fi
8457 
8458   else
8459     # We're on a posix platform. Hooray! :)
8460     # First separate the path from the arguments. This will split at the first
8461     # space.
8462     complete="$FOUND_MAKE"
8463     path="${complete%% *}"
8464     tmp="$complete EOL"
8465     arguments="${tmp#* }"
8466 
8467     # Cannot rely on the command "which" here since it doesn't always work.
8468     is_absolute_path=`$ECHO "$path" | $GREP ^/`
8469     if test -z "$is_absolute_path"; then
8470       # Path to executable is not absolute. Find it.
8471       IFS_save="$IFS"
8472       IFS=:
8473       for p in $PATH; do
8474         if test -f "$p/$path" && test -x "$p/$path"; then
8475           new_path="$p/$path"
8476           break
8477         fi
8478       done
8479       IFS="$IFS_save"
8480     else
8481       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8482 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8483       new_path="$path"
8484     fi
8485 
8486     if test "x$new_path" = x; then
8487         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8488 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8489         has_space=`$ECHO "$complete" | $GREP " "`
8490         if test "x$has_space" != x; then
8491           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8492 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8493         fi
8494         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8495       fi
8496   fi
8497 
8498       # Now join together the path and the arguments once again
8499       if test "x$arguments" != xEOL; then
8500         new_complete="$new_path ${arguments% *}"
8501       else
8502         new_complete="$new_path"
8503       fi
8504 
8505   if test "x$complete" != "x$new_complete"; then
8506       FOUND_MAKE="$new_complete"
8507       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8508 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8509     fi
8510 
8511         fi
8512       fi
8513     fi
8514   fi
8515 
8516     if test "x$FOUND_MAKE" = x; then
8517       as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
8518     fi
8519   else
8520     # Try our hardest to locate a correct version of GNU make
8521     for ac_prog in gmake
8522 do
8523   # Extract the first word of "$ac_prog", so it can be a program name with args.
8524 set dummy $ac_prog; ac_word=$2
8525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8526 $as_echo_n "checking for $ac_word... " >&6; }
8527 if test "${ac_cv_path_CHECK_GMAKE+set}" = set; then :
8528   $as_echo_n "(cached) " >&6
8529 else
8530   case $CHECK_GMAKE in
8531   [\\/]* | ?:[\\/]*)
8532   ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
8533   ;;
8534   *)
8535   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8536 for as_dir in $PATH
8537 do
8538   IFS=$as_save_IFS
8539   test -z "$as_dir" && as_dir=.
8540     for ac_exec_ext in '' $ac_executable_extensions; do
8541   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8542     ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8543     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8544     break 2
8545   fi
8546 done
8547   done
8548 IFS=$as_save_IFS
8549 
8550   ;;
8551 esac
8552 fi
8553 CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
8554 if test -n "$CHECK_GMAKE"; then
8555   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
8556 $as_echo "$CHECK_GMAKE" >&6; }
8557 else
8558   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8559 $as_echo "no" >&6; }
8560 fi
8561 
8562 
8563   test -n "$CHECK_GMAKE" && break
8564 done
8565 
8566 
8567   MAKE_CANDIDATE=""$CHECK_GMAKE""
8568   DESCRIPTION="gmake in PATH"
8569   if test "x$MAKE_CANDIDATE" != x; then
8570     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8571 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8572     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8573     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8574     if test "x$IS_GNU_MAKE" = x; then
8575       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8576 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8577     else
8578       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8579       if test "x$IS_MODERN_MAKE" = x; then
8580         { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
8581 $as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
8582       else
8583         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8584           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8585             MAKE_EXPECTED_ENV='cygwin'
8586           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8587             MAKE_EXPECTED_ENV='msys'
8588           else
8589             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8590           fi
8591           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8592           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8593         else
8594           # Not relevant for non-Windows
8595           IS_MAKE_CORRECT_ENV=true
8596         fi
8597         if test "x$IS_MAKE_CORRECT_ENV" = x; then
8598           { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&5
8599 $as_echo "$as_me: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&6;}
8600         else
8601           FOUND_MAKE=$MAKE_CANDIDATE
8602 
8603   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8604 
8605   # First separate the path from the arguments. This will split at the first
8606   # space.
8607   complete="$FOUND_MAKE"
8608   path="${complete%% *}"
8609   tmp="$complete EOL"
8610   arguments="${tmp#* }"
8611 
8612   # Input might be given as Windows format, start by converting to
8613   # unix format.
8614   new_path=`$CYGPATH -u "$path"`
8615 
8616   # Now try to locate executable using which
8617   new_path=`$WHICH "$new_path" 2> /dev/null`
8618   # bat and cmd files are not always considered executable in cygwin causing which
8619   # to not find them
8620   if test "x$new_path" = x \
8621            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8622            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8623     new_path=`$CYGPATH -u "$path"`
8624   fi
8625   if test "x$new_path" = x; then
8626     # Oops. Which didn't find the executable.
8627     # The splitting of arguments from the executable at a space might have been incorrect,
8628     # since paths with space are more likely in Windows. Give it another try with the whole
8629     # argument.
8630     path="$complete"
8631     arguments="EOL"
8632     new_path=`$CYGPATH -u "$path"`
8633     new_path=`$WHICH "$new_path" 2> /dev/null`
8634     # bat and cmd files are not always considered executable in cygwin causing which
8635     # to not find them
8636     if test "x$new_path" = x \
8637              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8638              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8639       new_path=`$CYGPATH -u "$path"`
8640     fi
8641     if test "x$new_path" = x; then
8642       # It's still not found. Now this is an unrecoverable error.
8643       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8644 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8645       has_space=`$ECHO "$complete" | $GREP " "`
8646       if test "x$has_space" != x; then
8647         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8648 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8649       fi
8650       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8651     fi
8652   fi
8653 
8654   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8655   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8656   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8657   # "foo.exe" is OK but "foo" is an error.
8658   #
8659   # This test is therefore slightly more accurate than "test -f" to check for file precense.
8660   # It is also a way to make sure we got the proper file name for the real test later on.
8661   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8662   if test "x$test_shortpath" = x; then
8663     # Short path failed, file does not exist as specified.
8664     # Try adding .exe or .cmd
8665     if test -f "${new_path}.exe"; then
8666        input_to_shortpath="${new_path}.exe"
8667     elif test -f "${new_path}.cmd"; then
8668        input_to_shortpath="${new_path}.cmd"
8669     else
8670       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8671 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8672       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8673 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8674       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8675     fi
8676   else
8677     input_to_shortpath="$new_path"
8678   fi
8679 
8680   # Call helper function which possibly converts this using DOS-style short mode.
8681   # If so, the updated path is stored in $new_path.
8682   new_path="$input_to_shortpath"
8683 
8684   input_path="$input_to_shortpath"
8685   # Check if we need to convert this using DOS-style short mode. If the path
8686   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8687   # take no chances and rewrite it.
8688   # Note: m4 eats our [], so we need to use [ and ] instead.
8689   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8690   if test "x$has_forbidden_chars" != x; then
8691     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8692     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8693     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8694     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8695       # Going to short mode and back again did indeed matter. Since short mode is
8696       # case insensitive, let's make it lowercase to improve readability.
8697       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8698       # Now convert it back to Unix-stile (cygpath)
8699       input_path=`$CYGPATH -u "$shortmode_path"`
8700       new_path="$input_path"
8701     fi
8702   fi
8703 
8704   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8705   if test "x$test_cygdrive_prefix" = x; then
8706     # As a simple fix, exclude /usr/bin since it's not a real path.
8707     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8708       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8709       # a path prefixed by /cygdrive for fixpath to work.
8710       new_path="$CYGWIN_ROOT_PATH$input_path"
8711     fi
8712   fi
8713 
8714   # remove trailing .exe if any
8715   new_path="${new_path/%.exe/}"
8716 
8717   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8718 
8719   # First separate the path from the arguments. This will split at the first
8720   # space.
8721   complete="$FOUND_MAKE"
8722   path="${complete%% *}"
8723   tmp="$complete EOL"
8724   arguments="${tmp#* }"
8725 
8726   # Input might be given as Windows format, start by converting to
8727   # unix format.
8728   new_path="$path"
8729 
8730   windows_path="$new_path"
8731   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8732     unix_path=`$CYGPATH -u "$windows_path"`
8733     new_path="$unix_path"
8734   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8735     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8736     new_path="$unix_path"
8737   fi
8738 
8739 
8740   # Now try to locate executable using which
8741   new_path=`$WHICH "$new_path" 2> /dev/null`
8742 
8743   if test "x$new_path" = x; then
8744     # Oops. Which didn't find the executable.
8745     # The splitting of arguments from the executable at a space might have been incorrect,
8746     # since paths with space are more likely in Windows. Give it another try with the whole
8747     # argument.
8748     path="$complete"
8749     arguments="EOL"
8750     new_path="$path"
8751 
8752   windows_path="$new_path"
8753   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8754     unix_path=`$CYGPATH -u "$windows_path"`
8755     new_path="$unix_path"
8756   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8757     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8758     new_path="$unix_path"
8759   fi
8760 
8761 
8762     new_path=`$WHICH "$new_path" 2> /dev/null`
8763 
8764     if test "x$new_path" = x; then
8765       # It's still not found. Now this is an unrecoverable error.
8766       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8767 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8768       has_space=`$ECHO "$complete" | $GREP " "`
8769       if test "x$has_space" != x; then
8770         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8771 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8772       fi
8773       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8774     fi
8775   fi
8776 
8777   # Now new_path has a complete unix path to the binary
8778   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8779     # Keep paths in /bin as-is, but remove trailing .exe if any
8780     new_path="${new_path/%.exe/}"
8781     # Do not save /bin paths to all_fixpath_prefixes!
8782   else
8783     # Not in mixed or Windows style, start by that.
8784     new_path=`cmd //c echo $new_path`
8785 
8786   input_path="$new_path"
8787   # Check if we need to convert this using DOS-style short mode. If the path
8788   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8789   # take no chances and rewrite it.
8790   # Note: m4 eats our [], so we need to use [ and ] instead.
8791   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8792   if test "x$has_forbidden_chars" != x; then
8793     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8794     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8795   fi
8796 
8797     # Output is in $new_path
8798 
8799   windows_path="$new_path"
8800   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8801     unix_path=`$CYGPATH -u "$windows_path"`
8802     new_path="$unix_path"
8803   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8804     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8805     new_path="$unix_path"
8806   fi
8807 
8808     # remove trailing .exe if any
8809     new_path="${new_path/%.exe/}"
8810 
8811     # Save the first 10 bytes of this path to the storage, so fixpath can work.
8812     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8813   fi
8814 
8815   else
8816     # We're on a posix platform. Hooray! :)
8817     # First separate the path from the arguments. This will split at the first
8818     # space.
8819     complete="$FOUND_MAKE"
8820     path="${complete%% *}"
8821     tmp="$complete EOL"
8822     arguments="${tmp#* }"
8823 
8824     # Cannot rely on the command "which" here since it doesn't always work.
8825     is_absolute_path=`$ECHO "$path" | $GREP ^/`
8826     if test -z "$is_absolute_path"; then
8827       # Path to executable is not absolute. Find it.
8828       IFS_save="$IFS"
8829       IFS=:
8830       for p in $PATH; do
8831         if test -f "$p/$path" && test -x "$p/$path"; then
8832           new_path="$p/$path"
8833           break
8834         fi
8835       done
8836       IFS="$IFS_save"
8837     else
8838       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8839 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8840       new_path="$path"
8841     fi
8842 
8843     if test "x$new_path" = x; then
8844         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8845 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8846         has_space=`$ECHO "$complete" | $GREP " "`
8847         if test "x$has_space" != x; then
8848           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8849 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8850         fi
8851         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8852       fi
8853   fi
8854 
8855       # Now join together the path and the arguments once again
8856       if test "x$arguments" != xEOL; then
8857         new_complete="$new_path ${arguments% *}"
8858       else
8859         new_complete="$new_path"
8860       fi
8861 
8862   if test "x$complete" != "x$new_complete"; then
8863       FOUND_MAKE="$new_complete"
8864       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8865 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8866     fi
8867 
8868         fi
8869       fi
8870     fi
8871   fi
8872 
8873 
8874     if test "x$FOUND_MAKE" = x; then
8875       for ac_prog in make
8876 do
8877   # Extract the first word of "$ac_prog", so it can be a program name with args.
8878 set dummy $ac_prog; ac_word=$2
8879 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8880 $as_echo_n "checking for $ac_word... " >&6; }
8881 if test "${ac_cv_path_CHECK_MAKE+set}" = set; then :
8882   $as_echo_n "(cached) " >&6
8883 else
8884   case $CHECK_MAKE in
8885   [\\/]* | ?:[\\/]*)
8886   ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
8887   ;;
8888   *)
8889   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8890 for as_dir in $PATH
8891 do
8892   IFS=$as_save_IFS
8893   test -z "$as_dir" && as_dir=.
8894     for ac_exec_ext in '' $ac_executable_extensions; do
8895   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8896     ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
8897     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8898     break 2
8899   fi
8900 done
8901   done
8902 IFS=$as_save_IFS
8903 
8904   ;;
8905 esac
8906 fi
8907 CHECK_MAKE=$ac_cv_path_CHECK_MAKE
8908 if test -n "$CHECK_MAKE"; then
8909   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
8910 $as_echo "$CHECK_MAKE" >&6; }
8911 else
8912   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8913 $as_echo "no" >&6; }
8914 fi
8915 
8916 
8917   test -n "$CHECK_MAKE" && break
8918 done
8919 
8920 
8921   MAKE_CANDIDATE=""$CHECK_MAKE""
8922   DESCRIPTION="make in PATH"
8923   if test "x$MAKE_CANDIDATE" != x; then
8924     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8925 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8926     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8927     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8928     if test "x$IS_GNU_MAKE" = x; then
8929       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8930 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8931     else
8932       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8933       if test "x$IS_MODERN_MAKE" = x; then
8934         { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
8935 $as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
8936       else
8937         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8938           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8939             MAKE_EXPECTED_ENV='cygwin'
8940           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8941             MAKE_EXPECTED_ENV='msys'
8942           else
8943             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8944           fi
8945           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8946           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8947         else
8948           # Not relevant for non-Windows
8949           IS_MAKE_CORRECT_ENV=true
8950         fi
8951         if test "x$IS_MAKE_CORRECT_ENV" = x; then
8952           { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&5
8953 $as_echo "$as_me: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&6;}
8954         else
8955           FOUND_MAKE=$MAKE_CANDIDATE
8956 
8957   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8958 
8959   # First separate the path from the arguments. This will split at the first
8960   # space.
8961   complete="$FOUND_MAKE"
8962   path="${complete%% *}"
8963   tmp="$complete EOL"
8964   arguments="${tmp#* }"
8965 
8966   # Input might be given as Windows format, start by converting to
8967   # unix format.
8968   new_path=`$CYGPATH -u "$path"`
8969 
8970   # Now try to locate executable using which
8971   new_path=`$WHICH "$new_path" 2> /dev/null`
8972   # bat and cmd files are not always considered executable in cygwin causing which
8973   # to not find them
8974   if test "x$new_path" = x \
8975            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8976            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8977     new_path=`$CYGPATH -u "$path"`
8978   fi
8979   if test "x$new_path" = x; then
8980     # Oops. Which didn't find the executable.
8981     # The splitting of arguments from the executable at a space might have been incorrect,
8982     # since paths with space are more likely in Windows. Give it another try with the whole
8983     # argument.
8984     path="$complete"
8985     arguments="EOL"
8986     new_path=`$CYGPATH -u "$path"`
8987     new_path=`$WHICH "$new_path" 2> /dev/null`
8988     # bat and cmd files are not always considered executable in cygwin causing which
8989     # to not find them
8990     if test "x$new_path" = x \
8991              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8992              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8993       new_path=`$CYGPATH -u "$path"`
8994     fi
8995     if test "x$new_path" = x; then
8996       # It's still not found. Now this is an unrecoverable error.
8997       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8998 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8999       has_space=`$ECHO "$complete" | $GREP " "`
9000       if test "x$has_space" != x; then
9001         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9002 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9003       fi
9004       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9005     fi
9006   fi
9007 
9008   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9009   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9010   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9011   # "foo.exe" is OK but "foo" is an error.
9012   #
9013   # This test is therefore slightly more accurate than "test -f" to check for file precense.
9014   # It is also a way to make sure we got the proper file name for the real test later on.
9015   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9016   if test "x$test_shortpath" = x; then
9017     # Short path failed, file does not exist as specified.
9018     # Try adding .exe or .cmd
9019     if test -f "${new_path}.exe"; then
9020        input_to_shortpath="${new_path}.exe"
9021     elif test -f "${new_path}.cmd"; then
9022        input_to_shortpath="${new_path}.cmd"
9023     else
9024       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9025 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9026       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9027 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9028       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9029     fi
9030   else
9031     input_to_shortpath="$new_path"
9032   fi
9033 
9034   # Call helper function which possibly converts this using DOS-style short mode.
9035   # If so, the updated path is stored in $new_path.
9036   new_path="$input_to_shortpath"
9037 
9038   input_path="$input_to_shortpath"
9039   # Check if we need to convert this using DOS-style short mode. If the path
9040   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9041   # take no chances and rewrite it.
9042   # Note: m4 eats our [], so we need to use [ and ] instead.
9043   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9044   if test "x$has_forbidden_chars" != x; then
9045     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9046     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9047     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9048     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9049       # Going to short mode and back again did indeed matter. Since short mode is
9050       # case insensitive, let's make it lowercase to improve readability.
9051       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9052       # Now convert it back to Unix-stile (cygpath)
9053       input_path=`$CYGPATH -u "$shortmode_path"`
9054       new_path="$input_path"
9055     fi
9056   fi
9057 
9058   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9059   if test "x$test_cygdrive_prefix" = x; then
9060     # As a simple fix, exclude /usr/bin since it's not a real path.
9061     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9062       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9063       # a path prefixed by /cygdrive for fixpath to work.
9064       new_path="$CYGWIN_ROOT_PATH$input_path"
9065     fi
9066   fi
9067 
9068   # remove trailing .exe if any
9069   new_path="${new_path/%.exe/}"
9070 
9071   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9072 
9073   # First separate the path from the arguments. This will split at the first
9074   # space.
9075   complete="$FOUND_MAKE"
9076   path="${complete%% *}"
9077   tmp="$complete EOL"
9078   arguments="${tmp#* }"
9079 
9080   # Input might be given as Windows format, start by converting to
9081   # unix format.
9082   new_path="$path"
9083 
9084   windows_path="$new_path"
9085   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9086     unix_path=`$CYGPATH -u "$windows_path"`
9087     new_path="$unix_path"
9088   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9089     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9090     new_path="$unix_path"
9091   fi
9092 
9093 
9094   # Now try to locate executable using which
9095   new_path=`$WHICH "$new_path" 2> /dev/null`
9096 
9097   if test "x$new_path" = x; then
9098     # Oops. Which didn't find the executable.
9099     # The splitting of arguments from the executable at a space might have been incorrect,
9100     # since paths with space are more likely in Windows. Give it another try with the whole
9101     # argument.
9102     path="$complete"
9103     arguments="EOL"
9104     new_path="$path"
9105 
9106   windows_path="$new_path"
9107   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9108     unix_path=`$CYGPATH -u "$windows_path"`
9109     new_path="$unix_path"
9110   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9111     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9112     new_path="$unix_path"
9113   fi
9114 
9115 
9116     new_path=`$WHICH "$new_path" 2> /dev/null`
9117 
9118     if test "x$new_path" = x; then
9119       # It's still not found. Now this is an unrecoverable error.
9120       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9121 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9122       has_space=`$ECHO "$complete" | $GREP " "`
9123       if test "x$has_space" != x; then
9124         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9125 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9126       fi
9127       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9128     fi
9129   fi
9130 
9131   # Now new_path has a complete unix path to the binary
9132   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9133     # Keep paths in /bin as-is, but remove trailing .exe if any
9134     new_path="${new_path/%.exe/}"
9135     # Do not save /bin paths to all_fixpath_prefixes!
9136   else
9137     # Not in mixed or Windows style, start by that.
9138     new_path=`cmd //c echo $new_path`
9139 
9140   input_path="$new_path"
9141   # Check if we need to convert this using DOS-style short mode. If the path
9142   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9143   # take no chances and rewrite it.
9144   # Note: m4 eats our [], so we need to use [ and ] instead.
9145   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9146   if test "x$has_forbidden_chars" != x; then
9147     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9148     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9149   fi
9150 
9151     # Output is in $new_path
9152 
9153   windows_path="$new_path"
9154   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9155     unix_path=`$CYGPATH -u "$windows_path"`
9156     new_path="$unix_path"
9157   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9158     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9159     new_path="$unix_path"
9160   fi
9161 
9162     # remove trailing .exe if any
9163     new_path="${new_path/%.exe/}"
9164 
9165     # Save the first 10 bytes of this path to the storage, so fixpath can work.
9166     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9167   fi
9168 
9169   else
9170     # We're on a posix platform. Hooray! :)
9171     # First separate the path from the arguments. This will split at the first
9172     # space.
9173     complete="$FOUND_MAKE"
9174     path="${complete%% *}"
9175     tmp="$complete EOL"
9176     arguments="${tmp#* }"
9177 
9178     # Cannot rely on the command "which" here since it doesn't always work.
9179     is_absolute_path=`$ECHO "$path" | $GREP ^/`
9180     if test -z "$is_absolute_path"; then
9181       # Path to executable is not absolute. Find it.
9182       IFS_save="$IFS"
9183       IFS=:
9184       for p in $PATH; do
9185         if test -f "$p/$path" && test -x "$p/$path"; then
9186           new_path="$p/$path"
9187           break
9188         fi
9189       done
9190       IFS="$IFS_save"
9191     else
9192       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9193 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9194       new_path="$path"
9195     fi
9196 
9197     if test "x$new_path" = x; then
9198         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9199 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9200         has_space=`$ECHO "$complete" | $GREP " "`
9201         if test "x$has_space" != x; then
9202           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9203 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9204         fi
9205         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9206       fi
9207   fi
9208 
9209       # Now join together the path and the arguments once again
9210       if test "x$arguments" != xEOL; then
9211         new_complete="$new_path ${arguments% *}"
9212       else
9213         new_complete="$new_path"
9214       fi
9215 
9216   if test "x$complete" != "x$new_complete"; then
9217       FOUND_MAKE="$new_complete"
9218       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9219 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9220     fi
9221 
9222         fi
9223       fi
9224     fi
9225   fi
9226 
9227     fi
9228 
9229     if test "x$FOUND_MAKE" = x; then
9230       if test "x$TOOLS_DIR" != x; then
9231         # We have a tools-dir, check that as well before giving up.
9232         OLD_PATH=$PATH
9233         PATH=$TOOLS_DIR:$PATH
9234         for ac_prog in gmake
9235 do
9236   # Extract the first word of "$ac_prog", so it can be a program name with args.
9237 set dummy $ac_prog; ac_word=$2
9238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9239 $as_echo_n "checking for $ac_word... " >&6; }
9240 if test "${ac_cv_path_CHECK_TOOLSDIR_GMAKE+set}" = set; then :
9241   $as_echo_n "(cached) " >&6
9242 else
9243   case $CHECK_TOOLSDIR_GMAKE in
9244   [\\/]* | ?:[\\/]*)
9245   ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
9246   ;;
9247   *)
9248   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9249 for as_dir in $PATH
9250 do
9251   IFS=$as_save_IFS
9252   test -z "$as_dir" && as_dir=.
9253     for ac_exec_ext in '' $ac_executable_extensions; do
9254   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9255     ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
9256     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9257     break 2
9258   fi
9259 done
9260   done
9261 IFS=$as_save_IFS
9262 
9263   ;;
9264 esac
9265 fi
9266 CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
9267 if test -n "$CHECK_TOOLSDIR_GMAKE"; then
9268   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
9269 $as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
9270 else
9271   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9272 $as_echo "no" >&6; }
9273 fi
9274 
9275 
9276   test -n "$CHECK_TOOLSDIR_GMAKE" && break
9277 done
9278 
9279 
9280   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
9281   DESCRIPTION="gmake in tools-dir"
9282   if test "x$MAKE_CANDIDATE" != x; then
9283     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9284 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9285     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9286     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9287     if test "x$IS_GNU_MAKE" = x; then
9288       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9289 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9290     else
9291       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9292       if test "x$IS_MODERN_MAKE" = x; then
9293         { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
9294 $as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
9295       else
9296         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9297           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9298             MAKE_EXPECTED_ENV='cygwin'
9299           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9300             MAKE_EXPECTED_ENV='msys'
9301           else
9302             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9303           fi
9304           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9305           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9306         else
9307           # Not relevant for non-Windows
9308           IS_MAKE_CORRECT_ENV=true
9309         fi
9310         if test "x$IS_MAKE_CORRECT_ENV" = x; then
9311           { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&5
9312 $as_echo "$as_me: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&6;}
9313         else
9314           FOUND_MAKE=$MAKE_CANDIDATE
9315 
9316   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9317 
9318   # First separate the path from the arguments. This will split at the first
9319   # space.
9320   complete="$FOUND_MAKE"
9321   path="${complete%% *}"
9322   tmp="$complete EOL"
9323   arguments="${tmp#* }"
9324 
9325   # Input might be given as Windows format, start by converting to
9326   # unix format.
9327   new_path=`$CYGPATH -u "$path"`
9328 
9329   # Now try to locate executable using which
9330   new_path=`$WHICH "$new_path" 2> /dev/null`
9331   # bat and cmd files are not always considered executable in cygwin causing which
9332   # to not find them
9333   if test "x$new_path" = x \
9334            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9335            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9336     new_path=`$CYGPATH -u "$path"`
9337   fi
9338   if test "x$new_path" = x; then
9339     # Oops. Which didn't find the executable.
9340     # The splitting of arguments from the executable at a space might have been incorrect,
9341     # since paths with space are more likely in Windows. Give it another try with the whole
9342     # argument.
9343     path="$complete"
9344     arguments="EOL"
9345     new_path=`$CYGPATH -u "$path"`
9346     new_path=`$WHICH "$new_path" 2> /dev/null`
9347     # bat and cmd files are not always considered executable in cygwin causing which
9348     # to not find them
9349     if test "x$new_path" = x \
9350              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9351              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9352       new_path=`$CYGPATH -u "$path"`
9353     fi
9354     if test "x$new_path" = x; then
9355       # It's still not found. Now this is an unrecoverable error.
9356       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9357 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9358       has_space=`$ECHO "$complete" | $GREP " "`
9359       if test "x$has_space" != x; then
9360         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9361 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9362       fi
9363       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9364     fi
9365   fi
9366 
9367   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9368   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9369   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9370   # "foo.exe" is OK but "foo" is an error.
9371   #
9372   # This test is therefore slightly more accurate than "test -f" to check for file precense.
9373   # It is also a way to make sure we got the proper file name for the real test later on.
9374   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9375   if test "x$test_shortpath" = x; then
9376     # Short path failed, file does not exist as specified.
9377     # Try adding .exe or .cmd
9378     if test -f "${new_path}.exe"; then
9379        input_to_shortpath="${new_path}.exe"
9380     elif test -f "${new_path}.cmd"; then
9381        input_to_shortpath="${new_path}.cmd"
9382     else
9383       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9384 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9385       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9386 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9387       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9388     fi
9389   else
9390     input_to_shortpath="$new_path"
9391   fi
9392 
9393   # Call helper function which possibly converts this using DOS-style short mode.
9394   # If so, the updated path is stored in $new_path.
9395   new_path="$input_to_shortpath"
9396 
9397   input_path="$input_to_shortpath"
9398   # Check if we need to convert this using DOS-style short mode. If the path
9399   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9400   # take no chances and rewrite it.
9401   # Note: m4 eats our [], so we need to use [ and ] instead.
9402   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9403   if test "x$has_forbidden_chars" != x; then
9404     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9405     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9406     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9407     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9408       # Going to short mode and back again did indeed matter. Since short mode is
9409       # case insensitive, let's make it lowercase to improve readability.
9410       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9411       # Now convert it back to Unix-stile (cygpath)
9412       input_path=`$CYGPATH -u "$shortmode_path"`
9413       new_path="$input_path"
9414     fi
9415   fi
9416 
9417   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9418   if test "x$test_cygdrive_prefix" = x; then
9419     # As a simple fix, exclude /usr/bin since it's not a real path.
9420     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9421       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9422       # a path prefixed by /cygdrive for fixpath to work.
9423       new_path="$CYGWIN_ROOT_PATH$input_path"
9424     fi
9425   fi
9426 
9427   # remove trailing .exe if any
9428   new_path="${new_path/%.exe/}"
9429 
9430   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9431 
9432   # First separate the path from the arguments. This will split at the first
9433   # space.
9434   complete="$FOUND_MAKE"
9435   path="${complete%% *}"
9436   tmp="$complete EOL"
9437   arguments="${tmp#* }"
9438 
9439   # Input might be given as Windows format, start by converting to
9440   # unix format.
9441   new_path="$path"
9442 
9443   windows_path="$new_path"
9444   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9445     unix_path=`$CYGPATH -u "$windows_path"`
9446     new_path="$unix_path"
9447   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9448     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9449     new_path="$unix_path"
9450   fi
9451 
9452 
9453   # Now try to locate executable using which
9454   new_path=`$WHICH "$new_path" 2> /dev/null`
9455 
9456   if test "x$new_path" = x; then
9457     # Oops. Which didn't find the executable.
9458     # The splitting of arguments from the executable at a space might have been incorrect,
9459     # since paths with space are more likely in Windows. Give it another try with the whole
9460     # argument.
9461     path="$complete"
9462     arguments="EOL"
9463     new_path="$path"
9464 
9465   windows_path="$new_path"
9466   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9467     unix_path=`$CYGPATH -u "$windows_path"`
9468     new_path="$unix_path"
9469   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9470     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9471     new_path="$unix_path"
9472   fi
9473 
9474 
9475     new_path=`$WHICH "$new_path" 2> /dev/null`
9476 
9477     if test "x$new_path" = x; then
9478       # It's still not found. Now this is an unrecoverable error.
9479       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9480 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9481       has_space=`$ECHO "$complete" | $GREP " "`
9482       if test "x$has_space" != x; then
9483         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9484 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9485       fi
9486       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9487     fi
9488   fi
9489 
9490   # Now new_path has a complete unix path to the binary
9491   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9492     # Keep paths in /bin as-is, but remove trailing .exe if any
9493     new_path="${new_path/%.exe/}"
9494     # Do not save /bin paths to all_fixpath_prefixes!
9495   else
9496     # Not in mixed or Windows style, start by that.
9497     new_path=`cmd //c echo $new_path`
9498 
9499   input_path="$new_path"
9500   # Check if we need to convert this using DOS-style short mode. If the path
9501   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9502   # take no chances and rewrite it.
9503   # Note: m4 eats our [], so we need to use [ and ] instead.
9504   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9505   if test "x$has_forbidden_chars" != x; then
9506     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9507     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9508   fi
9509 
9510     # Output is in $new_path
9511 
9512   windows_path="$new_path"
9513   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9514     unix_path=`$CYGPATH -u "$windows_path"`
9515     new_path="$unix_path"
9516   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9517     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9518     new_path="$unix_path"
9519   fi
9520 
9521     # remove trailing .exe if any
9522     new_path="${new_path/%.exe/}"
9523 
9524     # Save the first 10 bytes of this path to the storage, so fixpath can work.
9525     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9526   fi
9527 
9528   else
9529     # We're on a posix platform. Hooray! :)
9530     # First separate the path from the arguments. This will split at the first
9531     # space.
9532     complete="$FOUND_MAKE"
9533     path="${complete%% *}"
9534     tmp="$complete EOL"
9535     arguments="${tmp#* }"
9536 
9537     # Cannot rely on the command "which" here since it doesn't always work.
9538     is_absolute_path=`$ECHO "$path" | $GREP ^/`
9539     if test -z "$is_absolute_path"; then
9540       # Path to executable is not absolute. Find it.
9541       IFS_save="$IFS"
9542       IFS=:
9543       for p in $PATH; do
9544         if test -f "$p/$path" && test -x "$p/$path"; then
9545           new_path="$p/$path"
9546           break
9547         fi
9548       done
9549       IFS="$IFS_save"
9550     else
9551       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9552 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9553       new_path="$path"
9554     fi
9555 
9556     if test "x$new_path" = x; then
9557         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9558 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9559         has_space=`$ECHO "$complete" | $GREP " "`
9560         if test "x$has_space" != x; then
9561           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9562 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9563         fi
9564         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9565       fi
9566   fi
9567 
9568       # Now join together the path and the arguments once again
9569       if test "x$arguments" != xEOL; then
9570         new_complete="$new_path ${arguments% *}"
9571       else
9572         new_complete="$new_path"
9573       fi
9574 
9575   if test "x$complete" != "x$new_complete"; then
9576       FOUND_MAKE="$new_complete"
9577       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9578 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9579     fi
9580 
9581         fi
9582       fi
9583     fi
9584   fi
9585 
9586         if test "x$FOUND_MAKE" = x; then
9587           for ac_prog in make
9588 do
9589   # Extract the first word of "$ac_prog", so it can be a program name with args.
9590 set dummy $ac_prog; ac_word=$2
9591 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9592 $as_echo_n "checking for $ac_word... " >&6; }
9593 if test "${ac_cv_path_CHECK_TOOLSDIR_MAKE+set}" = set; then :
9594   $as_echo_n "(cached) " >&6
9595 else
9596   case $CHECK_TOOLSDIR_MAKE in
9597   [\\/]* | ?:[\\/]*)
9598   ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
9599   ;;
9600   *)
9601   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9602 for as_dir in $PATH
9603 do
9604   IFS=$as_save_IFS
9605   test -z "$as_dir" && as_dir=.
9606     for ac_exec_ext in '' $ac_executable_extensions; do
9607   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9608     ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
9609     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9610     break 2
9611   fi
9612 done
9613   done
9614 IFS=$as_save_IFS
9615 
9616   ;;
9617 esac
9618 fi
9619 CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
9620 if test -n "$CHECK_TOOLSDIR_MAKE"; then
9621   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
9622 $as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
9623 else
9624   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9625 $as_echo "no" >&6; }
9626 fi
9627 
9628 
9629   test -n "$CHECK_TOOLSDIR_MAKE" && break
9630 done
9631 
9632 
9633   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
9634   DESCRIPTION="make in tools-dir"
9635   if test "x$MAKE_CANDIDATE" != x; then
9636     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9637 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9638     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9639     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9640     if test "x$IS_GNU_MAKE" = x; then
9641       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9642 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9643     else
9644       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9645       if test "x$IS_MODERN_MAKE" = x; then
9646         { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
9647 $as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
9648       else
9649         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9650           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9651             MAKE_EXPECTED_ENV='cygwin'
9652           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9653             MAKE_EXPECTED_ENV='msys'
9654           else
9655             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9656           fi
9657           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9658           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9659         else
9660           # Not relevant for non-Windows
9661           IS_MAKE_CORRECT_ENV=true
9662         fi
9663         if test "x$IS_MAKE_CORRECT_ENV" = x; then
9664           { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&5
9665 $as_echo "$as_me: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&6;}
9666         else
9667           FOUND_MAKE=$MAKE_CANDIDATE
9668 
9669   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9670 
9671   # First separate the path from the arguments. This will split at the first
9672   # space.
9673   complete="$FOUND_MAKE"
9674   path="${complete%% *}"
9675   tmp="$complete EOL"
9676   arguments="${tmp#* }"
9677 
9678   # Input might be given as Windows format, start by converting to
9679   # unix format.
9680   new_path=`$CYGPATH -u "$path"`
9681 
9682   # Now try to locate executable using which
9683   new_path=`$WHICH "$new_path" 2> /dev/null`
9684   # bat and cmd files are not always considered executable in cygwin causing which
9685   # to not find them
9686   if test "x$new_path" = x \
9687            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9688            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9689     new_path=`$CYGPATH -u "$path"`
9690   fi
9691   if test "x$new_path" = x; then
9692     # Oops. Which didn't find the executable.
9693     # The splitting of arguments from the executable at a space might have been incorrect,
9694     # since paths with space are more likely in Windows. Give it another try with the whole
9695     # argument.
9696     path="$complete"
9697     arguments="EOL"
9698     new_path=`$CYGPATH -u "$path"`
9699     new_path=`$WHICH "$new_path" 2> /dev/null`
9700     # bat and cmd files are not always considered executable in cygwin causing which
9701     # to not find them
9702     if test "x$new_path" = x \
9703              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9704              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9705       new_path=`$CYGPATH -u "$path"`
9706     fi
9707     if test "x$new_path" = x; then
9708       # It's still not found. Now this is an unrecoverable error.
9709       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9710 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9711       has_space=`$ECHO "$complete" | $GREP " "`
9712       if test "x$has_space" != x; then
9713         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9714 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9715       fi
9716       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9717     fi
9718   fi
9719 
9720   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9721   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9722   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9723   # "foo.exe" is OK but "foo" is an error.
9724   #
9725   # This test is therefore slightly more accurate than "test -f" to check for file precense.
9726   # It is also a way to make sure we got the proper file name for the real test later on.
9727   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9728   if test "x$test_shortpath" = x; then
9729     # Short path failed, file does not exist as specified.
9730     # Try adding .exe or .cmd
9731     if test -f "${new_path}.exe"; then
9732        input_to_shortpath="${new_path}.exe"
9733     elif test -f "${new_path}.cmd"; then
9734        input_to_shortpath="${new_path}.cmd"
9735     else
9736       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9737 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9738       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9739 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9740       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9741     fi
9742   else
9743     input_to_shortpath="$new_path"
9744   fi
9745 
9746   # Call helper function which possibly converts this using DOS-style short mode.
9747   # If so, the updated path is stored in $new_path.
9748   new_path="$input_to_shortpath"
9749 
9750   input_path="$input_to_shortpath"
9751   # Check if we need to convert this using DOS-style short mode. If the path
9752   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9753   # take no chances and rewrite it.
9754   # Note: m4 eats our [], so we need to use [ and ] instead.
9755   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9756   if test "x$has_forbidden_chars" != x; then
9757     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9758     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9759     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9760     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9761       # Going to short mode and back again did indeed matter. Since short mode is
9762       # case insensitive, let's make it lowercase to improve readability.
9763       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9764       # Now convert it back to Unix-stile (cygpath)
9765       input_path=`$CYGPATH -u "$shortmode_path"`
9766       new_path="$input_path"
9767     fi
9768   fi
9769 
9770   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9771   if test "x$test_cygdrive_prefix" = x; then
9772     # As a simple fix, exclude /usr/bin since it's not a real path.
9773     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9774       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9775       # a path prefixed by /cygdrive for fixpath to work.
9776       new_path="$CYGWIN_ROOT_PATH$input_path"
9777     fi
9778   fi
9779 
9780   # remove trailing .exe if any
9781   new_path="${new_path/%.exe/}"
9782 
9783   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9784 
9785   # First separate the path from the arguments. This will split at the first
9786   # space.
9787   complete="$FOUND_MAKE"
9788   path="${complete%% *}"
9789   tmp="$complete EOL"
9790   arguments="${tmp#* }"
9791 
9792   # Input might be given as Windows format, start by converting to
9793   # unix format.
9794   new_path="$path"
9795 
9796   windows_path="$new_path"
9797   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9798     unix_path=`$CYGPATH -u "$windows_path"`
9799     new_path="$unix_path"
9800   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9801     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9802     new_path="$unix_path"
9803   fi
9804 
9805 
9806   # Now try to locate executable using which
9807   new_path=`$WHICH "$new_path" 2> /dev/null`
9808 
9809   if test "x$new_path" = x; then
9810     # Oops. Which didn't find the executable.
9811     # The splitting of arguments from the executable at a space might have been incorrect,
9812     # since paths with space are more likely in Windows. Give it another try with the whole
9813     # argument.
9814     path="$complete"
9815     arguments="EOL"
9816     new_path="$path"
9817 
9818   windows_path="$new_path"
9819   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9820     unix_path=`$CYGPATH -u "$windows_path"`
9821     new_path="$unix_path"
9822   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9823     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9824     new_path="$unix_path"
9825   fi
9826 
9827 
9828     new_path=`$WHICH "$new_path" 2> /dev/null`
9829 
9830     if test "x$new_path" = x; then
9831       # It's still not found. Now this is an unrecoverable error.
9832       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9833 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9834       has_space=`$ECHO "$complete" | $GREP " "`
9835       if test "x$has_space" != x; then
9836         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9837 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9838       fi
9839       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9840     fi
9841   fi
9842 
9843   # Now new_path has a complete unix path to the binary
9844   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9845     # Keep paths in /bin as-is, but remove trailing .exe if any
9846     new_path="${new_path/%.exe/}"
9847     # Do not save /bin paths to all_fixpath_prefixes!
9848   else
9849     # Not in mixed or Windows style, start by that.
9850     new_path=`cmd //c echo $new_path`
9851 
9852   input_path="$new_path"
9853   # Check if we need to convert this using DOS-style short mode. If the path
9854   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9855   # take no chances and rewrite it.
9856   # Note: m4 eats our [], so we need to use [ and ] instead.
9857   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9858   if test "x$has_forbidden_chars" != x; then
9859     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9860     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9861   fi
9862 
9863     # Output is in $new_path
9864 
9865   windows_path="$new_path"
9866   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9867     unix_path=`$CYGPATH -u "$windows_path"`
9868     new_path="$unix_path"
9869   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9870     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9871     new_path="$unix_path"
9872   fi
9873 
9874     # remove trailing .exe if any
9875     new_path="${new_path/%.exe/}"
9876 
9877     # Save the first 10 bytes of this path to the storage, so fixpath can work.
9878     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9879   fi
9880 
9881   else
9882     # We're on a posix platform. Hooray! :)
9883     # First separate the path from the arguments. This will split at the first
9884     # space.
9885     complete="$FOUND_MAKE"
9886     path="${complete%% *}"
9887     tmp="$complete EOL"
9888     arguments="${tmp#* }"
9889 
9890     # Cannot rely on the command "which" here since it doesn't always work.
9891     is_absolute_path=`$ECHO "$path" | $GREP ^/`
9892     if test -z "$is_absolute_path"; then
9893       # Path to executable is not absolute. Find it.
9894       IFS_save="$IFS"
9895       IFS=:
9896       for p in $PATH; do
9897         if test -f "$p/$path" && test -x "$p/$path"; then
9898           new_path="$p/$path"
9899           break
9900         fi
9901       done
9902       IFS="$IFS_save"
9903     else
9904       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9905 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9906       new_path="$path"
9907     fi
9908 
9909     if test "x$new_path" = x; then
9910         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9911 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9912         has_space=`$ECHO "$complete" | $GREP " "`
9913         if test "x$has_space" != x; then
9914           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9915 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9916         fi
9917         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9918       fi
9919   fi
9920 
9921       # Now join together the path and the arguments once again
9922       if test "x$arguments" != xEOL; then
9923         new_complete="$new_path ${arguments% *}"
9924       else
9925         new_complete="$new_path"
9926       fi
9927 
9928   if test "x$complete" != "x$new_complete"; then
9929       FOUND_MAKE="$new_complete"
9930       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9931 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9932     fi
9933 
9934         fi
9935       fi
9936     fi
9937   fi
9938 
9939         fi
9940         PATH=$OLD_PATH
9941       fi
9942     fi
9943 
9944     if test "x$FOUND_MAKE" = x; then
9945       as_fn_error $? "Cannot find GNU make 3.81 or newer! Please put it in the path, or add e.g. MAKE=/opt/gmake3.81/make as argument to configure." "$LINENO" 5
9946     fi
9947   fi
9948 
9949   MAKE=$FOUND_MAKE
9950 
9951   { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
9952 $as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
9953 
9954 
9955 
9956     # Test if find supports -delete
9957     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
9958 $as_echo_n "checking if find supports -delete... " >&6; }
9959     FIND_DELETE="-delete"
9960 
9961     DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
9962 
9963     echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
9964 
9965     TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
9966     if test -f $DELETEDIR/TestIfFindSupportsDelete; then
9967         # No, it does not.
9968         rm $DELETEDIR/TestIfFindSupportsDelete
9969         FIND_DELETE="-exec rm \{\} \+"
9970         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9971 $as_echo "no" >&6; }
9972     else
9973         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9974 $as_echo "yes" >&6; }
9975     fi
9976     rmdir $DELETEDIR
9977 
9978 
9979 
9980 # These tools might not be installed by default,
9981 # need hint on how to install them.
9982 
9983     for ac_prog in unzip
9984 do
9985   # Extract the first word of "$ac_prog", so it can be a program name with args.
9986 set dummy $ac_prog; ac_word=$2
9987 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9988 $as_echo_n "checking for $ac_word... " >&6; }
9989 if test "${ac_cv_path_UNZIP+set}" = set; then :
9990   $as_echo_n "(cached) " >&6
9991 else
9992   case $UNZIP in
9993   [\\/]* | ?:[\\/]*)
9994   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
9995   ;;
9996   *)
9997   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9998 for as_dir in $PATH
9999 do
10000   IFS=$as_save_IFS
10001   test -z "$as_dir" && as_dir=.
10002     for ac_exec_ext in '' $ac_executable_extensions; do
10003   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10004     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
10005     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10006     break 2
10007   fi
10008 done
10009   done
10010 IFS=$as_save_IFS
10011 
10012   ;;
10013 esac
10014 fi
10015 UNZIP=$ac_cv_path_UNZIP
10016 if test -n "$UNZIP"; then
10017   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
10018 $as_echo "$UNZIP" >&6; }
10019 else
10020   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10021 $as_echo "no" >&6; }
10022 fi
10023 
10024 
10025   test -n "$UNZIP" && break
10026 done
10027 
10028 
10029     if test "x$UNZIP" = x; then
10030         if test "xunzip" = x; then
10031           PROG_NAME=unzip
10032         else
10033           PROG_NAME=unzip
10034         fi
10035         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10036 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10037         as_fn_error $? "Cannot continue" "$LINENO" 5
10038     fi
10039 
10040 
10041 
10042     for ac_prog in zip
10043 do
10044   # Extract the first word of "$ac_prog", so it can be a program name with args.
10045 set dummy $ac_prog; ac_word=$2
10046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10047 $as_echo_n "checking for $ac_word... " >&6; }
10048 if test "${ac_cv_path_ZIP+set}" = set; then :
10049   $as_echo_n "(cached) " >&6
10050 else
10051   case $ZIP in
10052   [\\/]* | ?:[\\/]*)
10053   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
10054   ;;
10055   *)
10056   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10057 for as_dir in $PATH
10058 do
10059   IFS=$as_save_IFS
10060   test -z "$as_dir" && as_dir=.
10061     for ac_exec_ext in '' $ac_executable_extensions; do
10062   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10063     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
10064     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10065     break 2
10066   fi
10067 done
10068   done
10069 IFS=$as_save_IFS
10070 
10071   ;;
10072 esac
10073 fi
10074 ZIP=$ac_cv_path_ZIP
10075 if test -n "$ZIP"; then
10076   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
10077 $as_echo "$ZIP" >&6; }
10078 else
10079   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10080 $as_echo "no" >&6; }
10081 fi
10082 
10083 
10084   test -n "$ZIP" && break
10085 done
10086 
10087 
10088     if test "x$ZIP" = x; then
10089         if test "xzip" = x; then
10090           PROG_NAME=zip
10091         else
10092           PROG_NAME=zip
10093         fi
10094         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10095 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10096         as_fn_error $? "Cannot continue" "$LINENO" 5
10097     fi
10098 
10099 
10100 
10101 # Non-required basic tools
10102 
10103 # Extract the first word of "ldd", so it can be a program name with args.
10104 set dummy ldd; ac_word=$2
10105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10106 $as_echo_n "checking for $ac_word... " >&6; }
10107 if test "${ac_cv_path_LDD+set}" = set; then :
10108   $as_echo_n "(cached) " >&6
10109 else
10110   case $LDD in
10111   [\\/]* | ?:[\\/]*)
10112   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
10113   ;;
10114   *)
10115   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10116 for as_dir in $PATH
10117 do
10118   IFS=$as_save_IFS
10119   test -z "$as_dir" && as_dir=.
10120     for ac_exec_ext in '' $ac_executable_extensions; do
10121   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10122     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
10123     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10124     break 2
10125   fi
10126 done
10127   done
10128 IFS=$as_save_IFS
10129 
10130   ;;
10131 esac
10132 fi
10133 LDD=$ac_cv_path_LDD
10134 if test -n "$LDD"; then
10135   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
10136 $as_echo "$LDD" >&6; }
10137 else
10138   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10139 $as_echo "no" >&6; }
10140 fi
10141 
10142 
10143 if test "x$LDD" = "x"; then
10144     # List shared lib dependencies is used for
10145     # debug output and checking for forbidden dependencies.
10146     # We can build without it.
10147     LDD="true"
10148 fi
10149 # Extract the first word of "otool", so it can be a program name with args.
10150 set dummy otool; ac_word=$2
10151 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10152 $as_echo_n "checking for $ac_word... " >&6; }
10153 if test "${ac_cv_path_OTOOL+set}" = set; then :
10154   $as_echo_n "(cached) " >&6
10155 else
10156   case $OTOOL in
10157   [\\/]* | ?:[\\/]*)
10158   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
10159   ;;
10160   *)
10161   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10162 for as_dir in $PATH
10163 do
10164   IFS=$as_save_IFS
10165   test -z "$as_dir" && as_dir=.
10166     for ac_exec_ext in '' $ac_executable_extensions; do
10167   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10168     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
10169     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10170     break 2
10171   fi
10172 done
10173   done
10174 IFS=$as_save_IFS
10175 
10176   ;;
10177 esac
10178 fi
10179 OTOOL=$ac_cv_path_OTOOL
10180 if test -n "$OTOOL"; then
10181   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
10182 $as_echo "$OTOOL" >&6; }
10183 else
10184   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10185 $as_echo "no" >&6; }
10186 fi
10187 
10188 
10189 if test "x$OTOOL" = "x"; then
10190    OTOOL="true"
10191 fi
10192 for ac_prog in readelf greadelf
10193 do
10194   # Extract the first word of "$ac_prog", so it can be a program name with args.
10195 set dummy $ac_prog; ac_word=$2
10196 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10197 $as_echo_n "checking for $ac_word... " >&6; }
10198 if test "${ac_cv_path_READELF+set}" = set; then :
10199   $as_echo_n "(cached) " >&6
10200 else
10201   case $READELF in
10202   [\\/]* | ?:[\\/]*)
10203   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
10204   ;;
10205   *)
10206   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10207 for as_dir in $PATH
10208 do
10209   IFS=$as_save_IFS
10210   test -z "$as_dir" && as_dir=.
10211     for ac_exec_ext in '' $ac_executable_extensions; do
10212   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10213     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
10214     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10215     break 2
10216   fi
10217 done
10218   done
10219 IFS=$as_save_IFS
10220 
10221   ;;
10222 esac
10223 fi
10224 READELF=$ac_cv_path_READELF
10225 if test -n "$READELF"; then
10226   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
10227 $as_echo "$READELF" >&6; }
10228 else
10229   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10230 $as_echo "no" >&6; }
10231 fi
10232 
10233 
10234   test -n "$READELF" && break
10235 done
10236 
10237 # Extract the first word of "hg", so it can be a program name with args.
10238 set dummy hg; ac_word=$2
10239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10240 $as_echo_n "checking for $ac_word... " >&6; }
10241 if test "${ac_cv_path_HG+set}" = set; then :
10242   $as_echo_n "(cached) " >&6
10243 else
10244   case $HG in
10245   [\\/]* | ?:[\\/]*)
10246   ac_cv_path_HG="$HG" # Let the user override the test with a path.
10247   ;;
10248   *)
10249   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10250 for as_dir in $PATH
10251 do
10252   IFS=$as_save_IFS
10253   test -z "$as_dir" && as_dir=.
10254     for ac_exec_ext in '' $ac_executable_extensions; do
10255   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10256     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
10257     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10258     break 2
10259   fi
10260 done
10261   done
10262 IFS=$as_save_IFS
10263 
10264   ;;
10265 esac
10266 fi
10267 HG=$ac_cv_path_HG
10268 if test -n "$HG"; then
10269   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
10270 $as_echo "$HG" >&6; }
10271 else
10272   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10273 $as_echo "no" >&6; }
10274 fi
10275 
10276 
10277 # Extract the first word of "stat", so it can be a program name with args.
10278 set dummy stat; ac_word=$2
10279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10280 $as_echo_n "checking for $ac_word... " >&6; }
10281 if test "${ac_cv_path_STAT+set}" = set; then :
10282   $as_echo_n "(cached) " >&6
10283 else
10284   case $STAT in
10285   [\\/]* | ?:[\\/]*)
10286   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
10287   ;;
10288   *)
10289   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10290 for as_dir in $PATH
10291 do
10292   IFS=$as_save_IFS
10293   test -z "$as_dir" && as_dir=.
10294     for ac_exec_ext in '' $ac_executable_extensions; do
10295   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10296     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
10297     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10298     break 2
10299   fi
10300 done
10301   done
10302 IFS=$as_save_IFS
10303 
10304   ;;
10305 esac
10306 fi
10307 STAT=$ac_cv_path_STAT
10308 if test -n "$STAT"; then
10309   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
10310 $as_echo "$STAT" >&6; }
10311 else
10312   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10313 $as_echo "no" >&6; }
10314 fi
10315 
10316 
10317 # Extract the first word of "time", so it can be a program name with args.
10318 set dummy time; ac_word=$2
10319 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10320 $as_echo_n "checking for $ac_word... " >&6; }
10321 if test "${ac_cv_path_TIME+set}" = set; then :
10322   $as_echo_n "(cached) " >&6
10323 else
10324   case $TIME in
10325   [\\/]* | ?:[\\/]*)
10326   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
10327   ;;
10328   *)
10329   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10330 for as_dir in $PATH
10331 do
10332   IFS=$as_save_IFS
10333   test -z "$as_dir" && as_dir=.
10334     for ac_exec_ext in '' $ac_executable_extensions; do
10335   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10336     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
10337     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10338     break 2
10339   fi
10340 done
10341   done
10342 IFS=$as_save_IFS
10343 
10344   ;;
10345 esac
10346 fi
10347 TIME=$ac_cv_path_TIME
10348 if test -n "$TIME"; then
10349   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
10350 $as_echo "$TIME" >&6; }
10351 else
10352   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10353 $as_echo "no" >&6; }
10354 fi
10355 
10356 
10357 
10358 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
10359 
10360     for ac_prog in comm
10361 do
10362   # Extract the first word of "$ac_prog", so it can be a program name with args.
10363 set dummy $ac_prog; ac_word=$2
10364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10365 $as_echo_n "checking for $ac_word... " >&6; }
10366 if test "${ac_cv_path_COMM+set}" = set; then :
10367   $as_echo_n "(cached) " >&6
10368 else
10369   case $COMM in
10370   [\\/]* | ?:[\\/]*)
10371   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
10372   ;;
10373   *)
10374   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10375 for as_dir in $PATH
10376 do
10377   IFS=$as_save_IFS
10378   test -z "$as_dir" && as_dir=.
10379     for ac_exec_ext in '' $ac_executable_extensions; do
10380   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10381     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
10382     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10383     break 2
10384   fi
10385 done
10386   done
10387 IFS=$as_save_IFS
10388 
10389   ;;
10390 esac
10391 fi
10392 COMM=$ac_cv_path_COMM
10393 if test -n "$COMM"; then
10394   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
10395 $as_echo "$COMM" >&6; }
10396 else
10397   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10398 $as_echo "no" >&6; }
10399 fi
10400 
10401 
10402   test -n "$COMM" && break
10403 done
10404 
10405 
10406     if test "x$COMM" = x; then
10407         if test "xcomm" = x; then
10408           PROG_NAME=comm
10409         else
10410           PROG_NAME=comm
10411         fi
10412         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10413 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10414         as_fn_error $? "Cannot continue" "$LINENO" 5
10415     fi
10416 
10417 
10418 fi
10419 
10420 if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
10421 
10422     for ac_prog in xattr
10423 do
10424   # Extract the first word of "$ac_prog", so it can be a program name with args.
10425 set dummy $ac_prog; ac_word=$2
10426 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10427 $as_echo_n "checking for $ac_word... " >&6; }
10428 if test "${ac_cv_path_XATTR+set}" = set; then :
10429   $as_echo_n "(cached) " >&6
10430 else
10431   case $XATTR in
10432   [\\/]* | ?:[\\/]*)
10433   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
10434   ;;
10435   *)
10436   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10437 for as_dir in $PATH
10438 do
10439   IFS=$as_save_IFS
10440   test -z "$as_dir" && as_dir=.
10441     for ac_exec_ext in '' $ac_executable_extensions; do
10442   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10443     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
10444     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10445     break 2
10446   fi
10447 done
10448   done
10449 IFS=$as_save_IFS
10450 
10451   ;;
10452 esac
10453 fi
10454 XATTR=$ac_cv_path_XATTR
10455 if test -n "$XATTR"; then
10456   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
10457 $as_echo "$XATTR" >&6; }
10458 else
10459   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10460 $as_echo "no" >&6; }
10461 fi
10462 
10463 
10464   test -n "$XATTR" && break
10465 done
10466 
10467 
10468     if test "x$XATTR" = x; then
10469         if test "xxattr" = x; then
10470           PROG_NAME=xattr
10471         else
10472           PROG_NAME=xattr
10473         fi
10474         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10475 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10476         as_fn_error $? "Cannot continue" "$LINENO" 5
10477     fi
10478 
10479 
10480 fi
10481 
10482 
10483 # Check if pkg-config is available.
10484 
10485 
10486 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10487         if test -n "$ac_tool_prefix"; then
10488   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10489 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10490 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10491 $as_echo_n "checking for $ac_word... " >&6; }
10492 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
10493   $as_echo_n "(cached) " >&6
10494 else
10495   case $PKG_CONFIG in
10496   [\\/]* | ?:[\\/]*)
10497   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10498   ;;
10499   *)
10500   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10501 for as_dir in $PATH
10502 do
10503   IFS=$as_save_IFS
10504   test -z "$as_dir" && as_dir=.
10505     for ac_exec_ext in '' $ac_executable_extensions; do
10506   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10507     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10508     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10509     break 2
10510   fi
10511 done
10512   done
10513 IFS=$as_save_IFS
10514 
10515   ;;
10516 esac
10517 fi
10518 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10519 if test -n "$PKG_CONFIG"; then
10520   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10521 $as_echo "$PKG_CONFIG" >&6; }
10522 else
10523   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10524 $as_echo "no" >&6; }
10525 fi
10526 
10527 
10528 fi
10529 if test -z "$ac_cv_path_PKG_CONFIG"; then
10530   ac_pt_PKG_CONFIG=$PKG_CONFIG
10531   # Extract the first word of "pkg-config", so it can be a program name with args.
10532 set dummy pkg-config; ac_word=$2
10533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10534 $as_echo_n "checking for $ac_word... " >&6; }
10535 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
10536   $as_echo_n "(cached) " >&6
10537 else
10538   case $ac_pt_PKG_CONFIG in
10539   [\\/]* | ?:[\\/]*)
10540   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10541   ;;
10542   *)
10543   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10544 for as_dir in $PATH
10545 do
10546   IFS=$as_save_IFS
10547   test -z "$as_dir" && as_dir=.
10548     for ac_exec_ext in '' $ac_executable_extensions; do
10549   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10550     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10551     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10552     break 2
10553   fi
10554 done
10555   done
10556 IFS=$as_save_IFS
10557 
10558   ;;
10559 esac
10560 fi
10561 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10562 if test -n "$ac_pt_PKG_CONFIG"; then
10563   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10564 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
10565 else
10566   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10567 $as_echo "no" >&6; }
10568 fi
10569 
10570   if test "x$ac_pt_PKG_CONFIG" = x; then
10571     PKG_CONFIG=""
10572   else
10573     case $cross_compiling:$ac_tool_warned in
10574 yes:)
10575 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10576 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10577 ac_tool_warned=yes ;;
10578 esac
10579     PKG_CONFIG=$ac_pt_PKG_CONFIG
10580   fi
10581 else
10582   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10583 fi
10584 
10585 fi
10586 if test -n "$PKG_CONFIG"; then
10587         _pkg_min_version=0.9.0
10588         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10589 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10590         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10591                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10592 $as_echo "yes" >&6; }
10593         else
10594                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10595 $as_echo "no" >&6; }
10596                 PKG_CONFIG=""
10597         fi
10598 
10599 fi
10600 
10601 # After basic tools have been setup, we can check build os specific details.
10602 
10603 ###############################################################################
10604 
10605 # Note that this is the build platform OS version!
10606 
10607 OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
10608 OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
10609 OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
10610 OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
10611 
10612 
10613 
10614 
10615 
10616 # Setup builddeps, for automatic downloading of tools we need.
10617 # This is needed before we can call BDEPS_CHECK_MODULE, which is done in
10618 # boot-jdk setup, but we need to have basic tools setup first.
10619 
10620 
10621 # Check whether --with-builddeps-conf was given.
10622 if test "${with_builddeps_conf+set}" = set; then :
10623   withval=$with_builddeps_conf;
10624 fi
10625 
10626 
10627 
10628 # Check whether --with-builddeps-server was given.
10629 if test "${with_builddeps_server+set}" = set; then :
10630   withval=$with_builddeps_server;
10631 fi
10632 
10633 
10634 
10635 # Check whether --with-builddeps-dir was given.
10636 if test "${with_builddeps_dir+set}" = set; then :
10637   withval=$with_builddeps_dir;
10638 else
10639   with_builddeps_dir=/localhome/builddeps
10640 fi
10641 
10642 
10643 
10644 # Check whether --with-builddeps-group was given.
10645 if test "${with_builddeps_group+set}" = set; then :
10646   withval=$with_builddeps_group;
10647 fi
10648 
10649 
10650 
10651 
10652     if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10653         if test "x$with_builddeps_conf" != x; then
10654             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
10655 $as_echo_n "checking for supplied builddeps configuration file... " >&6; }
10656             builddepsfile=$with_builddeps_conf
10657             if test -s $builddepsfile; then
10658                 . $builddepsfile
10659                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
10660 $as_echo "loaded!" >&6; }
10661             else
10662                as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
10663            fi
10664         else
10665             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
10666 $as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
10667             builddepsfile=`mktemp`
10668             touch $builddepsfile
10669             # Put all found confs into a single file.
10670             find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
10671             # Source the file to acquire the variables
10672             if test -s $builddepsfile; then
10673                 . $builddepsfile
10674                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
10675 $as_echo "found at least one!" >&6; }
10676             else
10677                as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
10678            fi
10679         fi
10680         # Create build and target names that use _ instead of "-" and ".".
10681         # This is necessary to use them in variable names.
10682         build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10683         target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10684         # Extract rewrite information for build and target
10685         eval rewritten_build=\${REWRITE_${build_var}}
10686         if test "x$rewritten_build" = x; then
10687             rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
10688             echo Build stays the same $rewritten_build
10689         else
10690             echo Rewriting build for builddeps into $rewritten_build
10691         fi
10692         eval rewritten_target=\${REWRITE_${target_var}}
10693         if test "x$rewritten_target" = x; then
10694             rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
10695             echo Target stays the same $rewritten_target
10696         else
10697             echo Rewriting target for builddeps into $rewritten_target
10698         fi
10699         rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
10700         rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
10701     fi
10702     for ac_prog in 7z unzip
10703 do
10704   # Extract the first word of "$ac_prog", so it can be a program name with args.
10705 set dummy $ac_prog; ac_word=$2
10706 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10707 $as_echo_n "checking for $ac_word... " >&6; }
10708 if test "${ac_cv_prog_BDEPS_UNZIP+set}" = set; then :
10709   $as_echo_n "(cached) " >&6
10710 else
10711   if test -n "$BDEPS_UNZIP"; then
10712   ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
10713 else
10714 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10715 for as_dir in $PATH
10716 do
10717   IFS=$as_save_IFS
10718   test -z "$as_dir" && as_dir=.
10719     for ac_exec_ext in '' $ac_executable_extensions; do
10720   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10721     ac_cv_prog_BDEPS_UNZIP="$ac_prog"
10722     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10723     break 2
10724   fi
10725 done
10726   done
10727 IFS=$as_save_IFS
10728 
10729 fi
10730 fi
10731 BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
10732 if test -n "$BDEPS_UNZIP"; then
10733   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
10734 $as_echo "$BDEPS_UNZIP" >&6; }
10735 else
10736   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10737 $as_echo "no" >&6; }
10738 fi
10739 
10740 
10741   test -n "$BDEPS_UNZIP" && break
10742 done
10743 
10744     if test "x$BDEPS_UNZIP" = x7z; then
10745         BDEPS_UNZIP="7z x"
10746     fi
10747 
10748     for ac_prog in wget lftp ftp
10749 do
10750   # Extract the first word of "$ac_prog", so it can be a program name with args.
10751 set dummy $ac_prog; ac_word=$2
10752 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10753 $as_echo_n "checking for $ac_word... " >&6; }
10754 if test "${ac_cv_prog_BDEPS_FTP+set}" = set; then :
10755   $as_echo_n "(cached) " >&6
10756 else
10757   if test -n "$BDEPS_FTP"; then
10758   ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
10759 else
10760 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10761 for as_dir in $PATH
10762 do
10763   IFS=$as_save_IFS
10764   test -z "$as_dir" && as_dir=.
10765     for ac_exec_ext in '' $ac_executable_extensions; do
10766   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10767     ac_cv_prog_BDEPS_FTP="$ac_prog"
10768     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10769     break 2
10770   fi
10771 done
10772   done
10773 IFS=$as_save_IFS
10774 
10775 fi
10776 fi
10777 BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
10778 if test -n "$BDEPS_FTP"; then
10779   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
10780 $as_echo "$BDEPS_FTP" >&6; }
10781 else
10782   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10783 $as_echo "no" >&6; }
10784 fi
10785 
10786 
10787   test -n "$BDEPS_FTP" && break
10788 done
10789 
10790 
10791 
10792 ###############################################################################
10793 #
10794 # Determine OpenJDK variants, options and version numbers.
10795 #
10796 ###############################################################################
10797 
10798 # We need build & target for this.
10799 
10800 
10801 ###############################################################################
10802 #
10803 # Should we build a JDK/JVM with headful support (ie a graphical ui)?
10804 # We always build headless support.
10805 #
10806 { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
10807 $as_echo_n "checking headful support... " >&6; }
10808 # Check whether --enable-headful was given.
10809 if test "${enable_headful+set}" = set; then :
10810   enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
10811 else
10812   SUPPORT_HEADFUL=yes
10813 fi
10814 
10815 
10816 SUPPORT_HEADLESS=yes
10817 BUILD_HEADLESS="BUILD_HEADLESS:=true"
10818 
10819 if test "x$SUPPORT_HEADFUL" = xyes; then
10820     # We are building both headful and headless.
10821     headful_msg="inlude support for both headful and headless"
10822 fi
10823 
10824 if test "x$SUPPORT_HEADFUL" = xno; then
10825     # Thus we are building headless only.
10826     BUILD_HEADLESS="BUILD_HEADLESS:=true"
10827     headful_msg="headless only"
10828 fi
10829 
10830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
10831 $as_echo "$headful_msg" >&6; }
10832 
10833 
10834 
10835 
10836 
10837 # Control wether Hotspot runs Queens test after build.
10838 # Check whether --enable-hotspot-test-in-build was given.
10839 if test "${enable_hotspot_test_in_build+set}" = set; then :
10840   enableval=$enable_hotspot_test_in_build;
10841 else
10842   enable_hotspot_test_in_build=no
10843 fi
10844 
10845 if test "x$enable_hotspot_test_in_build" = "xyes"; then
10846     TEST_IN_BUILD=true
10847 else
10848     TEST_IN_BUILD=false
10849 fi
10850 
10851 
10852 ###############################################################################
10853 #
10854 # Choose cacerts source file
10855 #
10856 
10857 # Check whether --with-cacerts-file was given.
10858 if test "${with_cacerts_file+set}" = set; then :
10859   withval=$with_cacerts_file;
10860 fi
10861 
10862 if test "x$with_cacerts_file" != x; then
10863     CACERTS_FILE=$with_cacerts_file
10864 else
10865     if test "x$OPENJDK" = "xtrue"; then
10866         CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
10867     else
10868         CACERTS_FILE=${SRC_ROOT}/jdk/src/closed/share/lib/security/cacerts.internal
10869     fi
10870 fi
10871 
10872 
10873 ###############################################################################
10874 #
10875 # Enable or disable unlimited crypto
10876 #
10877 # Check whether --enable-unlimited-crypto was given.
10878 if test "${enable_unlimited_crypto+set}" = set; then :
10879   enableval=$enable_unlimited_crypto;
10880 else
10881   enable_unlimited_crypto=no
10882 fi
10883 
10884 if test "x$enable_unlimited_crypto" = "xyes"; then
10885     UNLIMITED_CRYPTO=true
10886 else
10887     UNLIMITED_CRYPTO=false
10888 fi
10889 
10890 
10891 ###############################################################################
10892 #
10893 # Enable or disable the elliptic curve crypto implementation
10894 #
10895 
10896 
10897 ###############################################################################
10898 #
10899 # Compress jars
10900 #
10901 COMPRESS_JARS=false
10902 
10903 
10904 
10905 
10906 # Source the version numbers
10907 . $AUTOCONF_DIR/version-numbers
10908 
10909 # Get the settings from parameters
10910 
10911 # Check whether --with-milestone was given.
10912 if test "${with_milestone+set}" = set; then :
10913   withval=$with_milestone;
10914 fi
10915 
10916 if test "x$with_milestone" = xyes; then
10917   as_fn_error $? "Milestone must have a value" "$LINENO" 5
10918 elif test "x$with_milestone" != x; then
10919     MILESTONE="$with_milestone"
10920 fi
10921 if test "x$MILESTONE" = x; then
10922   MILESTONE=internal
10923 fi
10924 
10925 
10926 # Check whether --with-build-number was given.
10927 if test "${with_build_number+set}" = set; then :
10928   withval=$with_build_number;
10929 fi
10930 
10931 if test "x$with_build_number" = xyes; then
10932   as_fn_error $? "Build number must have a value" "$LINENO" 5
10933 elif test "x$with_build_number" != x; then
10934   JDK_BUILD_NUMBER="$with_build_number"
10935 fi
10936 if test "x$JDK_BUILD_NUMBER" = x; then
10937   JDK_BUILD_NUMBER=b00
10938 fi
10939 
10940 
10941 # Check whether --with-user-release-suffix was given.
10942 if test "${with_user_release_suffix+set}" = set; then :
10943   withval=$with_user_release_suffix;
10944 fi
10945 
10946 if test "x$with_user_release_suffix" = xyes; then
10947   as_fn_error $? "Release suffix must have a value" "$LINENO" 5
10948 elif test "x$with_user_release_suffix" != x; then
10949   USER_RELEASE_SUFFIX="$with_user_release_suffix"
10950 else
10951   BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
10952   # Avoid [:alnum:] since it depends on the locale.
10953   CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
10954   USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10955 fi
10956 
10957 
10958 # Now set the JDK version, milestone, build number etc.
10959 
10960 
10961 
10962 
10963 
10964 
10965 
10966 
10967 
10968 
10969 
10970 
10971 
10972 
10973 COPYRIGHT_YEAR=`date +'%Y'`
10974 
10975 
10976 if test "x$JDK_UPDATE_VERSION" != x; then
10977   JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
10978 else
10979   JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
10980 fi
10981 
10982 
10983 COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
10984 
10985 
10986 
10987 ###############################################################################
10988 #
10989 # Setup BootJDK, used to bootstrap the build.
10990 #
10991 ###############################################################################
10992 
10993 
10994 BOOT_JDK_FOUND=no
10995 
10996 # Check whether --with-boot-jdk was given.
10997 if test "${with_boot_jdk+set}" = set; then :
10998   withval=$with_boot_jdk;
10999 fi
11000 
11001 
11002 # We look for the Boot JDK through various means, going from more certain to
11003 # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
11004 # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
11005 # must check if this is indeed valid; otherwise we'll continue looking.
11006 
11007 # Test: Is bootjdk explicitely set by command line arguments?
11008 
11009   if test "x$BOOT_JDK_FOUND" = xno; then
11010     # Now execute the test
11011 
11012 if test "x$with_boot_jdk" != x; then
11013     BOOT_JDK=$with_boot_jdk
11014     BOOT_JDK_FOUND=maybe
11015     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
11016 $as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
11017 fi
11018 
11019 
11020     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11021     if test "x$BOOT_JDK_FOUND" = xmaybe; then
11022       # Do we have a bin/java?
11023       if test ! -x "$BOOT_JDK/bin/java"; then
11024         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11025 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11026         BOOT_JDK_FOUND=no
11027       else
11028         # Do we have a bin/javac?
11029         if test ! -x "$BOOT_JDK/bin/javac"; then
11030           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11031 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11032           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11033 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11034           BOOT_JDK_FOUND=no
11035         else
11036           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11037           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11038             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11039 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11040             BOOT_JDK_FOUND=no
11041           else
11042             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11043             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11044 
11045             # Extra M4 quote needed to protect [] in grep expression.
11046             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11047             if test "x$FOUND_VERSION_78" = x; then
11048               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11049 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11050               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11051 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11052               BOOT_JDK_FOUND=no
11053             else
11054               # We're done! :-)
11055               BOOT_JDK_FOUND=yes
11056 
11057   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11058 
11059   # Input might be given as Windows format, start by converting to
11060   # unix format.
11061   path="$BOOT_JDK"
11062   new_path=`$CYGPATH -u "$path"`
11063 
11064   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11065   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11066   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11067   # "foo.exe" is OK but "foo" is an error.
11068   #
11069   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11070   # It is also a way to make sure we got the proper file name for the real test later on.
11071   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11072   if test "x$test_shortpath" = x; then
11073     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11074 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11075     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11076   fi
11077 
11078   # Call helper function which possibly converts this using DOS-style short mode.
11079   # If so, the updated path is stored in $new_path.
11080 
11081   input_path="$new_path"
11082   # Check if we need to convert this using DOS-style short mode. If the path
11083   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11084   # take no chances and rewrite it.
11085   # Note: m4 eats our [], so we need to use [ and ] instead.
11086   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11087   if test "x$has_forbidden_chars" != x; then
11088     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11089     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11090     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11091     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11092       # Going to short mode and back again did indeed matter. Since short mode is
11093       # case insensitive, let's make it lowercase to improve readability.
11094       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11095       # Now convert it back to Unix-stile (cygpath)
11096       input_path=`$CYGPATH -u "$shortmode_path"`
11097       new_path="$input_path"
11098     fi
11099   fi
11100 
11101   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11102   if test "x$test_cygdrive_prefix" = x; then
11103     # As a simple fix, exclude /usr/bin since it's not a real path.
11104     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11105       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11106       # a path prefixed by /cygdrive for fixpath to work.
11107       new_path="$CYGWIN_ROOT_PATH$input_path"
11108     fi
11109   fi
11110 
11111 
11112   if test "x$path" != "x$new_path"; then
11113     BOOT_JDK="$new_path"
11114     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11115 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11116   fi
11117 
11118   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11119 
11120   path="$BOOT_JDK"
11121   has_colon=`$ECHO $path | $GREP ^.:`
11122   new_path="$path"
11123   if test "x$has_colon" = x; then
11124     # Not in mixed or Windows style, start by that.
11125     new_path=`cmd //c echo $path`
11126   fi
11127 
11128 
11129   input_path="$new_path"
11130   # Check if we need to convert this using DOS-style short mode. If the path
11131   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11132   # take no chances and rewrite it.
11133   # Note: m4 eats our [], so we need to use [ and ] instead.
11134   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11135   if test "x$has_forbidden_chars" != x; then
11136     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11137     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11138   fi
11139 
11140 
11141   windows_path="$new_path"
11142   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11143     unix_path=`$CYGPATH -u "$windows_path"`
11144     new_path="$unix_path"
11145   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11146     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11147     new_path="$unix_path"
11148   fi
11149 
11150   if test "x$path" != "x$new_path"; then
11151     BOOT_JDK="$new_path"
11152     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11153 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11154   fi
11155 
11156   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11157   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11158 
11159   else
11160     # We're on a posix platform. Hooray! :)
11161     path="$BOOT_JDK"
11162 
11163     if test ! -f "$path" && test ! -d "$path"; then
11164       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11165     fi
11166 
11167     has_space=`$ECHO "$path" | $GREP " "`
11168     if test "x$has_space" != x; then
11169       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11170 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11171       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11172     fi
11173   fi
11174 
11175               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11176 $as_echo_n "checking for Boot JDK... " >&6; }
11177               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11178 $as_echo "$BOOT_JDK" >&6; }
11179               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11180 $as_echo_n "checking Boot JDK version... " >&6; }
11181               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11182               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11183 $as_echo "$BOOT_JDK_VERSION" >&6; }
11184             fi # end check jdk version
11185           fi # end check rt.jar
11186         fi # end check javac
11187       fi # end check java
11188     fi # end check boot jdk found
11189   fi
11190 
11191 if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
11192   # Having specified an argument which is incorrect will produce an instant failure;
11193   # we should not go on looking
11194   as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
11195 fi
11196 
11197 # Test: Is bootjdk available from builddeps?
11198 
11199   if test "x$BOOT_JDK_FOUND" = xno; then
11200     # Now execute the test
11201 
11202 
11203 
11204     if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
11205         # Source the builddeps file again, to make sure it uses the latest variables!
11206         . $builddepsfile
11207         # Look for a target and build machine specific resource!
11208         eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
11209         if test "x$resource" = x; then
11210             # Ok, lets instead look for a target specific resource
11211             eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
11212         fi
11213         if test "x$resource" = x; then
11214             # Ok, lets instead look for a build specific resource
11215             eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
11216         fi
11217         if test "x$resource" = x; then
11218             # Ok, lets instead look for a generic resource
11219             # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
11220             resource=${builddep_bootjdk}
11221         fi
11222         if test "x$resource" != x; then
11223             { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
11224 $as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
11225             # If the resource in the builddeps.conf file is an existing directory,
11226             # for example /java/linux/cups
11227             if test -d ${resource}; then
11228                depdir=${resource}
11229             else
11230 
11231 # bootjdk is for example mymodule
11232 # $resource is for example libs/general/libmymod_1_2_3.zip
11233 # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
11234 # $with_builddeps_dir is for example /localhome/builddeps
11235 # depdir is the name of the variable into which we store the depdir, eg MYMOD
11236 # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
11237 # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
11238     filename=`basename $resource`
11239     filebase=`echo $filename | sed 's/\.[^\.]*$//'`
11240     filebase=${filename%%.*}
11241     extension=${filename#*.}
11242     installdir=$with_builddeps_dir/$filebase
11243     if test ! -f $installdir/$filename.unpacked; then
11244         { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
11245 $as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
11246         if test ! -d $installdir; then
11247             mkdir -p $installdir
11248         fi
11249         if test ! -d $installdir; then
11250             as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
11251         fi
11252         tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
11253         touch $tmpfile
11254         if test ! -f $tmpfile; then
11255             as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
11256         fi
11257 
11258     # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
11259     # $tmpfile is the local file name for the downloaded file.
11260     VALID_TOOL=no
11261     if test "x$BDEPS_FTP" = xwget; then
11262        VALID_TOOL=yes
11263        wget -O $tmpfile $with_builddeps_server/$resource
11264     fi
11265     if test "x$BDEPS_FTP" = xlftp; then
11266        VALID_TOOL=yes
11267        lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
11268     fi
11269     if test "x$BDEPS_FTP" = xftp; then
11270         VALID_TOOL=yes
11271         FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
11272         FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
11273         FTPUSERPWD=${FTPSERVER%%@*}
11274         if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
11275             FTPUSER=${userpwd%%:*}
11276             FTPPWD=${userpwd#*@}
11277             FTPSERVER=${FTPSERVER#*@}
11278         else
11279             FTPUSER=ftp
11280             FTPPWD=ftp
11281         fi
11282         # the "pass" command does not work on some
11283         # ftp clients (read ftp.exe) but if it works,
11284         # passive mode is better!
11285         (\
11286             echo "user $FTPUSER $FTPPWD"        ;\
11287             echo "pass"                         ;\
11288             echo "bin"                          ;\
11289             echo "get $FTPPATH $tmpfile"              ;\
11290         ) | ftp -in $FTPSERVER
11291     fi
11292     if test "x$VALID_TOOL" != xyes; then
11293        as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
11294     fi
11295 
11296         mv $tmpfile $installdir/$filename
11297         if test ! -s $installdir/$filename; then
11298             as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
11299         fi
11300         case "$extension" in
11301             zip)  echo "Unzipping $installdir/$filename..."
11302                (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
11303             ;;
11304             tar.gz) echo "Untaring $installdir/$filename..."
11305                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11306             ;;
11307             tgz) echo "Untaring $installdir/$filename..."
11308                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11309             ;;
11310             *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
11311             ;;
11312         esac
11313     fi
11314     if test -f $installdir/$filename.unpacked; then
11315         depdir=$installdir
11316     fi
11317 
11318             fi
11319             # Source the builddeps file again, because in the previous command, the depdir
11320             # was updated to point at the current build dependency install directory.
11321             . $builddepsfile
11322             # Now extract variables from the builddeps.conf files.
11323             theroot=${builddep_bootjdk_ROOT}
11324             thecflags=${builddep_bootjdk_CFLAGS}
11325             thelibs=${builddep_bootjdk_LIBS}
11326             if test "x$depdir" = x; then
11327                 as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
11328             fi
11329             BOOT_JDK=$depdir
11330             if test "x$theroot" != x; then
11331                BOOT_JDK="$theroot"
11332             fi
11333             if test "x$thecflags" != x; then
11334                BOOT_JDK_CFLAGS="$thecflags"
11335             fi
11336             if test "x$thelibs" != x; then
11337                BOOT_JDK_LIBS="$thelibs"
11338             fi
11339             BOOT_JDK_FOUND=maybe
11340             else BOOT_JDK_FOUND=no
11341 
11342         fi
11343         else BOOT_JDK_FOUND=no
11344 
11345     fi
11346 
11347 
11348 
11349     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11350     if test "x$BOOT_JDK_FOUND" = xmaybe; then
11351       # Do we have a bin/java?
11352       if test ! -x "$BOOT_JDK/bin/java"; then
11353         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11354 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11355         BOOT_JDK_FOUND=no
11356       else
11357         # Do we have a bin/javac?
11358         if test ! -x "$BOOT_JDK/bin/javac"; then
11359           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11360 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11361           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11362 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11363           BOOT_JDK_FOUND=no
11364         else
11365           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11366           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11367             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11368 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11369             BOOT_JDK_FOUND=no
11370           else
11371             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11372             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11373 
11374             # Extra M4 quote needed to protect [] in grep expression.
11375             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11376             if test "x$FOUND_VERSION_78" = x; then
11377               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11378 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11379               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11380 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11381               BOOT_JDK_FOUND=no
11382             else
11383               # We're done! :-)
11384               BOOT_JDK_FOUND=yes
11385 
11386   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11387 
11388   # Input might be given as Windows format, start by converting to
11389   # unix format.
11390   path="$BOOT_JDK"
11391   new_path=`$CYGPATH -u "$path"`
11392 
11393   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11394   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11395   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11396   # "foo.exe" is OK but "foo" is an error.
11397   #
11398   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11399   # It is also a way to make sure we got the proper file name for the real test later on.
11400   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11401   if test "x$test_shortpath" = x; then
11402     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11403 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11404     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11405   fi
11406 
11407   # Call helper function which possibly converts this using DOS-style short mode.
11408   # If so, the updated path is stored in $new_path.
11409 
11410   input_path="$new_path"
11411   # Check if we need to convert this using DOS-style short mode. If the path
11412   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11413   # take no chances and rewrite it.
11414   # Note: m4 eats our [], so we need to use [ and ] instead.
11415   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11416   if test "x$has_forbidden_chars" != x; then
11417     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11418     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11419     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11420     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11421       # Going to short mode and back again did indeed matter. Since short mode is
11422       # case insensitive, let's make it lowercase to improve readability.
11423       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11424       # Now convert it back to Unix-stile (cygpath)
11425       input_path=`$CYGPATH -u "$shortmode_path"`
11426       new_path="$input_path"
11427     fi
11428   fi
11429 
11430   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11431   if test "x$test_cygdrive_prefix" = x; then
11432     # As a simple fix, exclude /usr/bin since it's not a real path.
11433     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11434       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11435       # a path prefixed by /cygdrive for fixpath to work.
11436       new_path="$CYGWIN_ROOT_PATH$input_path"
11437     fi
11438   fi
11439 
11440 
11441   if test "x$path" != "x$new_path"; then
11442     BOOT_JDK="$new_path"
11443     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11444 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11445   fi
11446 
11447   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11448 
11449   path="$BOOT_JDK"
11450   has_colon=`$ECHO $path | $GREP ^.:`
11451   new_path="$path"
11452   if test "x$has_colon" = x; then
11453     # Not in mixed or Windows style, start by that.
11454     new_path=`cmd //c echo $path`
11455   fi
11456 
11457 
11458   input_path="$new_path"
11459   # Check if we need to convert this using DOS-style short mode. If the path
11460   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11461   # take no chances and rewrite it.
11462   # Note: m4 eats our [], so we need to use [ and ] instead.
11463   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11464   if test "x$has_forbidden_chars" != x; then
11465     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11466     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11467   fi
11468 
11469 
11470   windows_path="$new_path"
11471   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11472     unix_path=`$CYGPATH -u "$windows_path"`
11473     new_path="$unix_path"
11474   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11475     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11476     new_path="$unix_path"
11477   fi
11478 
11479   if test "x$path" != "x$new_path"; then
11480     BOOT_JDK="$new_path"
11481     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11482 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11483   fi
11484 
11485   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11486   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11487 
11488   else
11489     # We're on a posix platform. Hooray! :)
11490     path="$BOOT_JDK"
11491 
11492     if test ! -f "$path" && test ! -d "$path"; then
11493       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11494     fi
11495 
11496     has_space=`$ECHO "$path" | $GREP " "`
11497     if test "x$has_space" != x; then
11498       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11499 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11500       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11501     fi
11502   fi
11503 
11504               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11505 $as_echo_n "checking for Boot JDK... " >&6; }
11506               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11507 $as_echo "$BOOT_JDK" >&6; }
11508               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11509 $as_echo_n "checking Boot JDK version... " >&6; }
11510               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11511               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11512 $as_echo "$BOOT_JDK_VERSION" >&6; }
11513             fi # end check jdk version
11514           fi # end check rt.jar
11515         fi # end check javac
11516       fi # end check java
11517     fi # end check boot jdk found
11518   fi
11519 
11520 
11521 # Test: Is $JAVA_HOME set?
11522 
11523   if test "x$BOOT_JDK_FOUND" = xno; then
11524     # Now execute the test
11525 
11526     if test "x$JAVA_HOME" != x; then
11527         JAVA_HOME_PROCESSED="$JAVA_HOME"
11528 
11529   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11530 
11531   # Input might be given as Windows format, start by converting to
11532   # unix format.
11533   path="$JAVA_HOME_PROCESSED"
11534   new_path=`$CYGPATH -u "$path"`
11535 
11536   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11537   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11538   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11539   # "foo.exe" is OK but "foo" is an error.
11540   #
11541   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11542   # It is also a way to make sure we got the proper file name for the real test later on.
11543   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11544   if test "x$test_shortpath" = x; then
11545     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11546 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11547     as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
11548   fi
11549 
11550   # Call helper function which possibly converts this using DOS-style short mode.
11551   # If so, the updated path is stored in $new_path.
11552 
11553   input_path="$new_path"
11554   # Check if we need to convert this using DOS-style short mode. If the path
11555   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11556   # take no chances and rewrite it.
11557   # Note: m4 eats our [], so we need to use [ and ] instead.
11558   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11559   if test "x$has_forbidden_chars" != x; then
11560     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11561     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11562     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11563     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11564       # Going to short mode and back again did indeed matter. Since short mode is
11565       # case insensitive, let's make it lowercase to improve readability.
11566       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11567       # Now convert it back to Unix-stile (cygpath)
11568       input_path=`$CYGPATH -u "$shortmode_path"`
11569       new_path="$input_path"
11570     fi
11571   fi
11572 
11573   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11574   if test "x$test_cygdrive_prefix" = x; then
11575     # As a simple fix, exclude /usr/bin since it's not a real path.
11576     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11577       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11578       # a path prefixed by /cygdrive for fixpath to work.
11579       new_path="$CYGWIN_ROOT_PATH$input_path"
11580     fi
11581   fi
11582 
11583 
11584   if test "x$path" != "x$new_path"; then
11585     JAVA_HOME_PROCESSED="$new_path"
11586     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11587 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11588   fi
11589 
11590   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11591 
11592   path="$JAVA_HOME_PROCESSED"
11593   has_colon=`$ECHO $path | $GREP ^.:`
11594   new_path="$path"
11595   if test "x$has_colon" = x; then
11596     # Not in mixed or Windows style, start by that.
11597     new_path=`cmd //c echo $path`
11598   fi
11599 
11600 
11601   input_path="$new_path"
11602   # Check if we need to convert this using DOS-style short mode. If the path
11603   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11604   # take no chances and rewrite it.
11605   # Note: m4 eats our [], so we need to use [ and ] instead.
11606   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11607   if test "x$has_forbidden_chars" != x; then
11608     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11609     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11610   fi
11611 
11612 
11613   windows_path="$new_path"
11614   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11615     unix_path=`$CYGPATH -u "$windows_path"`
11616     new_path="$unix_path"
11617   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11618     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11619     new_path="$unix_path"
11620   fi
11621 
11622   if test "x$path" != "x$new_path"; then
11623     JAVA_HOME_PROCESSED="$new_path"
11624     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11625 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11626   fi
11627 
11628   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11629   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11630 
11631   else
11632     # We're on a posix platform. Hooray! :)
11633     path="$JAVA_HOME_PROCESSED"
11634 
11635     if test ! -f "$path" && test ! -d "$path"; then
11636       as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
11637     fi
11638 
11639     has_space=`$ECHO "$path" | $GREP " "`
11640     if test "x$has_space" != x; then
11641       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11642 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11643       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11644     fi
11645   fi
11646 
11647         if test ! -d "$JAVA_HOME_PROCESSED"; then
11648             { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
11649 $as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
11650         else
11651           # Aha, the user has set a JAVA_HOME
11652           # let us use that as the Boot JDK.
11653           BOOT_JDK="$JAVA_HOME_PROCESSED"
11654           BOOT_JDK_FOUND=maybe
11655           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
11656 $as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
11657         fi
11658     fi
11659 
11660 
11661     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11662     if test "x$BOOT_JDK_FOUND" = xmaybe; then
11663       # Do we have a bin/java?
11664       if test ! -x "$BOOT_JDK/bin/java"; then
11665         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11666 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11667         BOOT_JDK_FOUND=no
11668       else
11669         # Do we have a bin/javac?
11670         if test ! -x "$BOOT_JDK/bin/javac"; then
11671           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11672 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11673           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11674 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11675           BOOT_JDK_FOUND=no
11676         else
11677           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11678           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11679             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11680 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11681             BOOT_JDK_FOUND=no
11682           else
11683             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11684             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11685 
11686             # Extra M4 quote needed to protect [] in grep expression.
11687             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11688             if test "x$FOUND_VERSION_78" = x; then
11689               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11690 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11691               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11692 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11693               BOOT_JDK_FOUND=no
11694             else
11695               # We're done! :-)
11696               BOOT_JDK_FOUND=yes
11697 
11698   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11699 
11700   # Input might be given as Windows format, start by converting to
11701   # unix format.
11702   path="$BOOT_JDK"
11703   new_path=`$CYGPATH -u "$path"`
11704 
11705   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11706   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11707   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11708   # "foo.exe" is OK but "foo" is an error.
11709   #
11710   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11711   # It is also a way to make sure we got the proper file name for the real test later on.
11712   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11713   if test "x$test_shortpath" = x; then
11714     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11715 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11716     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11717   fi
11718 
11719   # Call helper function which possibly converts this using DOS-style short mode.
11720   # If so, the updated path is stored in $new_path.
11721 
11722   input_path="$new_path"
11723   # Check if we need to convert this using DOS-style short mode. If the path
11724   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11725   # take no chances and rewrite it.
11726   # Note: m4 eats our [], so we need to use [ and ] instead.
11727   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11728   if test "x$has_forbidden_chars" != x; then
11729     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11730     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11731     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11732     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11733       # Going to short mode and back again did indeed matter. Since short mode is
11734       # case insensitive, let's make it lowercase to improve readability.
11735       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11736       # Now convert it back to Unix-stile (cygpath)
11737       input_path=`$CYGPATH -u "$shortmode_path"`
11738       new_path="$input_path"
11739     fi
11740   fi
11741 
11742   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11743   if test "x$test_cygdrive_prefix" = x; then
11744     # As a simple fix, exclude /usr/bin since it's not a real path.
11745     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11746       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11747       # a path prefixed by /cygdrive for fixpath to work.
11748       new_path="$CYGWIN_ROOT_PATH$input_path"
11749     fi
11750   fi
11751 
11752 
11753   if test "x$path" != "x$new_path"; then
11754     BOOT_JDK="$new_path"
11755     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11756 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11757   fi
11758 
11759   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11760 
11761   path="$BOOT_JDK"
11762   has_colon=`$ECHO $path | $GREP ^.:`
11763   new_path="$path"
11764   if test "x$has_colon" = x; then
11765     # Not in mixed or Windows style, start by that.
11766     new_path=`cmd //c echo $path`
11767   fi
11768 
11769 
11770   input_path="$new_path"
11771   # Check if we need to convert this using DOS-style short mode. If the path
11772   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11773   # take no chances and rewrite it.
11774   # Note: m4 eats our [], so we need to use [ and ] instead.
11775   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11776   if test "x$has_forbidden_chars" != x; then
11777     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11778     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11779   fi
11780 
11781 
11782   windows_path="$new_path"
11783   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11784     unix_path=`$CYGPATH -u "$windows_path"`
11785     new_path="$unix_path"
11786   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11787     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11788     new_path="$unix_path"
11789   fi
11790 
11791   if test "x$path" != "x$new_path"; then
11792     BOOT_JDK="$new_path"
11793     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11794 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11795   fi
11796 
11797   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11798   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11799 
11800   else
11801     # We're on a posix platform. Hooray! :)
11802     path="$BOOT_JDK"
11803 
11804     if test ! -f "$path" && test ! -d "$path"; then
11805       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11806     fi
11807 
11808     has_space=`$ECHO "$path" | $GREP " "`
11809     if test "x$has_space" != x; then
11810       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11811 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11812       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11813     fi
11814   fi
11815 
11816               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11817 $as_echo_n "checking for Boot JDK... " >&6; }
11818               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11819 $as_echo "$BOOT_JDK" >&6; }
11820               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11821 $as_echo_n "checking Boot JDK version... " >&6; }
11822               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11823               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11824 $as_echo "$BOOT_JDK_VERSION" >&6; }
11825             fi # end check jdk version
11826           fi # end check rt.jar
11827         fi # end check javac
11828       fi # end check java
11829     fi # end check boot jdk found
11830   fi
11831 
11832 
11833 # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
11834 
11835   if test "x$BOOT_JDK_FOUND" = xno; then
11836     # Now execute the test
11837 
11838     if test -x /usr/libexec/java_home; then
11839         BOOT_JDK=`/usr/libexec/java_home`
11840         BOOT_JDK_FOUND=maybe
11841         { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
11842 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
11843     fi
11844 
11845 
11846     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11847     if test "x$BOOT_JDK_FOUND" = xmaybe; then
11848       # Do we have a bin/java?
11849       if test ! -x "$BOOT_JDK/bin/java"; then
11850         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11851 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11852         BOOT_JDK_FOUND=no
11853       else
11854         # Do we have a bin/javac?
11855         if test ! -x "$BOOT_JDK/bin/javac"; then
11856           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11857 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11858           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11859 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11860           BOOT_JDK_FOUND=no
11861         else
11862           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11863           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11864             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11865 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11866             BOOT_JDK_FOUND=no
11867           else
11868             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11869             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11870 
11871             # Extra M4 quote needed to protect [] in grep expression.
11872             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11873             if test "x$FOUND_VERSION_78" = x; then
11874               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11875 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11876               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11877 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11878               BOOT_JDK_FOUND=no
11879             else
11880               # We're done! :-)
11881               BOOT_JDK_FOUND=yes
11882 
11883   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11884 
11885   # Input might be given as Windows format, start by converting to
11886   # unix format.
11887   path="$BOOT_JDK"
11888   new_path=`$CYGPATH -u "$path"`
11889 
11890   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11891   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11892   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11893   # "foo.exe" is OK but "foo" is an error.
11894   #
11895   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11896   # It is also a way to make sure we got the proper file name for the real test later on.
11897   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11898   if test "x$test_shortpath" = x; then
11899     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11900 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11901     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11902   fi
11903 
11904   # Call helper function which possibly converts this using DOS-style short mode.
11905   # If so, the updated path is stored in $new_path.
11906 
11907   input_path="$new_path"
11908   # Check if we need to convert this using DOS-style short mode. If the path
11909   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11910   # take no chances and rewrite it.
11911   # Note: m4 eats our [], so we need to use [ and ] instead.
11912   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11913   if test "x$has_forbidden_chars" != x; then
11914     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11915     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11916     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11917     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11918       # Going to short mode and back again did indeed matter. Since short mode is
11919       # case insensitive, let's make it lowercase to improve readability.
11920       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11921       # Now convert it back to Unix-stile (cygpath)
11922       input_path=`$CYGPATH -u "$shortmode_path"`
11923       new_path="$input_path"
11924     fi
11925   fi
11926 
11927   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11928   if test "x$test_cygdrive_prefix" = x; then
11929     # As a simple fix, exclude /usr/bin since it's not a real path.
11930     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11931       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11932       # a path prefixed by /cygdrive for fixpath to work.
11933       new_path="$CYGWIN_ROOT_PATH$input_path"
11934     fi
11935   fi
11936 
11937 
11938   if test "x$path" != "x$new_path"; then
11939     BOOT_JDK="$new_path"
11940     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11941 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11942   fi
11943 
11944   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11945 
11946   path="$BOOT_JDK"
11947   has_colon=`$ECHO $path | $GREP ^.:`
11948   new_path="$path"
11949   if test "x$has_colon" = x; then
11950     # Not in mixed or Windows style, start by that.
11951     new_path=`cmd //c echo $path`
11952   fi
11953 
11954 
11955   input_path="$new_path"
11956   # Check if we need to convert this using DOS-style short mode. If the path
11957   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11958   # take no chances and rewrite it.
11959   # Note: m4 eats our [], so we need to use [ and ] instead.
11960   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11961   if test "x$has_forbidden_chars" != x; then
11962     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11963     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11964   fi
11965 
11966 
11967   windows_path="$new_path"
11968   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11969     unix_path=`$CYGPATH -u "$windows_path"`
11970     new_path="$unix_path"
11971   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11972     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11973     new_path="$unix_path"
11974   fi
11975 
11976   if test "x$path" != "x$new_path"; then
11977     BOOT_JDK="$new_path"
11978     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11979 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11980   fi
11981 
11982   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11983   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11984 
11985   else
11986     # We're on a posix platform. Hooray! :)
11987     path="$BOOT_JDK"
11988 
11989     if test ! -f "$path" && test ! -d "$path"; then
11990       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11991     fi
11992 
11993     has_space=`$ECHO "$path" | $GREP " "`
11994     if test "x$has_space" != x; then
11995       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11996 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11997       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11998     fi
11999   fi
12000 
12001               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12002 $as_echo_n "checking for Boot JDK... " >&6; }
12003               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12004 $as_echo "$BOOT_JDK" >&6; }
12005               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12006 $as_echo_n "checking Boot JDK version... " >&6; }
12007               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12008               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12009 $as_echo "$BOOT_JDK_VERSION" >&6; }
12010             fi # end check jdk version
12011           fi # end check rt.jar
12012         fi # end check javac
12013       fi # end check java
12014     fi # end check boot jdk found
12015   fi
12016 
12017 
12018 # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
12019 
12020   if test "x$BOOT_JDK_FOUND" = xno; then
12021     # Now execute the test
12022 
12023     # Extract the first word of "javac", so it can be a program name with args.
12024 set dummy javac; ac_word=$2
12025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12026 $as_echo_n "checking for $ac_word... " >&6; }
12027 if test "${ac_cv_path_JAVAC_CHECK+set}" = set; then :
12028   $as_echo_n "(cached) " >&6
12029 else
12030   case $JAVAC_CHECK in
12031   [\\/]* | ?:[\\/]*)
12032   ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
12033   ;;
12034   *)
12035   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12036 for as_dir in $PATH
12037 do
12038   IFS=$as_save_IFS
12039   test -z "$as_dir" && as_dir=.
12040     for ac_exec_ext in '' $ac_executable_extensions; do
12041   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12042     ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
12043     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12044     break 2
12045   fi
12046 done
12047   done
12048 IFS=$as_save_IFS
12049 
12050   ;;
12051 esac
12052 fi
12053 JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
12054 if test -n "$JAVAC_CHECK"; then
12055   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
12056 $as_echo "$JAVAC_CHECK" >&6; }
12057 else
12058   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12059 $as_echo "no" >&6; }
12060 fi
12061 
12062 
12063     # Extract the first word of "java", so it can be a program name with args.
12064 set dummy java; ac_word=$2
12065 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12066 $as_echo_n "checking for $ac_word... " >&6; }
12067 if test "${ac_cv_path_JAVA_CHECK+set}" = set; then :
12068   $as_echo_n "(cached) " >&6
12069 else
12070   case $JAVA_CHECK in
12071   [\\/]* | ?:[\\/]*)
12072   ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
12073   ;;
12074   *)
12075   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12076 for as_dir in $PATH
12077 do
12078   IFS=$as_save_IFS
12079   test -z "$as_dir" && as_dir=.
12080     for ac_exec_ext in '' $ac_executable_extensions; do
12081   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12082     ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
12083     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12084     break 2
12085   fi
12086 done
12087   done
12088 IFS=$as_save_IFS
12089 
12090   ;;
12091 esac
12092 fi
12093 JAVA_CHECK=$ac_cv_path_JAVA_CHECK
12094 if test -n "$JAVA_CHECK"; then
12095   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
12096 $as_echo "$JAVA_CHECK" >&6; }
12097 else
12098   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12099 $as_echo "no" >&6; }
12100 fi
12101 
12102 
12103     BINARY="$JAVAC_CHECK"
12104     if test "x$JAVAC_CHECK" = x; then
12105         BINARY="$JAVA_CHECK"
12106     fi
12107     if test "x$BINARY" != x; then
12108         # So there is a java(c) binary, it might be part of a JDK.
12109         # Lets find the JDK/JRE directory by following symbolic links.
12110         # Linux/GNU systems often have links from /usr/bin/java to
12111         # /etc/alternatives/java to the real JDK binary.
12112 
12113     if test "x$OPENJDK_BUILD_OS" != xwindows; then
12114         # Follow a chain of symbolic links. Use readlink
12115         # where it exists, else fall back to horribly
12116         # complicated shell code.
12117         if test "x$READLINK_TESTED" != yes; then
12118             # On MacOSX there is a readlink tool with a different
12119             # purpose than the GNU readlink tool. Check the found readlink.
12120             ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
12121             if test "x$ISGNU" = x; then
12122                  # A readlink that we do not know how to use.
12123                  # Are there other non-GNU readlinks out there?
12124                  READLINK_TESTED=yes
12125                  READLINK=
12126             fi
12127         fi
12128 
12129         if test "x$READLINK" != x; then
12130             BINARY=`$READLINK -f $BINARY`
12131         else
12132             # Save the current directory for restoring afterwards
12133             STARTDIR=$PWD
12134             COUNTER=0
12135             sym_link_dir=`$DIRNAME $BINARY`
12136             sym_link_file=`$BASENAME $BINARY`
12137             # Use the system pwd and not the shell builtin to resolve directory symlinks
12138             cd $sym_link_dir
12139             cd `$THEPWDCMD`
12140             sym_link_dir=`$THEPWDCMD`
12141             # Resolve file symlinks
12142             while test $COUNTER -lt 20; do
12143                 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
12144                 if test "x$ISLINK" == x; then
12145                     # This is not a symbolic link! We are done!
12146                     break
12147                 fi
12148                 # Again resolve directory symlinks since the target of the just found
12149                 # link could be in a different directory
12150                 cd `$DIRNAME $ISLINK`
12151                 sym_link_dir=`$THEPWDCMD`
12152                 sym_link_file=`$BASENAME $ISLINK`
12153                 let COUNTER=COUNTER+1
12154             done
12155             cd $STARTDIR
12156             BINARY=$sym_link_dir/$sym_link_file
12157         fi
12158     fi
12159 
12160         BOOT_JDK=`dirname "$BINARY"`
12161         BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
12162         if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
12163             # Looks like we found ourselves an JDK
12164             BOOT_JDK_FOUND=maybe
12165             { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
12166 $as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
12167         fi
12168     fi
12169 
12170 
12171     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12172     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12173       # Do we have a bin/java?
12174       if test ! -x "$BOOT_JDK/bin/java"; then
12175         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12176 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12177         BOOT_JDK_FOUND=no
12178       else
12179         # Do we have a bin/javac?
12180         if test ! -x "$BOOT_JDK/bin/javac"; then
12181           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12182 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12183           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12184 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12185           BOOT_JDK_FOUND=no
12186         else
12187           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12188           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12189             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12190 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12191             BOOT_JDK_FOUND=no
12192           else
12193             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12194             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12195 
12196             # Extra M4 quote needed to protect [] in grep expression.
12197             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12198             if test "x$FOUND_VERSION_78" = x; then
12199               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12200 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12201               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12202 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12203               BOOT_JDK_FOUND=no
12204             else
12205               # We're done! :-)
12206               BOOT_JDK_FOUND=yes
12207 
12208   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12209 
12210   # Input might be given as Windows format, start by converting to
12211   # unix format.
12212   path="$BOOT_JDK"
12213   new_path=`$CYGPATH -u "$path"`
12214 
12215   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12216   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12217   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12218   # "foo.exe" is OK but "foo" is an error.
12219   #
12220   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12221   # It is also a way to make sure we got the proper file name for the real test later on.
12222   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12223   if test "x$test_shortpath" = x; then
12224     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12225 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12226     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12227   fi
12228 
12229   # Call helper function which possibly converts this using DOS-style short mode.
12230   # If so, the updated path is stored in $new_path.
12231 
12232   input_path="$new_path"
12233   # Check if we need to convert this using DOS-style short mode. If the path
12234   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12235   # take no chances and rewrite it.
12236   # Note: m4 eats our [], so we need to use [ and ] instead.
12237   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12238   if test "x$has_forbidden_chars" != x; then
12239     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12240     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12241     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12242     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12243       # Going to short mode and back again did indeed matter. Since short mode is
12244       # case insensitive, let's make it lowercase to improve readability.
12245       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12246       # Now convert it back to Unix-stile (cygpath)
12247       input_path=`$CYGPATH -u "$shortmode_path"`
12248       new_path="$input_path"
12249     fi
12250   fi
12251 
12252   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12253   if test "x$test_cygdrive_prefix" = x; then
12254     # As a simple fix, exclude /usr/bin since it's not a real path.
12255     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12256       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12257       # a path prefixed by /cygdrive for fixpath to work.
12258       new_path="$CYGWIN_ROOT_PATH$input_path"
12259     fi
12260   fi
12261 
12262 
12263   if test "x$path" != "x$new_path"; then
12264     BOOT_JDK="$new_path"
12265     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12266 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12267   fi
12268 
12269   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12270 
12271   path="$BOOT_JDK"
12272   has_colon=`$ECHO $path | $GREP ^.:`
12273   new_path="$path"
12274   if test "x$has_colon" = x; then
12275     # Not in mixed or Windows style, start by that.
12276     new_path=`cmd //c echo $path`
12277   fi
12278 
12279 
12280   input_path="$new_path"
12281   # Check if we need to convert this using DOS-style short mode. If the path
12282   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12283   # take no chances and rewrite it.
12284   # Note: m4 eats our [], so we need to use [ and ] instead.
12285   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12286   if test "x$has_forbidden_chars" != x; then
12287     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12288     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12289   fi
12290 
12291 
12292   windows_path="$new_path"
12293   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12294     unix_path=`$CYGPATH -u "$windows_path"`
12295     new_path="$unix_path"
12296   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12297     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12298     new_path="$unix_path"
12299   fi
12300 
12301   if test "x$path" != "x$new_path"; then
12302     BOOT_JDK="$new_path"
12303     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12304 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12305   fi
12306 
12307   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12308   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12309 
12310   else
12311     # We're on a posix platform. Hooray! :)
12312     path="$BOOT_JDK"
12313 
12314     if test ! -f "$path" && test ! -d "$path"; then
12315       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12316     fi
12317 
12318     has_space=`$ECHO "$path" | $GREP " "`
12319     if test "x$has_space" != x; then
12320       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12321 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12322       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12323     fi
12324   fi
12325 
12326               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12327 $as_echo_n "checking for Boot JDK... " >&6; }
12328               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12329 $as_echo "$BOOT_JDK" >&6; }
12330               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12331 $as_echo_n "checking Boot JDK version... " >&6; }
12332               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12333               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12334 $as_echo "$BOOT_JDK_VERSION" >&6; }
12335             fi # end check jdk version
12336           fi # end check rt.jar
12337         fi # end check javac
12338       fi # end check java
12339     fi # end check boot jdk found
12340   fi
12341 
12342 
12343 # Test: Is there a JDK installed in default, well-known locations?
12344 
12345   if test "x$BOOT_JDK_FOUND" = xno; then
12346     # Now execute the test
12347 
12348   if test "x$OPENJDK_TARGET_OS" = xwindows; then
12349 
12350   if test "x$BOOT_JDK_FOUND" = xno; then
12351     # Now execute the test
12352 
12353   if test "x$ProgramW6432" != x; then
12354     VIRTUAL_DIR="$ProgramW6432/Java"
12355 
12356   windows_path="$VIRTUAL_DIR"
12357   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12358     unix_path=`$CYGPATH -u "$windows_path"`
12359     VIRTUAL_DIR="$unix_path"
12360   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12361     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12362     VIRTUAL_DIR="$unix_path"
12363   fi
12364 
12365 
12366   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12367   BOOT_JDK_SUFFIX=""
12368   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12369   if test "x$ALL_JDKS_FOUND" != x; then
12370     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12371 
12372   if test "x$BOOT_JDK_FOUND" = xno; then
12373     # Now execute the test
12374 
12375         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12376         if test -d "$BOOT_JDK"; then
12377           BOOT_JDK_FOUND=maybe
12378           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12379 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12380         fi
12381 
12382 
12383     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12384     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12385       # Do we have a bin/java?
12386       if test ! -x "$BOOT_JDK/bin/java"; then
12387         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12388 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12389         BOOT_JDK_FOUND=no
12390       else
12391         # Do we have a bin/javac?
12392         if test ! -x "$BOOT_JDK/bin/javac"; then
12393           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12394 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12395           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12396 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12397           BOOT_JDK_FOUND=no
12398         else
12399           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12400           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12401             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12402 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12403             BOOT_JDK_FOUND=no
12404           else
12405             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12406             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12407 
12408             # Extra M4 quote needed to protect [] in grep expression.
12409             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12410             if test "x$FOUND_VERSION_78" = x; then
12411               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12412 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12413               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12414 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12415               BOOT_JDK_FOUND=no
12416             else
12417               # We're done! :-)
12418               BOOT_JDK_FOUND=yes
12419 
12420   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12421 
12422   # Input might be given as Windows format, start by converting to
12423   # unix format.
12424   path="$BOOT_JDK"
12425   new_path=`$CYGPATH -u "$path"`
12426 
12427   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12428   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12429   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12430   # "foo.exe" is OK but "foo" is an error.
12431   #
12432   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12433   # It is also a way to make sure we got the proper file name for the real test later on.
12434   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12435   if test "x$test_shortpath" = x; then
12436     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12437 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12438     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12439   fi
12440 
12441   # Call helper function which possibly converts this using DOS-style short mode.
12442   # If so, the updated path is stored in $new_path.
12443 
12444   input_path="$new_path"
12445   # Check if we need to convert this using DOS-style short mode. If the path
12446   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12447   # take no chances and rewrite it.
12448   # Note: m4 eats our [], so we need to use [ and ] instead.
12449   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12450   if test "x$has_forbidden_chars" != x; then
12451     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12452     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12453     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12454     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12455       # Going to short mode and back again did indeed matter. Since short mode is
12456       # case insensitive, let's make it lowercase to improve readability.
12457       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12458       # Now convert it back to Unix-stile (cygpath)
12459       input_path=`$CYGPATH -u "$shortmode_path"`
12460       new_path="$input_path"
12461     fi
12462   fi
12463 
12464   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12465   if test "x$test_cygdrive_prefix" = x; then
12466     # As a simple fix, exclude /usr/bin since it's not a real path.
12467     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12468       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12469       # a path prefixed by /cygdrive for fixpath to work.
12470       new_path="$CYGWIN_ROOT_PATH$input_path"
12471     fi
12472   fi
12473 
12474 
12475   if test "x$path" != "x$new_path"; then
12476     BOOT_JDK="$new_path"
12477     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12478 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12479   fi
12480 
12481   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12482 
12483   path="$BOOT_JDK"
12484   has_colon=`$ECHO $path | $GREP ^.:`
12485   new_path="$path"
12486   if test "x$has_colon" = x; then
12487     # Not in mixed or Windows style, start by that.
12488     new_path=`cmd //c echo $path`
12489   fi
12490 
12491 
12492   input_path="$new_path"
12493   # Check if we need to convert this using DOS-style short mode. If the path
12494   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12495   # take no chances and rewrite it.
12496   # Note: m4 eats our [], so we need to use [ and ] instead.
12497   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12498   if test "x$has_forbidden_chars" != x; then
12499     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12500     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12501   fi
12502 
12503 
12504   windows_path="$new_path"
12505   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12506     unix_path=`$CYGPATH -u "$windows_path"`
12507     new_path="$unix_path"
12508   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12509     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12510     new_path="$unix_path"
12511   fi
12512 
12513   if test "x$path" != "x$new_path"; then
12514     BOOT_JDK="$new_path"
12515     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12516 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12517   fi
12518 
12519   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12520   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12521 
12522   else
12523     # We're on a posix platform. Hooray! :)
12524     path="$BOOT_JDK"
12525 
12526     if test ! -f "$path" && test ! -d "$path"; then
12527       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12528     fi
12529 
12530     has_space=`$ECHO "$path" | $GREP " "`
12531     if test "x$has_space" != x; then
12532       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12533 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12534       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12535     fi
12536   fi
12537 
12538               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12539 $as_echo_n "checking for Boot JDK... " >&6; }
12540               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12541 $as_echo "$BOOT_JDK" >&6; }
12542               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12543 $as_echo_n "checking Boot JDK version... " >&6; }
12544               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12545               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12546 $as_echo "$BOOT_JDK_VERSION" >&6; }
12547             fi # end check jdk version
12548           fi # end check rt.jar
12549         fi # end check javac
12550       fi # end check java
12551     fi # end check boot jdk found
12552   fi
12553 
12554     done
12555   fi
12556 
12557   fi
12558 
12559 
12560     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12561     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12562       # Do we have a bin/java?
12563       if test ! -x "$BOOT_JDK/bin/java"; then
12564         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12565 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12566         BOOT_JDK_FOUND=no
12567       else
12568         # Do we have a bin/javac?
12569         if test ! -x "$BOOT_JDK/bin/javac"; then
12570           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12571 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12572           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12573 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12574           BOOT_JDK_FOUND=no
12575         else
12576           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12577           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12578             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12579 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12580             BOOT_JDK_FOUND=no
12581           else
12582             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12583             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12584 
12585             # Extra M4 quote needed to protect [] in grep expression.
12586             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12587             if test "x$FOUND_VERSION_78" = x; then
12588               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12589 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12590               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12591 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12592               BOOT_JDK_FOUND=no
12593             else
12594               # We're done! :-)
12595               BOOT_JDK_FOUND=yes
12596 
12597   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12598 
12599   # Input might be given as Windows format, start by converting to
12600   # unix format.
12601   path="$BOOT_JDK"
12602   new_path=`$CYGPATH -u "$path"`
12603 
12604   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12605   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12606   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12607   # "foo.exe" is OK but "foo" is an error.
12608   #
12609   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12610   # It is also a way to make sure we got the proper file name for the real test later on.
12611   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12612   if test "x$test_shortpath" = x; then
12613     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12614 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12615     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12616   fi
12617 
12618   # Call helper function which possibly converts this using DOS-style short mode.
12619   # If so, the updated path is stored in $new_path.
12620 
12621   input_path="$new_path"
12622   # Check if we need to convert this using DOS-style short mode. If the path
12623   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12624   # take no chances and rewrite it.
12625   # Note: m4 eats our [], so we need to use [ and ] instead.
12626   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12627   if test "x$has_forbidden_chars" != x; then
12628     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12629     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12630     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12631     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12632       # Going to short mode and back again did indeed matter. Since short mode is
12633       # case insensitive, let's make it lowercase to improve readability.
12634       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12635       # Now convert it back to Unix-stile (cygpath)
12636       input_path=`$CYGPATH -u "$shortmode_path"`
12637       new_path="$input_path"
12638     fi
12639   fi
12640 
12641   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12642   if test "x$test_cygdrive_prefix" = x; then
12643     # As a simple fix, exclude /usr/bin since it's not a real path.
12644     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12645       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12646       # a path prefixed by /cygdrive for fixpath to work.
12647       new_path="$CYGWIN_ROOT_PATH$input_path"
12648     fi
12649   fi
12650 
12651 
12652   if test "x$path" != "x$new_path"; then
12653     BOOT_JDK="$new_path"
12654     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12655 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12656   fi
12657 
12658   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12659 
12660   path="$BOOT_JDK"
12661   has_colon=`$ECHO $path | $GREP ^.:`
12662   new_path="$path"
12663   if test "x$has_colon" = x; then
12664     # Not in mixed or Windows style, start by that.
12665     new_path=`cmd //c echo $path`
12666   fi
12667 
12668 
12669   input_path="$new_path"
12670   # Check if we need to convert this using DOS-style short mode. If the path
12671   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12672   # take no chances and rewrite it.
12673   # Note: m4 eats our [], so we need to use [ and ] instead.
12674   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12675   if test "x$has_forbidden_chars" != x; then
12676     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12677     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12678   fi
12679 
12680 
12681   windows_path="$new_path"
12682   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12683     unix_path=`$CYGPATH -u "$windows_path"`
12684     new_path="$unix_path"
12685   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12686     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12687     new_path="$unix_path"
12688   fi
12689 
12690   if test "x$path" != "x$new_path"; then
12691     BOOT_JDK="$new_path"
12692     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12693 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12694   fi
12695 
12696   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12697   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12698 
12699   else
12700     # We're on a posix platform. Hooray! :)
12701     path="$BOOT_JDK"
12702 
12703     if test ! -f "$path" && test ! -d "$path"; then
12704       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12705     fi
12706 
12707     has_space=`$ECHO "$path" | $GREP " "`
12708     if test "x$has_space" != x; then
12709       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12710 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12711       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12712     fi
12713   fi
12714 
12715               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12716 $as_echo_n "checking for Boot JDK... " >&6; }
12717               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12718 $as_echo "$BOOT_JDK" >&6; }
12719               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12720 $as_echo_n "checking Boot JDK version... " >&6; }
12721               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12722               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12723 $as_echo "$BOOT_JDK_VERSION" >&6; }
12724             fi # end check jdk version
12725           fi # end check rt.jar
12726         fi # end check javac
12727       fi # end check java
12728     fi # end check boot jdk found
12729   fi
12730 
12731 
12732   if test "x$BOOT_JDK_FOUND" = xno; then
12733     # Now execute the test
12734 
12735   if test "x$PROGRAMW6432" != x; then
12736     VIRTUAL_DIR="$PROGRAMW6432/Java"
12737 
12738   windows_path="$VIRTUAL_DIR"
12739   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12740     unix_path=`$CYGPATH -u "$windows_path"`
12741     VIRTUAL_DIR="$unix_path"
12742   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12743     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12744     VIRTUAL_DIR="$unix_path"
12745   fi
12746 
12747 
12748   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12749   BOOT_JDK_SUFFIX=""
12750   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12751   if test "x$ALL_JDKS_FOUND" != x; then
12752     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12753 
12754   if test "x$BOOT_JDK_FOUND" = xno; then
12755     # Now execute the test
12756 
12757         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12758         if test -d "$BOOT_JDK"; then
12759           BOOT_JDK_FOUND=maybe
12760           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12761 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12762         fi
12763 
12764 
12765     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12766     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12767       # Do we have a bin/java?
12768       if test ! -x "$BOOT_JDK/bin/java"; then
12769         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12770 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12771         BOOT_JDK_FOUND=no
12772       else
12773         # Do we have a bin/javac?
12774         if test ! -x "$BOOT_JDK/bin/javac"; then
12775           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12776 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12777           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12778 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12779           BOOT_JDK_FOUND=no
12780         else
12781           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12782           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12783             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12784 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12785             BOOT_JDK_FOUND=no
12786           else
12787             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12788             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12789 
12790             # Extra M4 quote needed to protect [] in grep expression.
12791             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12792             if test "x$FOUND_VERSION_78" = x; then
12793               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12794 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12795               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12796 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12797               BOOT_JDK_FOUND=no
12798             else
12799               # We're done! :-)
12800               BOOT_JDK_FOUND=yes
12801 
12802   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12803 
12804   # Input might be given as Windows format, start by converting to
12805   # unix format.
12806   path="$BOOT_JDK"
12807   new_path=`$CYGPATH -u "$path"`
12808 
12809   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12810   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12811   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12812   # "foo.exe" is OK but "foo" is an error.
12813   #
12814   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12815   # It is also a way to make sure we got the proper file name for the real test later on.
12816   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12817   if test "x$test_shortpath" = x; then
12818     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12819 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12820     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12821   fi
12822 
12823   # Call helper function which possibly converts this using DOS-style short mode.
12824   # If so, the updated path is stored in $new_path.
12825 
12826   input_path="$new_path"
12827   # Check if we need to convert this using DOS-style short mode. If the path
12828   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12829   # take no chances and rewrite it.
12830   # Note: m4 eats our [], so we need to use [ and ] instead.
12831   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12832   if test "x$has_forbidden_chars" != x; then
12833     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12834     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12835     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12836     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12837       # Going to short mode and back again did indeed matter. Since short mode is
12838       # case insensitive, let's make it lowercase to improve readability.
12839       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12840       # Now convert it back to Unix-stile (cygpath)
12841       input_path=`$CYGPATH -u "$shortmode_path"`
12842       new_path="$input_path"
12843     fi
12844   fi
12845 
12846   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12847   if test "x$test_cygdrive_prefix" = x; then
12848     # As a simple fix, exclude /usr/bin since it's not a real path.
12849     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12850       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12851       # a path prefixed by /cygdrive for fixpath to work.
12852       new_path="$CYGWIN_ROOT_PATH$input_path"
12853     fi
12854   fi
12855 
12856 
12857   if test "x$path" != "x$new_path"; then
12858     BOOT_JDK="$new_path"
12859     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12860 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12861   fi
12862 
12863   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12864 
12865   path="$BOOT_JDK"
12866   has_colon=`$ECHO $path | $GREP ^.:`
12867   new_path="$path"
12868   if test "x$has_colon" = x; then
12869     # Not in mixed or Windows style, start by that.
12870     new_path=`cmd //c echo $path`
12871   fi
12872 
12873 
12874   input_path="$new_path"
12875   # Check if we need to convert this using DOS-style short mode. If the path
12876   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12877   # take no chances and rewrite it.
12878   # Note: m4 eats our [], so we need to use [ and ] instead.
12879   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12880   if test "x$has_forbidden_chars" != x; then
12881     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12882     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12883   fi
12884 
12885 
12886   windows_path="$new_path"
12887   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12888     unix_path=`$CYGPATH -u "$windows_path"`
12889     new_path="$unix_path"
12890   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12891     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12892     new_path="$unix_path"
12893   fi
12894 
12895   if test "x$path" != "x$new_path"; then
12896     BOOT_JDK="$new_path"
12897     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12898 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12899   fi
12900 
12901   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12902   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12903 
12904   else
12905     # We're on a posix platform. Hooray! :)
12906     path="$BOOT_JDK"
12907 
12908     if test ! -f "$path" && test ! -d "$path"; then
12909       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12910     fi
12911 
12912     has_space=`$ECHO "$path" | $GREP " "`
12913     if test "x$has_space" != x; then
12914       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12915 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12916       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12917     fi
12918   fi
12919 
12920               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12921 $as_echo_n "checking for Boot JDK... " >&6; }
12922               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12923 $as_echo "$BOOT_JDK" >&6; }
12924               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12925 $as_echo_n "checking Boot JDK version... " >&6; }
12926               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12927               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12928 $as_echo "$BOOT_JDK_VERSION" >&6; }
12929             fi # end check jdk version
12930           fi # end check rt.jar
12931         fi # end check javac
12932       fi # end check java
12933     fi # end check boot jdk found
12934   fi
12935 
12936     done
12937   fi
12938 
12939   fi
12940 
12941 
12942     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12943     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12944       # Do we have a bin/java?
12945       if test ! -x "$BOOT_JDK/bin/java"; then
12946         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12947 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12948         BOOT_JDK_FOUND=no
12949       else
12950         # Do we have a bin/javac?
12951         if test ! -x "$BOOT_JDK/bin/javac"; then
12952           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12953 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12954           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12955 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12956           BOOT_JDK_FOUND=no
12957         else
12958           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12959           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12960             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12961 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12962             BOOT_JDK_FOUND=no
12963           else
12964             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12965             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12966 
12967             # Extra M4 quote needed to protect [] in grep expression.
12968             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12969             if test "x$FOUND_VERSION_78" = x; then
12970               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12971 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12972               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12973 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12974               BOOT_JDK_FOUND=no
12975             else
12976               # We're done! :-)
12977               BOOT_JDK_FOUND=yes
12978 
12979   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12980 
12981   # Input might be given as Windows format, start by converting to
12982   # unix format.
12983   path="$BOOT_JDK"
12984   new_path=`$CYGPATH -u "$path"`
12985 
12986   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12987   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12988   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12989   # "foo.exe" is OK but "foo" is an error.
12990   #
12991   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12992   # It is also a way to make sure we got the proper file name for the real test later on.
12993   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12994   if test "x$test_shortpath" = x; then
12995     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12996 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12997     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12998   fi
12999 
13000   # Call helper function which possibly converts this using DOS-style short mode.
13001   # If so, the updated path is stored in $new_path.
13002 
13003   input_path="$new_path"
13004   # Check if we need to convert this using DOS-style short mode. If the path
13005   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13006   # take no chances and rewrite it.
13007   # Note: m4 eats our [], so we need to use [ and ] instead.
13008   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13009   if test "x$has_forbidden_chars" != x; then
13010     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13011     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13012     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13013     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13014       # Going to short mode and back again did indeed matter. Since short mode is
13015       # case insensitive, let's make it lowercase to improve readability.
13016       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13017       # Now convert it back to Unix-stile (cygpath)
13018       input_path=`$CYGPATH -u "$shortmode_path"`
13019       new_path="$input_path"
13020     fi
13021   fi
13022 
13023   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13024   if test "x$test_cygdrive_prefix" = x; then
13025     # As a simple fix, exclude /usr/bin since it's not a real path.
13026     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13027       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13028       # a path prefixed by /cygdrive for fixpath to work.
13029       new_path="$CYGWIN_ROOT_PATH$input_path"
13030     fi
13031   fi
13032 
13033 
13034   if test "x$path" != "x$new_path"; then
13035     BOOT_JDK="$new_path"
13036     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13037 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13038   fi
13039 
13040   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13041 
13042   path="$BOOT_JDK"
13043   has_colon=`$ECHO $path | $GREP ^.:`
13044   new_path="$path"
13045   if test "x$has_colon" = x; then
13046     # Not in mixed or Windows style, start by that.
13047     new_path=`cmd //c echo $path`
13048   fi
13049 
13050 
13051   input_path="$new_path"
13052   # Check if we need to convert this using DOS-style short mode. If the path
13053   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13054   # take no chances and rewrite it.
13055   # Note: m4 eats our [], so we need to use [ and ] instead.
13056   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13057   if test "x$has_forbidden_chars" != x; then
13058     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13059     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13060   fi
13061 
13062 
13063   windows_path="$new_path"
13064   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13065     unix_path=`$CYGPATH -u "$windows_path"`
13066     new_path="$unix_path"
13067   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13068     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13069     new_path="$unix_path"
13070   fi
13071 
13072   if test "x$path" != "x$new_path"; then
13073     BOOT_JDK="$new_path"
13074     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13075 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13076   fi
13077 
13078   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13079   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13080 
13081   else
13082     # We're on a posix platform. Hooray! :)
13083     path="$BOOT_JDK"
13084 
13085     if test ! -f "$path" && test ! -d "$path"; then
13086       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13087     fi
13088 
13089     has_space=`$ECHO "$path" | $GREP " "`
13090     if test "x$has_space" != x; then
13091       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13092 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13093       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13094     fi
13095   fi
13096 
13097               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13098 $as_echo_n "checking for Boot JDK... " >&6; }
13099               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13100 $as_echo "$BOOT_JDK" >&6; }
13101               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13102 $as_echo_n "checking Boot JDK version... " >&6; }
13103               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13104               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13105 $as_echo "$BOOT_JDK_VERSION" >&6; }
13106             fi # end check jdk version
13107           fi # end check rt.jar
13108         fi # end check javac
13109       fi # end check java
13110     fi # end check boot jdk found
13111   fi
13112 
13113 
13114   if test "x$BOOT_JDK_FOUND" = xno; then
13115     # Now execute the test
13116 
13117   if test "x$PROGRAMFILES" != x; then
13118     VIRTUAL_DIR="$PROGRAMFILES/Java"
13119 
13120   windows_path="$VIRTUAL_DIR"
13121   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13122     unix_path=`$CYGPATH -u "$windows_path"`
13123     VIRTUAL_DIR="$unix_path"
13124   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13125     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13126     VIRTUAL_DIR="$unix_path"
13127   fi
13128 
13129 
13130   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13131   BOOT_JDK_SUFFIX=""
13132   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13133   if test "x$ALL_JDKS_FOUND" != x; then
13134     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13135 
13136   if test "x$BOOT_JDK_FOUND" = xno; then
13137     # Now execute the test
13138 
13139         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13140         if test -d "$BOOT_JDK"; then
13141           BOOT_JDK_FOUND=maybe
13142           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13143 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13144         fi
13145 
13146 
13147     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13148     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13149       # Do we have a bin/java?
13150       if test ! -x "$BOOT_JDK/bin/java"; then
13151         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13152 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13153         BOOT_JDK_FOUND=no
13154       else
13155         # Do we have a bin/javac?
13156         if test ! -x "$BOOT_JDK/bin/javac"; then
13157           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13158 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13159           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13160 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13161           BOOT_JDK_FOUND=no
13162         else
13163           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13164           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13165             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13166 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13167             BOOT_JDK_FOUND=no
13168           else
13169             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13170             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13171 
13172             # Extra M4 quote needed to protect [] in grep expression.
13173             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13174             if test "x$FOUND_VERSION_78" = x; then
13175               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13176 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13177               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13178 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13179               BOOT_JDK_FOUND=no
13180             else
13181               # We're done! :-)
13182               BOOT_JDK_FOUND=yes
13183 
13184   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13185 
13186   # Input might be given as Windows format, start by converting to
13187   # unix format.
13188   path="$BOOT_JDK"
13189   new_path=`$CYGPATH -u "$path"`
13190 
13191   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13192   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13193   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13194   # "foo.exe" is OK but "foo" is an error.
13195   #
13196   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13197   # It is also a way to make sure we got the proper file name for the real test later on.
13198   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13199   if test "x$test_shortpath" = x; then
13200     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13201 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13202     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13203   fi
13204 
13205   # Call helper function which possibly converts this using DOS-style short mode.
13206   # If so, the updated path is stored in $new_path.
13207 
13208   input_path="$new_path"
13209   # Check if we need to convert this using DOS-style short mode. If the path
13210   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13211   # take no chances and rewrite it.
13212   # Note: m4 eats our [], so we need to use [ and ] instead.
13213   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13214   if test "x$has_forbidden_chars" != x; then
13215     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13216     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13217     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13218     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13219       # Going to short mode and back again did indeed matter. Since short mode is
13220       # case insensitive, let's make it lowercase to improve readability.
13221       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13222       # Now convert it back to Unix-stile (cygpath)
13223       input_path=`$CYGPATH -u "$shortmode_path"`
13224       new_path="$input_path"
13225     fi
13226   fi
13227 
13228   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13229   if test "x$test_cygdrive_prefix" = x; then
13230     # As a simple fix, exclude /usr/bin since it's not a real path.
13231     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13232       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13233       # a path prefixed by /cygdrive for fixpath to work.
13234       new_path="$CYGWIN_ROOT_PATH$input_path"
13235     fi
13236   fi
13237 
13238 
13239   if test "x$path" != "x$new_path"; then
13240     BOOT_JDK="$new_path"
13241     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13242 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13243   fi
13244 
13245   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13246 
13247   path="$BOOT_JDK"
13248   has_colon=`$ECHO $path | $GREP ^.:`
13249   new_path="$path"
13250   if test "x$has_colon" = x; then
13251     # Not in mixed or Windows style, start by that.
13252     new_path=`cmd //c echo $path`
13253   fi
13254 
13255 
13256   input_path="$new_path"
13257   # Check if we need to convert this using DOS-style short mode. If the path
13258   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13259   # take no chances and rewrite it.
13260   # Note: m4 eats our [], so we need to use [ and ] instead.
13261   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13262   if test "x$has_forbidden_chars" != x; then
13263     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13264     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13265   fi
13266 
13267 
13268   windows_path="$new_path"
13269   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13270     unix_path=`$CYGPATH -u "$windows_path"`
13271     new_path="$unix_path"
13272   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13273     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13274     new_path="$unix_path"
13275   fi
13276 
13277   if test "x$path" != "x$new_path"; then
13278     BOOT_JDK="$new_path"
13279     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13280 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13281   fi
13282 
13283   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13284   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13285 
13286   else
13287     # We're on a posix platform. Hooray! :)
13288     path="$BOOT_JDK"
13289 
13290     if test ! -f "$path" && test ! -d "$path"; then
13291       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13292     fi
13293 
13294     has_space=`$ECHO "$path" | $GREP " "`
13295     if test "x$has_space" != x; then
13296       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13297 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13298       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13299     fi
13300   fi
13301 
13302               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13303 $as_echo_n "checking for Boot JDK... " >&6; }
13304               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13305 $as_echo "$BOOT_JDK" >&6; }
13306               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13307 $as_echo_n "checking Boot JDK version... " >&6; }
13308               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13309               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13310 $as_echo "$BOOT_JDK_VERSION" >&6; }
13311             fi # end check jdk version
13312           fi # end check rt.jar
13313         fi # end check javac
13314       fi # end check java
13315     fi # end check boot jdk found
13316   fi
13317 
13318     done
13319   fi
13320 
13321   fi
13322 
13323 
13324     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13325     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13326       # Do we have a bin/java?
13327       if test ! -x "$BOOT_JDK/bin/java"; then
13328         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13329 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13330         BOOT_JDK_FOUND=no
13331       else
13332         # Do we have a bin/javac?
13333         if test ! -x "$BOOT_JDK/bin/javac"; then
13334           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13335 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13336           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13337 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13338           BOOT_JDK_FOUND=no
13339         else
13340           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13341           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13342             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13343 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13344             BOOT_JDK_FOUND=no
13345           else
13346             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13347             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13348 
13349             # Extra M4 quote needed to protect [] in grep expression.
13350             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13351             if test "x$FOUND_VERSION_78" = x; then
13352               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13353 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13354               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13355 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13356               BOOT_JDK_FOUND=no
13357             else
13358               # We're done! :-)
13359               BOOT_JDK_FOUND=yes
13360 
13361   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13362 
13363   # Input might be given as Windows format, start by converting to
13364   # unix format.
13365   path="$BOOT_JDK"
13366   new_path=`$CYGPATH -u "$path"`
13367 
13368   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13369   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13370   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13371   # "foo.exe" is OK but "foo" is an error.
13372   #
13373   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13374   # It is also a way to make sure we got the proper file name for the real test later on.
13375   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13376   if test "x$test_shortpath" = x; then
13377     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13378 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13379     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13380   fi
13381 
13382   # Call helper function which possibly converts this using DOS-style short mode.
13383   # If so, the updated path is stored in $new_path.
13384 
13385   input_path="$new_path"
13386   # Check if we need to convert this using DOS-style short mode. If the path
13387   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13388   # take no chances and rewrite it.
13389   # Note: m4 eats our [], so we need to use [ and ] instead.
13390   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13391   if test "x$has_forbidden_chars" != x; then
13392     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13393     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13394     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13395     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13396       # Going to short mode and back again did indeed matter. Since short mode is
13397       # case insensitive, let's make it lowercase to improve readability.
13398       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13399       # Now convert it back to Unix-stile (cygpath)
13400       input_path=`$CYGPATH -u "$shortmode_path"`
13401       new_path="$input_path"
13402     fi
13403   fi
13404 
13405   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13406   if test "x$test_cygdrive_prefix" = x; then
13407     # As a simple fix, exclude /usr/bin since it's not a real path.
13408     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13409       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13410       # a path prefixed by /cygdrive for fixpath to work.
13411       new_path="$CYGWIN_ROOT_PATH$input_path"
13412     fi
13413   fi
13414 
13415 
13416   if test "x$path" != "x$new_path"; then
13417     BOOT_JDK="$new_path"
13418     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13419 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13420   fi
13421 
13422   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13423 
13424   path="$BOOT_JDK"
13425   has_colon=`$ECHO $path | $GREP ^.:`
13426   new_path="$path"
13427   if test "x$has_colon" = x; then
13428     # Not in mixed or Windows style, start by that.
13429     new_path=`cmd //c echo $path`
13430   fi
13431 
13432 
13433   input_path="$new_path"
13434   # Check if we need to convert this using DOS-style short mode. If the path
13435   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13436   # take no chances and rewrite it.
13437   # Note: m4 eats our [], so we need to use [ and ] instead.
13438   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13439   if test "x$has_forbidden_chars" != x; then
13440     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13441     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13442   fi
13443 
13444 
13445   windows_path="$new_path"
13446   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13447     unix_path=`$CYGPATH -u "$windows_path"`
13448     new_path="$unix_path"
13449   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13450     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13451     new_path="$unix_path"
13452   fi
13453 
13454   if test "x$path" != "x$new_path"; then
13455     BOOT_JDK="$new_path"
13456     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13457 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13458   fi
13459 
13460   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13461   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13462 
13463   else
13464     # We're on a posix platform. Hooray! :)
13465     path="$BOOT_JDK"
13466 
13467     if test ! -f "$path" && test ! -d "$path"; then
13468       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13469     fi
13470 
13471     has_space=`$ECHO "$path" | $GREP " "`
13472     if test "x$has_space" != x; then
13473       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13474 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13475       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13476     fi
13477   fi
13478 
13479               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13480 $as_echo_n "checking for Boot JDK... " >&6; }
13481               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13482 $as_echo "$BOOT_JDK" >&6; }
13483               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13484 $as_echo_n "checking Boot JDK version... " >&6; }
13485               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13486               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13487 $as_echo "$BOOT_JDK_VERSION" >&6; }
13488             fi # end check jdk version
13489           fi # end check rt.jar
13490         fi # end check javac
13491       fi # end check java
13492     fi # end check boot jdk found
13493   fi
13494 
13495 
13496   if test "x$BOOT_JDK_FOUND" = xno; then
13497     # Now execute the test
13498 
13499   if test "x$ProgramFiles" != x; then
13500     VIRTUAL_DIR="$ProgramFiles/Java"
13501 
13502   windows_path="$VIRTUAL_DIR"
13503   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13504     unix_path=`$CYGPATH -u "$windows_path"`
13505     VIRTUAL_DIR="$unix_path"
13506   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13507     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13508     VIRTUAL_DIR="$unix_path"
13509   fi
13510 
13511 
13512   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13513   BOOT_JDK_SUFFIX=""
13514   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13515   if test "x$ALL_JDKS_FOUND" != x; then
13516     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13517 
13518   if test "x$BOOT_JDK_FOUND" = xno; then
13519     # Now execute the test
13520 
13521         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13522         if test -d "$BOOT_JDK"; then
13523           BOOT_JDK_FOUND=maybe
13524           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13525 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13526         fi
13527 
13528 
13529     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13530     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13531       # Do we have a bin/java?
13532       if test ! -x "$BOOT_JDK/bin/java"; then
13533         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13534 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13535         BOOT_JDK_FOUND=no
13536       else
13537         # Do we have a bin/javac?
13538         if test ! -x "$BOOT_JDK/bin/javac"; then
13539           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13540 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13541           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13542 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13543           BOOT_JDK_FOUND=no
13544         else
13545           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13546           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13547             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13548 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13549             BOOT_JDK_FOUND=no
13550           else
13551             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13552             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13553 
13554             # Extra M4 quote needed to protect [] in grep expression.
13555             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13556             if test "x$FOUND_VERSION_78" = x; then
13557               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13558 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13559               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13560 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13561               BOOT_JDK_FOUND=no
13562             else
13563               # We're done! :-)
13564               BOOT_JDK_FOUND=yes
13565 
13566   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13567 
13568   # Input might be given as Windows format, start by converting to
13569   # unix format.
13570   path="$BOOT_JDK"
13571   new_path=`$CYGPATH -u "$path"`
13572 
13573   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13574   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13575   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13576   # "foo.exe" is OK but "foo" is an error.
13577   #
13578   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13579   # It is also a way to make sure we got the proper file name for the real test later on.
13580   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13581   if test "x$test_shortpath" = x; then
13582     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13583 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13584     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13585   fi
13586 
13587   # Call helper function which possibly converts this using DOS-style short mode.
13588   # If so, the updated path is stored in $new_path.
13589 
13590   input_path="$new_path"
13591   # Check if we need to convert this using DOS-style short mode. If the path
13592   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13593   # take no chances and rewrite it.
13594   # Note: m4 eats our [], so we need to use [ and ] instead.
13595   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13596   if test "x$has_forbidden_chars" != x; then
13597     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13598     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13599     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13600     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13601       # Going to short mode and back again did indeed matter. Since short mode is
13602       # case insensitive, let's make it lowercase to improve readability.
13603       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13604       # Now convert it back to Unix-stile (cygpath)
13605       input_path=`$CYGPATH -u "$shortmode_path"`
13606       new_path="$input_path"
13607     fi
13608   fi
13609 
13610   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13611   if test "x$test_cygdrive_prefix" = x; then
13612     # As a simple fix, exclude /usr/bin since it's not a real path.
13613     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13614       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13615       # a path prefixed by /cygdrive for fixpath to work.
13616       new_path="$CYGWIN_ROOT_PATH$input_path"
13617     fi
13618   fi
13619 
13620 
13621   if test "x$path" != "x$new_path"; then
13622     BOOT_JDK="$new_path"
13623     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13624 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13625   fi
13626 
13627   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13628 
13629   path="$BOOT_JDK"
13630   has_colon=`$ECHO $path | $GREP ^.:`
13631   new_path="$path"
13632   if test "x$has_colon" = x; then
13633     # Not in mixed or Windows style, start by that.
13634     new_path=`cmd //c echo $path`
13635   fi
13636 
13637 
13638   input_path="$new_path"
13639   # Check if we need to convert this using DOS-style short mode. If the path
13640   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13641   # take no chances and rewrite it.
13642   # Note: m4 eats our [], so we need to use [ and ] instead.
13643   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13644   if test "x$has_forbidden_chars" != x; then
13645     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13646     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13647   fi
13648 
13649 
13650   windows_path="$new_path"
13651   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13652     unix_path=`$CYGPATH -u "$windows_path"`
13653     new_path="$unix_path"
13654   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13655     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13656     new_path="$unix_path"
13657   fi
13658 
13659   if test "x$path" != "x$new_path"; then
13660     BOOT_JDK="$new_path"
13661     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13662 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13663   fi
13664 
13665   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13666   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13667 
13668   else
13669     # We're on a posix platform. Hooray! :)
13670     path="$BOOT_JDK"
13671 
13672     if test ! -f "$path" && test ! -d "$path"; then
13673       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13674     fi
13675 
13676     has_space=`$ECHO "$path" | $GREP " "`
13677     if test "x$has_space" != x; then
13678       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13679 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13680       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13681     fi
13682   fi
13683 
13684               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13685 $as_echo_n "checking for Boot JDK... " >&6; }
13686               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13687 $as_echo "$BOOT_JDK" >&6; }
13688               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13689 $as_echo_n "checking Boot JDK version... " >&6; }
13690               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13691               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13692 $as_echo "$BOOT_JDK_VERSION" >&6; }
13693             fi # end check jdk version
13694           fi # end check rt.jar
13695         fi # end check javac
13696       fi # end check java
13697     fi # end check boot jdk found
13698   fi
13699 
13700     done
13701   fi
13702 
13703   fi
13704 
13705 
13706     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13707     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13708       # Do we have a bin/java?
13709       if test ! -x "$BOOT_JDK/bin/java"; then
13710         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13711 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13712         BOOT_JDK_FOUND=no
13713       else
13714         # Do we have a bin/javac?
13715         if test ! -x "$BOOT_JDK/bin/javac"; then
13716           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13717 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13718           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13719 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13720           BOOT_JDK_FOUND=no
13721         else
13722           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13723           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13724             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13725 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13726             BOOT_JDK_FOUND=no
13727           else
13728             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13729             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13730 
13731             # Extra M4 quote needed to protect [] in grep expression.
13732             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13733             if test "x$FOUND_VERSION_78" = x; then
13734               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13735 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13736               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13737 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13738               BOOT_JDK_FOUND=no
13739             else
13740               # We're done! :-)
13741               BOOT_JDK_FOUND=yes
13742 
13743   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13744 
13745   # Input might be given as Windows format, start by converting to
13746   # unix format.
13747   path="$BOOT_JDK"
13748   new_path=`$CYGPATH -u "$path"`
13749 
13750   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13751   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13752   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13753   # "foo.exe" is OK but "foo" is an error.
13754   #
13755   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13756   # It is also a way to make sure we got the proper file name for the real test later on.
13757   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13758   if test "x$test_shortpath" = x; then
13759     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13760 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13761     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13762   fi
13763 
13764   # Call helper function which possibly converts this using DOS-style short mode.
13765   # If so, the updated path is stored in $new_path.
13766 
13767   input_path="$new_path"
13768   # Check if we need to convert this using DOS-style short mode. If the path
13769   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13770   # take no chances and rewrite it.
13771   # Note: m4 eats our [], so we need to use [ and ] instead.
13772   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13773   if test "x$has_forbidden_chars" != x; then
13774     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13775     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13776     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13777     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13778       # Going to short mode and back again did indeed matter. Since short mode is
13779       # case insensitive, let's make it lowercase to improve readability.
13780       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13781       # Now convert it back to Unix-stile (cygpath)
13782       input_path=`$CYGPATH -u "$shortmode_path"`
13783       new_path="$input_path"
13784     fi
13785   fi
13786 
13787   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13788   if test "x$test_cygdrive_prefix" = x; then
13789     # As a simple fix, exclude /usr/bin since it's not a real path.
13790     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13791       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13792       # a path prefixed by /cygdrive for fixpath to work.
13793       new_path="$CYGWIN_ROOT_PATH$input_path"
13794     fi
13795   fi
13796 
13797 
13798   if test "x$path" != "x$new_path"; then
13799     BOOT_JDK="$new_path"
13800     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13801 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13802   fi
13803 
13804   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13805 
13806   path="$BOOT_JDK"
13807   has_colon=`$ECHO $path | $GREP ^.:`
13808   new_path="$path"
13809   if test "x$has_colon" = x; then
13810     # Not in mixed or Windows style, start by that.
13811     new_path=`cmd //c echo $path`
13812   fi
13813 
13814 
13815   input_path="$new_path"
13816   # Check if we need to convert this using DOS-style short mode. If the path
13817   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13818   # take no chances and rewrite it.
13819   # Note: m4 eats our [], so we need to use [ and ] instead.
13820   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13821   if test "x$has_forbidden_chars" != x; then
13822     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13823     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13824   fi
13825 
13826 
13827   windows_path="$new_path"
13828   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13829     unix_path=`$CYGPATH -u "$windows_path"`
13830     new_path="$unix_path"
13831   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13832     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13833     new_path="$unix_path"
13834   fi
13835 
13836   if test "x$path" != "x$new_path"; then
13837     BOOT_JDK="$new_path"
13838     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13839 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13840   fi
13841 
13842   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13843   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13844 
13845   else
13846     # We're on a posix platform. Hooray! :)
13847     path="$BOOT_JDK"
13848 
13849     if test ! -f "$path" && test ! -d "$path"; then
13850       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13851     fi
13852 
13853     has_space=`$ECHO "$path" | $GREP " "`
13854     if test "x$has_space" != x; then
13855       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13856 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13857       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13858     fi
13859   fi
13860 
13861               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13862 $as_echo_n "checking for Boot JDK... " >&6; }
13863               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13864 $as_echo "$BOOT_JDK" >&6; }
13865               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13866 $as_echo_n "checking Boot JDK version... " >&6; }
13867               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13868               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13869 $as_echo "$BOOT_JDK_VERSION" >&6; }
13870             fi # end check jdk version
13871           fi # end check rt.jar
13872         fi # end check javac
13873       fi # end check java
13874     fi # end check boot jdk found
13875   fi
13876 
13877 
13878   if test "x$BOOT_JDK_FOUND" = xno; then
13879     # Now execute the test
13880 
13881   BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
13882   BOOT_JDK_SUFFIX=""
13883   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13884   if test "x$ALL_JDKS_FOUND" != x; then
13885     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13886 
13887   if test "x$BOOT_JDK_FOUND" = xno; then
13888     # Now execute the test
13889 
13890         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13891         if test -d "$BOOT_JDK"; then
13892           BOOT_JDK_FOUND=maybe
13893           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13894 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13895         fi
13896 
13897 
13898     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13899     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13900       # Do we have a bin/java?
13901       if test ! -x "$BOOT_JDK/bin/java"; then
13902         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13903 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13904         BOOT_JDK_FOUND=no
13905       else
13906         # Do we have a bin/javac?
13907         if test ! -x "$BOOT_JDK/bin/javac"; then
13908           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13909 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13910           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13911 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13912           BOOT_JDK_FOUND=no
13913         else
13914           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13915           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13916             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13917 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13918             BOOT_JDK_FOUND=no
13919           else
13920             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13921             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13922 
13923             # Extra M4 quote needed to protect [] in grep expression.
13924             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13925             if test "x$FOUND_VERSION_78" = x; then
13926               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13927 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13928               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13929 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13930               BOOT_JDK_FOUND=no
13931             else
13932               # We're done! :-)
13933               BOOT_JDK_FOUND=yes
13934 
13935   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13936 
13937   # Input might be given as Windows format, start by converting to
13938   # unix format.
13939   path="$BOOT_JDK"
13940   new_path=`$CYGPATH -u "$path"`
13941 
13942   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13943   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13944   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13945   # "foo.exe" is OK but "foo" is an error.
13946   #
13947   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13948   # It is also a way to make sure we got the proper file name for the real test later on.
13949   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13950   if test "x$test_shortpath" = x; then
13951     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13952 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13953     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13954   fi
13955 
13956   # Call helper function which possibly converts this using DOS-style short mode.
13957   # If so, the updated path is stored in $new_path.
13958 
13959   input_path="$new_path"
13960   # Check if we need to convert this using DOS-style short mode. If the path
13961   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13962   # take no chances and rewrite it.
13963   # Note: m4 eats our [], so we need to use [ and ] instead.
13964   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13965   if test "x$has_forbidden_chars" != x; then
13966     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13967     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13968     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13969     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13970       # Going to short mode and back again did indeed matter. Since short mode is
13971       # case insensitive, let's make it lowercase to improve readability.
13972       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13973       # Now convert it back to Unix-stile (cygpath)
13974       input_path=`$CYGPATH -u "$shortmode_path"`
13975       new_path="$input_path"
13976     fi
13977   fi
13978 
13979   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13980   if test "x$test_cygdrive_prefix" = x; then
13981     # As a simple fix, exclude /usr/bin since it's not a real path.
13982     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13983       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13984       # a path prefixed by /cygdrive for fixpath to work.
13985       new_path="$CYGWIN_ROOT_PATH$input_path"
13986     fi
13987   fi
13988 
13989 
13990   if test "x$path" != "x$new_path"; then
13991     BOOT_JDK="$new_path"
13992     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13993 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13994   fi
13995 
13996   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13997 
13998   path="$BOOT_JDK"
13999   has_colon=`$ECHO $path | $GREP ^.:`
14000   new_path="$path"
14001   if test "x$has_colon" = x; then
14002     # Not in mixed or Windows style, start by that.
14003     new_path=`cmd //c echo $path`
14004   fi
14005 
14006 
14007   input_path="$new_path"
14008   # Check if we need to convert this using DOS-style short mode. If the path
14009   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14010   # take no chances and rewrite it.
14011   # Note: m4 eats our [], so we need to use [ and ] instead.
14012   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14013   if test "x$has_forbidden_chars" != x; then
14014     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14015     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14016   fi
14017 
14018 
14019   windows_path="$new_path"
14020   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14021     unix_path=`$CYGPATH -u "$windows_path"`
14022     new_path="$unix_path"
14023   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14024     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14025     new_path="$unix_path"
14026   fi
14027 
14028   if test "x$path" != "x$new_path"; then
14029     BOOT_JDK="$new_path"
14030     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14031 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14032   fi
14033 
14034   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14035   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14036 
14037   else
14038     # We're on a posix platform. Hooray! :)
14039     path="$BOOT_JDK"
14040 
14041     if test ! -f "$path" && test ! -d "$path"; then
14042       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14043     fi
14044 
14045     has_space=`$ECHO "$path" | $GREP " "`
14046     if test "x$has_space" != x; then
14047       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14048 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14049       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14050     fi
14051   fi
14052 
14053               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14054 $as_echo_n "checking for Boot JDK... " >&6; }
14055               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14056 $as_echo "$BOOT_JDK" >&6; }
14057               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14058 $as_echo_n "checking Boot JDK version... " >&6; }
14059               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14060               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14061 $as_echo "$BOOT_JDK_VERSION" >&6; }
14062             fi # end check jdk version
14063           fi # end check rt.jar
14064         fi # end check javac
14065       fi # end check java
14066     fi # end check boot jdk found
14067   fi
14068 
14069     done
14070   fi
14071 
14072 
14073     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14074     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14075       # Do we have a bin/java?
14076       if test ! -x "$BOOT_JDK/bin/java"; then
14077         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14078 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14079         BOOT_JDK_FOUND=no
14080       else
14081         # Do we have a bin/javac?
14082         if test ! -x "$BOOT_JDK/bin/javac"; then
14083           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14084 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14085           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14086 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14087           BOOT_JDK_FOUND=no
14088         else
14089           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14090           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14091             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14092 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14093             BOOT_JDK_FOUND=no
14094           else
14095             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14096             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14097 
14098             # Extra M4 quote needed to protect [] in grep expression.
14099             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14100             if test "x$FOUND_VERSION_78" = x; then
14101               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14102 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14103               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14104 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14105               BOOT_JDK_FOUND=no
14106             else
14107               # We're done! :-)
14108               BOOT_JDK_FOUND=yes
14109 
14110   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14111 
14112   # Input might be given as Windows format, start by converting to
14113   # unix format.
14114   path="$BOOT_JDK"
14115   new_path=`$CYGPATH -u "$path"`
14116 
14117   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14118   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14119   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14120   # "foo.exe" is OK but "foo" is an error.
14121   #
14122   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14123   # It is also a way to make sure we got the proper file name for the real test later on.
14124   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14125   if test "x$test_shortpath" = x; then
14126     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14127 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14128     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14129   fi
14130 
14131   # Call helper function which possibly converts this using DOS-style short mode.
14132   # If so, the updated path is stored in $new_path.
14133 
14134   input_path="$new_path"
14135   # Check if we need to convert this using DOS-style short mode. If the path
14136   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14137   # take no chances and rewrite it.
14138   # Note: m4 eats our [], so we need to use [ and ] instead.
14139   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14140   if test "x$has_forbidden_chars" != x; then
14141     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14142     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14143     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14144     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14145       # Going to short mode and back again did indeed matter. Since short mode is
14146       # case insensitive, let's make it lowercase to improve readability.
14147       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14148       # Now convert it back to Unix-stile (cygpath)
14149       input_path=`$CYGPATH -u "$shortmode_path"`
14150       new_path="$input_path"
14151     fi
14152   fi
14153 
14154   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14155   if test "x$test_cygdrive_prefix" = x; then
14156     # As a simple fix, exclude /usr/bin since it's not a real path.
14157     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14158       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14159       # a path prefixed by /cygdrive for fixpath to work.
14160       new_path="$CYGWIN_ROOT_PATH$input_path"
14161     fi
14162   fi
14163 
14164 
14165   if test "x$path" != "x$new_path"; then
14166     BOOT_JDK="$new_path"
14167     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14168 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14169   fi
14170 
14171   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14172 
14173   path="$BOOT_JDK"
14174   has_colon=`$ECHO $path | $GREP ^.:`
14175   new_path="$path"
14176   if test "x$has_colon" = x; then
14177     # Not in mixed or Windows style, start by that.
14178     new_path=`cmd //c echo $path`
14179   fi
14180 
14181 
14182   input_path="$new_path"
14183   # Check if we need to convert this using DOS-style short mode. If the path
14184   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14185   # take no chances and rewrite it.
14186   # Note: m4 eats our [], so we need to use [ and ] instead.
14187   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14188   if test "x$has_forbidden_chars" != x; then
14189     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14190     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14191   fi
14192 
14193 
14194   windows_path="$new_path"
14195   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14196     unix_path=`$CYGPATH -u "$windows_path"`
14197     new_path="$unix_path"
14198   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14199     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14200     new_path="$unix_path"
14201   fi
14202 
14203   if test "x$path" != "x$new_path"; then
14204     BOOT_JDK="$new_path"
14205     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14206 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14207   fi
14208 
14209   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14210   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14211 
14212   else
14213     # We're on a posix platform. Hooray! :)
14214     path="$BOOT_JDK"
14215 
14216     if test ! -f "$path" && test ! -d "$path"; then
14217       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14218     fi
14219 
14220     has_space=`$ECHO "$path" | $GREP " "`
14221     if test "x$has_space" != x; then
14222       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14223 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14224       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14225     fi
14226   fi
14227 
14228               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14229 $as_echo_n "checking for Boot JDK... " >&6; }
14230               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14231 $as_echo "$BOOT_JDK" >&6; }
14232               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14233 $as_echo_n "checking Boot JDK version... " >&6; }
14234               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14235               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14236 $as_echo "$BOOT_JDK_VERSION" >&6; }
14237             fi # end check jdk version
14238           fi # end check rt.jar
14239         fi # end check javac
14240       fi # end check java
14241     fi # end check boot jdk found
14242   fi
14243 
14244   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
14245 
14246   if test "x$BOOT_JDK_FOUND" = xno; then
14247     # Now execute the test
14248 
14249   BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
14250   BOOT_JDK_SUFFIX="/Contents/Home"
14251   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14252   if test "x$ALL_JDKS_FOUND" != x; then
14253     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14254 
14255   if test "x$BOOT_JDK_FOUND" = xno; then
14256     # Now execute the test
14257 
14258         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14259         if test -d "$BOOT_JDK"; then
14260           BOOT_JDK_FOUND=maybe
14261           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14262 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14263         fi
14264 
14265 
14266     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14267     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14268       # Do we have a bin/java?
14269       if test ! -x "$BOOT_JDK/bin/java"; then
14270         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14271 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14272         BOOT_JDK_FOUND=no
14273       else
14274         # Do we have a bin/javac?
14275         if test ! -x "$BOOT_JDK/bin/javac"; then
14276           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14277 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14278           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14279 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14280           BOOT_JDK_FOUND=no
14281         else
14282           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14283           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14284             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14285 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14286             BOOT_JDK_FOUND=no
14287           else
14288             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14289             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14290 
14291             # Extra M4 quote needed to protect [] in grep expression.
14292             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14293             if test "x$FOUND_VERSION_78" = x; then
14294               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14295 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14296               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14297 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14298               BOOT_JDK_FOUND=no
14299             else
14300               # We're done! :-)
14301               BOOT_JDK_FOUND=yes
14302 
14303   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14304 
14305   # Input might be given as Windows format, start by converting to
14306   # unix format.
14307   path="$BOOT_JDK"
14308   new_path=`$CYGPATH -u "$path"`
14309 
14310   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14311   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14312   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14313   # "foo.exe" is OK but "foo" is an error.
14314   #
14315   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14316   # It is also a way to make sure we got the proper file name for the real test later on.
14317   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14318   if test "x$test_shortpath" = x; then
14319     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14320 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14321     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14322   fi
14323 
14324   # Call helper function which possibly converts this using DOS-style short mode.
14325   # If so, the updated path is stored in $new_path.
14326 
14327   input_path="$new_path"
14328   # Check if we need to convert this using DOS-style short mode. If the path
14329   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14330   # take no chances and rewrite it.
14331   # Note: m4 eats our [], so we need to use [ and ] instead.
14332   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14333   if test "x$has_forbidden_chars" != x; then
14334     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14335     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14336     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14337     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14338       # Going to short mode and back again did indeed matter. Since short mode is
14339       # case insensitive, let's make it lowercase to improve readability.
14340       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14341       # Now convert it back to Unix-stile (cygpath)
14342       input_path=`$CYGPATH -u "$shortmode_path"`
14343       new_path="$input_path"
14344     fi
14345   fi
14346 
14347   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14348   if test "x$test_cygdrive_prefix" = x; then
14349     # As a simple fix, exclude /usr/bin since it's not a real path.
14350     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14351       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14352       # a path prefixed by /cygdrive for fixpath to work.
14353       new_path="$CYGWIN_ROOT_PATH$input_path"
14354     fi
14355   fi
14356 
14357 
14358   if test "x$path" != "x$new_path"; then
14359     BOOT_JDK="$new_path"
14360     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14361 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14362   fi
14363 
14364   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14365 
14366   path="$BOOT_JDK"
14367   has_colon=`$ECHO $path | $GREP ^.:`
14368   new_path="$path"
14369   if test "x$has_colon" = x; then
14370     # Not in mixed or Windows style, start by that.
14371     new_path=`cmd //c echo $path`
14372   fi
14373 
14374 
14375   input_path="$new_path"
14376   # Check if we need to convert this using DOS-style short mode. If the path
14377   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14378   # take no chances and rewrite it.
14379   # Note: m4 eats our [], so we need to use [ and ] instead.
14380   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14381   if test "x$has_forbidden_chars" != x; then
14382     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14383     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14384   fi
14385 
14386 
14387   windows_path="$new_path"
14388   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14389     unix_path=`$CYGPATH -u "$windows_path"`
14390     new_path="$unix_path"
14391   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14392     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14393     new_path="$unix_path"
14394   fi
14395 
14396   if test "x$path" != "x$new_path"; then
14397     BOOT_JDK="$new_path"
14398     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14399 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14400   fi
14401 
14402   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14403   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14404 
14405   else
14406     # We're on a posix platform. Hooray! :)
14407     path="$BOOT_JDK"
14408 
14409     if test ! -f "$path" && test ! -d "$path"; then
14410       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14411     fi
14412 
14413     has_space=`$ECHO "$path" | $GREP " "`
14414     if test "x$has_space" != x; then
14415       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14416 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14417       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14418     fi
14419   fi
14420 
14421               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14422 $as_echo_n "checking for Boot JDK... " >&6; }
14423               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14424 $as_echo "$BOOT_JDK" >&6; }
14425               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14426 $as_echo_n "checking Boot JDK version... " >&6; }
14427               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14428               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14429 $as_echo "$BOOT_JDK_VERSION" >&6; }
14430             fi # end check jdk version
14431           fi # end check rt.jar
14432         fi # end check javac
14433       fi # end check java
14434     fi # end check boot jdk found
14435   fi
14436 
14437     done
14438   fi
14439 
14440 
14441     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14442     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14443       # Do we have a bin/java?
14444       if test ! -x "$BOOT_JDK/bin/java"; then
14445         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14446 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14447         BOOT_JDK_FOUND=no
14448       else
14449         # Do we have a bin/javac?
14450         if test ! -x "$BOOT_JDK/bin/javac"; then
14451           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14452 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14453           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14454 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14455           BOOT_JDK_FOUND=no
14456         else
14457           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14458           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14459             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14460 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14461             BOOT_JDK_FOUND=no
14462           else
14463             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14464             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14465 
14466             # Extra M4 quote needed to protect [] in grep expression.
14467             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14468             if test "x$FOUND_VERSION_78" = x; then
14469               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14470 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14471               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14472 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14473               BOOT_JDK_FOUND=no
14474             else
14475               # We're done! :-)
14476               BOOT_JDK_FOUND=yes
14477 
14478   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14479 
14480   # Input might be given as Windows format, start by converting to
14481   # unix format.
14482   path="$BOOT_JDK"
14483   new_path=`$CYGPATH -u "$path"`
14484 
14485   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14486   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14487   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14488   # "foo.exe" is OK but "foo" is an error.
14489   #
14490   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14491   # It is also a way to make sure we got the proper file name for the real test later on.
14492   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14493   if test "x$test_shortpath" = x; then
14494     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14495 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14496     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14497   fi
14498 
14499   # Call helper function which possibly converts this using DOS-style short mode.
14500   # If so, the updated path is stored in $new_path.
14501 
14502   input_path="$new_path"
14503   # Check if we need to convert this using DOS-style short mode. If the path
14504   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14505   # take no chances and rewrite it.
14506   # Note: m4 eats our [], so we need to use [ and ] instead.
14507   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14508   if test "x$has_forbidden_chars" != x; then
14509     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14510     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14511     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14512     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14513       # Going to short mode and back again did indeed matter. Since short mode is
14514       # case insensitive, let's make it lowercase to improve readability.
14515       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14516       # Now convert it back to Unix-stile (cygpath)
14517       input_path=`$CYGPATH -u "$shortmode_path"`
14518       new_path="$input_path"
14519     fi
14520   fi
14521 
14522   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14523   if test "x$test_cygdrive_prefix" = x; then
14524     # As a simple fix, exclude /usr/bin since it's not a real path.
14525     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14526       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14527       # a path prefixed by /cygdrive for fixpath to work.
14528       new_path="$CYGWIN_ROOT_PATH$input_path"
14529     fi
14530   fi
14531 
14532 
14533   if test "x$path" != "x$new_path"; then
14534     BOOT_JDK="$new_path"
14535     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14536 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14537   fi
14538 
14539   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14540 
14541   path="$BOOT_JDK"
14542   has_colon=`$ECHO $path | $GREP ^.:`
14543   new_path="$path"
14544   if test "x$has_colon" = x; then
14545     # Not in mixed or Windows style, start by that.
14546     new_path=`cmd //c echo $path`
14547   fi
14548 
14549 
14550   input_path="$new_path"
14551   # Check if we need to convert this using DOS-style short mode. If the path
14552   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14553   # take no chances and rewrite it.
14554   # Note: m4 eats our [], so we need to use [ and ] instead.
14555   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14556   if test "x$has_forbidden_chars" != x; then
14557     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14558     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14559   fi
14560 
14561 
14562   windows_path="$new_path"
14563   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14564     unix_path=`$CYGPATH -u "$windows_path"`
14565     new_path="$unix_path"
14566   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14567     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14568     new_path="$unix_path"
14569   fi
14570 
14571   if test "x$path" != "x$new_path"; then
14572     BOOT_JDK="$new_path"
14573     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14574 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14575   fi
14576 
14577   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14578   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14579 
14580   else
14581     # We're on a posix platform. Hooray! :)
14582     path="$BOOT_JDK"
14583 
14584     if test ! -f "$path" && test ! -d "$path"; then
14585       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14586     fi
14587 
14588     has_space=`$ECHO "$path" | $GREP " "`
14589     if test "x$has_space" != x; then
14590       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14591 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14592       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14593     fi
14594   fi
14595 
14596               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14597 $as_echo_n "checking for Boot JDK... " >&6; }
14598               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14599 $as_echo "$BOOT_JDK" >&6; }
14600               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14601 $as_echo_n "checking Boot JDK version... " >&6; }
14602               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14603               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14604 $as_echo "$BOOT_JDK_VERSION" >&6; }
14605             fi # end check jdk version
14606           fi # end check rt.jar
14607         fi # end check javac
14608       fi # end check java
14609     fi # end check boot jdk found
14610   fi
14611 
14612 
14613   if test "x$BOOT_JDK_FOUND" = xno; then
14614     # Now execute the test
14615 
14616   BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
14617   BOOT_JDK_SUFFIX="/Contents/Home"
14618   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14619   if test "x$ALL_JDKS_FOUND" != x; then
14620     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14621 
14622   if test "x$BOOT_JDK_FOUND" = xno; then
14623     # Now execute the test
14624 
14625         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14626         if test -d "$BOOT_JDK"; then
14627           BOOT_JDK_FOUND=maybe
14628           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14629 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14630         fi
14631 
14632 
14633     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14634     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14635       # Do we have a bin/java?
14636       if test ! -x "$BOOT_JDK/bin/java"; then
14637         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14638 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14639         BOOT_JDK_FOUND=no
14640       else
14641         # Do we have a bin/javac?
14642         if test ! -x "$BOOT_JDK/bin/javac"; then
14643           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14644 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14645           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14646 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14647           BOOT_JDK_FOUND=no
14648         else
14649           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14650           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14651             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14652 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14653             BOOT_JDK_FOUND=no
14654           else
14655             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14656             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14657 
14658             # Extra M4 quote needed to protect [] in grep expression.
14659             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14660             if test "x$FOUND_VERSION_78" = x; then
14661               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14662 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14663               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14664 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14665               BOOT_JDK_FOUND=no
14666             else
14667               # We're done! :-)
14668               BOOT_JDK_FOUND=yes
14669 
14670   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14671 
14672   # Input might be given as Windows format, start by converting to
14673   # unix format.
14674   path="$BOOT_JDK"
14675   new_path=`$CYGPATH -u "$path"`
14676 
14677   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14678   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14679   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14680   # "foo.exe" is OK but "foo" is an error.
14681   #
14682   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14683   # It is also a way to make sure we got the proper file name for the real test later on.
14684   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14685   if test "x$test_shortpath" = x; then
14686     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14687 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14688     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14689   fi
14690 
14691   # Call helper function which possibly converts this using DOS-style short mode.
14692   # If so, the updated path is stored in $new_path.
14693 
14694   input_path="$new_path"
14695   # Check if we need to convert this using DOS-style short mode. If the path
14696   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14697   # take no chances and rewrite it.
14698   # Note: m4 eats our [], so we need to use [ and ] instead.
14699   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14700   if test "x$has_forbidden_chars" != x; then
14701     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14702     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14703     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14704     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14705       # Going to short mode and back again did indeed matter. Since short mode is
14706       # case insensitive, let's make it lowercase to improve readability.
14707       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14708       # Now convert it back to Unix-stile (cygpath)
14709       input_path=`$CYGPATH -u "$shortmode_path"`
14710       new_path="$input_path"
14711     fi
14712   fi
14713 
14714   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14715   if test "x$test_cygdrive_prefix" = x; then
14716     # As a simple fix, exclude /usr/bin since it's not a real path.
14717     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14718       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14719       # a path prefixed by /cygdrive for fixpath to work.
14720       new_path="$CYGWIN_ROOT_PATH$input_path"
14721     fi
14722   fi
14723 
14724 
14725   if test "x$path" != "x$new_path"; then
14726     BOOT_JDK="$new_path"
14727     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14728 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14729   fi
14730 
14731   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14732 
14733   path="$BOOT_JDK"
14734   has_colon=`$ECHO $path | $GREP ^.:`
14735   new_path="$path"
14736   if test "x$has_colon" = x; then
14737     # Not in mixed or Windows style, start by that.
14738     new_path=`cmd //c echo $path`
14739   fi
14740 
14741 
14742   input_path="$new_path"
14743   # Check if we need to convert this using DOS-style short mode. If the path
14744   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14745   # take no chances and rewrite it.
14746   # Note: m4 eats our [], so we need to use [ and ] instead.
14747   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14748   if test "x$has_forbidden_chars" != x; then
14749     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14750     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14751   fi
14752 
14753 
14754   windows_path="$new_path"
14755   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14756     unix_path=`$CYGPATH -u "$windows_path"`
14757     new_path="$unix_path"
14758   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14759     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14760     new_path="$unix_path"
14761   fi
14762 
14763   if test "x$path" != "x$new_path"; then
14764     BOOT_JDK="$new_path"
14765     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14766 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14767   fi
14768 
14769   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14770   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14771 
14772   else
14773     # We're on a posix platform. Hooray! :)
14774     path="$BOOT_JDK"
14775 
14776     if test ! -f "$path" && test ! -d "$path"; then
14777       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14778     fi
14779 
14780     has_space=`$ECHO "$path" | $GREP " "`
14781     if test "x$has_space" != x; then
14782       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14783 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14784       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14785     fi
14786   fi
14787 
14788               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14789 $as_echo_n "checking for Boot JDK... " >&6; }
14790               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14791 $as_echo "$BOOT_JDK" >&6; }
14792               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14793 $as_echo_n "checking Boot JDK version... " >&6; }
14794               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14795               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14796 $as_echo "$BOOT_JDK_VERSION" >&6; }
14797             fi # end check jdk version
14798           fi # end check rt.jar
14799         fi # end check javac
14800       fi # end check java
14801     fi # end check boot jdk found
14802   fi
14803 
14804     done
14805   fi
14806 
14807 
14808     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14809     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14810       # Do we have a bin/java?
14811       if test ! -x "$BOOT_JDK/bin/java"; then
14812         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14813 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14814         BOOT_JDK_FOUND=no
14815       else
14816         # Do we have a bin/javac?
14817         if test ! -x "$BOOT_JDK/bin/javac"; then
14818           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14819 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14820           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14821 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14822           BOOT_JDK_FOUND=no
14823         else
14824           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14825           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14826             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14827 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14828             BOOT_JDK_FOUND=no
14829           else
14830             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14831             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14832 
14833             # Extra M4 quote needed to protect [] in grep expression.
14834             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14835             if test "x$FOUND_VERSION_78" = x; then
14836               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14837 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14838               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14839 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14840               BOOT_JDK_FOUND=no
14841             else
14842               # We're done! :-)
14843               BOOT_JDK_FOUND=yes
14844 
14845   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14846 
14847   # Input might be given as Windows format, start by converting to
14848   # unix format.
14849   path="$BOOT_JDK"
14850   new_path=`$CYGPATH -u "$path"`
14851 
14852   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14853   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14854   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14855   # "foo.exe" is OK but "foo" is an error.
14856   #
14857   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14858   # It is also a way to make sure we got the proper file name for the real test later on.
14859   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14860   if test "x$test_shortpath" = x; then
14861     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14862 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14863     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14864   fi
14865 
14866   # Call helper function which possibly converts this using DOS-style short mode.
14867   # If so, the updated path is stored in $new_path.
14868 
14869   input_path="$new_path"
14870   # Check if we need to convert this using DOS-style short mode. If the path
14871   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14872   # take no chances and rewrite it.
14873   # Note: m4 eats our [], so we need to use [ and ] instead.
14874   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14875   if test "x$has_forbidden_chars" != x; then
14876     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14877     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14878     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14879     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14880       # Going to short mode and back again did indeed matter. Since short mode is
14881       # case insensitive, let's make it lowercase to improve readability.
14882       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14883       # Now convert it back to Unix-stile (cygpath)
14884       input_path=`$CYGPATH -u "$shortmode_path"`
14885       new_path="$input_path"
14886     fi
14887   fi
14888 
14889   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14890   if test "x$test_cygdrive_prefix" = x; then
14891     # As a simple fix, exclude /usr/bin since it's not a real path.
14892     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14893       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14894       # a path prefixed by /cygdrive for fixpath to work.
14895       new_path="$CYGWIN_ROOT_PATH$input_path"
14896     fi
14897   fi
14898 
14899 
14900   if test "x$path" != "x$new_path"; then
14901     BOOT_JDK="$new_path"
14902     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14903 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14904   fi
14905 
14906   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14907 
14908   path="$BOOT_JDK"
14909   has_colon=`$ECHO $path | $GREP ^.:`
14910   new_path="$path"
14911   if test "x$has_colon" = x; then
14912     # Not in mixed or Windows style, start by that.
14913     new_path=`cmd //c echo $path`
14914   fi
14915 
14916 
14917   input_path="$new_path"
14918   # Check if we need to convert this using DOS-style short mode. If the path
14919   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14920   # take no chances and rewrite it.
14921   # Note: m4 eats our [], so we need to use [ and ] instead.
14922   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14923   if test "x$has_forbidden_chars" != x; then
14924     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14925     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14926   fi
14927 
14928 
14929   windows_path="$new_path"
14930   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14931     unix_path=`$CYGPATH -u "$windows_path"`
14932     new_path="$unix_path"
14933   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14934     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14935     new_path="$unix_path"
14936   fi
14937 
14938   if test "x$path" != "x$new_path"; then
14939     BOOT_JDK="$new_path"
14940     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14941 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14942   fi
14943 
14944   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14945   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14946 
14947   else
14948     # We're on a posix platform. Hooray! :)
14949     path="$BOOT_JDK"
14950 
14951     if test ! -f "$path" && test ! -d "$path"; then
14952       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14953     fi
14954 
14955     has_space=`$ECHO "$path" | $GREP " "`
14956     if test "x$has_space" != x; then
14957       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14958 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14959       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14960     fi
14961   fi
14962 
14963               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14964 $as_echo_n "checking for Boot JDK... " >&6; }
14965               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14966 $as_echo "$BOOT_JDK" >&6; }
14967               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14968 $as_echo_n "checking Boot JDK version... " >&6; }
14969               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14970               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14971 $as_echo "$BOOT_JDK_VERSION" >&6; }
14972             fi # end check jdk version
14973           fi # end check rt.jar
14974         fi # end check javac
14975       fi # end check java
14976     fi # end check boot jdk found
14977   fi
14978 
14979   elif test "x$OPENJDK_TARGET_OS" = xlinux; then
14980 
14981   if test "x$BOOT_JDK_FOUND" = xno; then
14982     # Now execute the test
14983 
14984   BOOT_JDK_PREFIX="/usr/lib/jvm"
14985   BOOT_JDK_SUFFIX=""
14986   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14987   if test "x$ALL_JDKS_FOUND" != x; then
14988     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14989 
14990   if test "x$BOOT_JDK_FOUND" = xno; then
14991     # Now execute the test
14992 
14993         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14994         if test -d "$BOOT_JDK"; then
14995           BOOT_JDK_FOUND=maybe
14996           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14997 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14998         fi
14999 
15000 
15001     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15002     if test "x$BOOT_JDK_FOUND" = xmaybe; then
15003       # Do we have a bin/java?
15004       if test ! -x "$BOOT_JDK/bin/java"; then
15005         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15006 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15007         BOOT_JDK_FOUND=no
15008       else
15009         # Do we have a bin/javac?
15010         if test ! -x "$BOOT_JDK/bin/javac"; then
15011           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15012 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15013           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15014 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15015           BOOT_JDK_FOUND=no
15016         else
15017           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15018           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15019             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15020 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15021             BOOT_JDK_FOUND=no
15022           else
15023             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15024             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15025 
15026             # Extra M4 quote needed to protect [] in grep expression.
15027             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15028             if test "x$FOUND_VERSION_78" = x; then
15029               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15030 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15031               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15032 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15033               BOOT_JDK_FOUND=no
15034             else
15035               # We're done! :-)
15036               BOOT_JDK_FOUND=yes
15037 
15038   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15039 
15040   # Input might be given as Windows format, start by converting to
15041   # unix format.
15042   path="$BOOT_JDK"
15043   new_path=`$CYGPATH -u "$path"`
15044 
15045   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15046   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15047   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15048   # "foo.exe" is OK but "foo" is an error.
15049   #
15050   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15051   # It is also a way to make sure we got the proper file name for the real test later on.
15052   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15053   if test "x$test_shortpath" = x; then
15054     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15055 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15056     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15057   fi
15058 
15059   # Call helper function which possibly converts this using DOS-style short mode.
15060   # If so, the updated path is stored in $new_path.
15061 
15062   input_path="$new_path"
15063   # Check if we need to convert this using DOS-style short mode. If the path
15064   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15065   # take no chances and rewrite it.
15066   # Note: m4 eats our [], so we need to use [ and ] instead.
15067   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15068   if test "x$has_forbidden_chars" != x; then
15069     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15070     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15071     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15072     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15073       # Going to short mode and back again did indeed matter. Since short mode is
15074       # case insensitive, let's make it lowercase to improve readability.
15075       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15076       # Now convert it back to Unix-stile (cygpath)
15077       input_path=`$CYGPATH -u "$shortmode_path"`
15078       new_path="$input_path"
15079     fi
15080   fi
15081 
15082   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15083   if test "x$test_cygdrive_prefix" = x; then
15084     # As a simple fix, exclude /usr/bin since it's not a real path.
15085     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15086       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15087       # a path prefixed by /cygdrive for fixpath to work.
15088       new_path="$CYGWIN_ROOT_PATH$input_path"
15089     fi
15090   fi
15091 
15092 
15093   if test "x$path" != "x$new_path"; then
15094     BOOT_JDK="$new_path"
15095     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15096 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15097   fi
15098 
15099   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15100 
15101   path="$BOOT_JDK"
15102   has_colon=`$ECHO $path | $GREP ^.:`
15103   new_path="$path"
15104   if test "x$has_colon" = x; then
15105     # Not in mixed or Windows style, start by that.
15106     new_path=`cmd //c echo $path`
15107   fi
15108 
15109 
15110   input_path="$new_path"
15111   # Check if we need to convert this using DOS-style short mode. If the path
15112   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15113   # take no chances and rewrite it.
15114   # Note: m4 eats our [], so we need to use [ and ] instead.
15115   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15116   if test "x$has_forbidden_chars" != x; then
15117     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15118     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15119   fi
15120 
15121 
15122   windows_path="$new_path"
15123   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15124     unix_path=`$CYGPATH -u "$windows_path"`
15125     new_path="$unix_path"
15126   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15127     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15128     new_path="$unix_path"
15129   fi
15130 
15131   if test "x$path" != "x$new_path"; then
15132     BOOT_JDK="$new_path"
15133     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15134 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15135   fi
15136 
15137   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15138   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15139 
15140   else
15141     # We're on a posix platform. Hooray! :)
15142     path="$BOOT_JDK"
15143 
15144     if test ! -f "$path" && test ! -d "$path"; then
15145       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15146     fi
15147 
15148     has_space=`$ECHO "$path" | $GREP " "`
15149     if test "x$has_space" != x; then
15150       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15151 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15152       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15153     fi
15154   fi
15155 
15156               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15157 $as_echo_n "checking for Boot JDK... " >&6; }
15158               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15159 $as_echo "$BOOT_JDK" >&6; }
15160               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15161 $as_echo_n "checking Boot JDK version... " >&6; }
15162               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15163               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15164 $as_echo "$BOOT_JDK_VERSION" >&6; }
15165             fi # end check jdk version
15166           fi # end check rt.jar
15167         fi # end check javac
15168       fi # end check java
15169     fi # end check boot jdk found
15170   fi
15171 
15172     done
15173   fi
15174 
15175 
15176     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15177     if test "x$BOOT_JDK_FOUND" = xmaybe; then
15178       # Do we have a bin/java?
15179       if test ! -x "$BOOT_JDK/bin/java"; then
15180         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15181 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15182         BOOT_JDK_FOUND=no
15183       else
15184         # Do we have a bin/javac?
15185         if test ! -x "$BOOT_JDK/bin/javac"; then
15186           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15187 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15188           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15189 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15190           BOOT_JDK_FOUND=no
15191         else
15192           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15193           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15194             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15195 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15196             BOOT_JDK_FOUND=no
15197           else
15198             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15199             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15200 
15201             # Extra M4 quote needed to protect [] in grep expression.
15202             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15203             if test "x$FOUND_VERSION_78" = x; then
15204               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15205 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15206               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15207 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15208               BOOT_JDK_FOUND=no
15209             else
15210               # We're done! :-)
15211               BOOT_JDK_FOUND=yes
15212 
15213   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15214 
15215   # Input might be given as Windows format, start by converting to
15216   # unix format.
15217   path="$BOOT_JDK"
15218   new_path=`$CYGPATH -u "$path"`
15219 
15220   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15221   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15222   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15223   # "foo.exe" is OK but "foo" is an error.
15224   #
15225   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15226   # It is also a way to make sure we got the proper file name for the real test later on.
15227   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15228   if test "x$test_shortpath" = x; then
15229     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15230 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15231     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15232   fi
15233 
15234   # Call helper function which possibly converts this using DOS-style short mode.
15235   # If so, the updated path is stored in $new_path.
15236 
15237   input_path="$new_path"
15238   # Check if we need to convert this using DOS-style short mode. If the path
15239   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15240   # take no chances and rewrite it.
15241   # Note: m4 eats our [], so we need to use [ and ] instead.
15242   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15243   if test "x$has_forbidden_chars" != x; then
15244     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15245     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15246     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15247     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15248       # Going to short mode and back again did indeed matter. Since short mode is
15249       # case insensitive, let's make it lowercase to improve readability.
15250       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15251       # Now convert it back to Unix-stile (cygpath)
15252       input_path=`$CYGPATH -u "$shortmode_path"`
15253       new_path="$input_path"
15254     fi
15255   fi
15256 
15257   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15258   if test "x$test_cygdrive_prefix" = x; then
15259     # As a simple fix, exclude /usr/bin since it's not a real path.
15260     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15261       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15262       # a path prefixed by /cygdrive for fixpath to work.
15263       new_path="$CYGWIN_ROOT_PATH$input_path"
15264     fi
15265   fi
15266 
15267 
15268   if test "x$path" != "x$new_path"; then
15269     BOOT_JDK="$new_path"
15270     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15271 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15272   fi
15273 
15274   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15275 
15276   path="$BOOT_JDK"
15277   has_colon=`$ECHO $path | $GREP ^.:`
15278   new_path="$path"
15279   if test "x$has_colon" = x; then
15280     # Not in mixed or Windows style, start by that.
15281     new_path=`cmd //c echo $path`
15282   fi
15283 
15284 
15285   input_path="$new_path"
15286   # Check if we need to convert this using DOS-style short mode. If the path
15287   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15288   # take no chances and rewrite it.
15289   # Note: m4 eats our [], so we need to use [ and ] instead.
15290   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15291   if test "x$has_forbidden_chars" != x; then
15292     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15293     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15294   fi
15295 
15296 
15297   windows_path="$new_path"
15298   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15299     unix_path=`$CYGPATH -u "$windows_path"`
15300     new_path="$unix_path"
15301   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15302     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15303     new_path="$unix_path"
15304   fi
15305 
15306   if test "x$path" != "x$new_path"; then
15307     BOOT_JDK="$new_path"
15308     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15309 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15310   fi
15311 
15312   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15313   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15314 
15315   else
15316     # We're on a posix platform. Hooray! :)
15317     path="$BOOT_JDK"
15318 
15319     if test ! -f "$path" && test ! -d "$path"; then
15320       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15321     fi
15322 
15323     has_space=`$ECHO "$path" | $GREP " "`
15324     if test "x$has_space" != x; then
15325       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15326 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15327       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15328     fi
15329   fi
15330 
15331               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15332 $as_echo_n "checking for Boot JDK... " >&6; }
15333               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15334 $as_echo "$BOOT_JDK" >&6; }
15335               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15336 $as_echo_n "checking Boot JDK version... " >&6; }
15337               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15338               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15339 $as_echo "$BOOT_JDK_VERSION" >&6; }
15340             fi # end check jdk version
15341           fi # end check rt.jar
15342         fi # end check javac
15343       fi # end check java
15344     fi # end check boot jdk found
15345   fi
15346 
15347   fi
15348 
15349 
15350     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15351     if test "x$BOOT_JDK_FOUND" = xmaybe; then
15352       # Do we have a bin/java?
15353       if test ! -x "$BOOT_JDK/bin/java"; then
15354         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15355 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15356         BOOT_JDK_FOUND=no
15357       else
15358         # Do we have a bin/javac?
15359         if test ! -x "$BOOT_JDK/bin/javac"; then
15360           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15361 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15362           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15363 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15364           BOOT_JDK_FOUND=no
15365         else
15366           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15367           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15368             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15369 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15370             BOOT_JDK_FOUND=no
15371           else
15372             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15373             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15374 
15375             # Extra M4 quote needed to protect [] in grep expression.
15376             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15377             if test "x$FOUND_VERSION_78" = x; then
15378               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15379 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15380               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15381 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15382               BOOT_JDK_FOUND=no
15383             else
15384               # We're done! :-)
15385               BOOT_JDK_FOUND=yes
15386 
15387   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15388 
15389   # Input might be given as Windows format, start by converting to
15390   # unix format.
15391   path="$BOOT_JDK"
15392   new_path=`$CYGPATH -u "$path"`
15393 
15394   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15395   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15396   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15397   # "foo.exe" is OK but "foo" is an error.
15398   #
15399   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15400   # It is also a way to make sure we got the proper file name for the real test later on.
15401   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15402   if test "x$test_shortpath" = x; then
15403     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15404 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15405     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15406   fi
15407 
15408   # Call helper function which possibly converts this using DOS-style short mode.
15409   # If so, the updated path is stored in $new_path.
15410 
15411   input_path="$new_path"
15412   # Check if we need to convert this using DOS-style short mode. If the path
15413   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15414   # take no chances and rewrite it.
15415   # Note: m4 eats our [], so we need to use [ and ] instead.
15416   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15417   if test "x$has_forbidden_chars" != x; then
15418     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15419     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15420     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15421     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15422       # Going to short mode and back again did indeed matter. Since short mode is
15423       # case insensitive, let's make it lowercase to improve readability.
15424       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15425       # Now convert it back to Unix-stile (cygpath)
15426       input_path=`$CYGPATH -u "$shortmode_path"`
15427       new_path="$input_path"
15428     fi
15429   fi
15430 
15431   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15432   if test "x$test_cygdrive_prefix" = x; then
15433     # As a simple fix, exclude /usr/bin since it's not a real path.
15434     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15435       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15436       # a path prefixed by /cygdrive for fixpath to work.
15437       new_path="$CYGWIN_ROOT_PATH$input_path"
15438     fi
15439   fi
15440 
15441 
15442   if test "x$path" != "x$new_path"; then
15443     BOOT_JDK="$new_path"
15444     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15445 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15446   fi
15447 
15448   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15449 
15450   path="$BOOT_JDK"
15451   has_colon=`$ECHO $path | $GREP ^.:`
15452   new_path="$path"
15453   if test "x$has_colon" = x; then
15454     # Not in mixed or Windows style, start by that.
15455     new_path=`cmd //c echo $path`
15456   fi
15457 
15458 
15459   input_path="$new_path"
15460   # Check if we need to convert this using DOS-style short mode. If the path
15461   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15462   # take no chances and rewrite it.
15463   # Note: m4 eats our [], so we need to use [ and ] instead.
15464   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15465   if test "x$has_forbidden_chars" != x; then
15466     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15467     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15468   fi
15469 
15470 
15471   windows_path="$new_path"
15472   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15473     unix_path=`$CYGPATH -u "$windows_path"`
15474     new_path="$unix_path"
15475   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15476     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15477     new_path="$unix_path"
15478   fi
15479 
15480   if test "x$path" != "x$new_path"; then
15481     BOOT_JDK="$new_path"
15482     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15483 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15484   fi
15485 
15486   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15487   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15488 
15489   else
15490     # We're on a posix platform. Hooray! :)
15491     path="$BOOT_JDK"
15492 
15493     if test ! -f "$path" && test ! -d "$path"; then
15494       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15495     fi
15496 
15497     has_space=`$ECHO "$path" | $GREP " "`
15498     if test "x$has_space" != x; then
15499       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15500 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15501       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15502     fi
15503   fi
15504 
15505               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15506 $as_echo_n "checking for Boot JDK... " >&6; }
15507               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15508 $as_echo "$BOOT_JDK" >&6; }
15509               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15510 $as_echo_n "checking Boot JDK version... " >&6; }
15511               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15512               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15513 $as_echo "$BOOT_JDK_VERSION" >&6; }
15514             fi # end check jdk version
15515           fi # end check rt.jar
15516         fi # end check javac
15517       fi # end check java
15518     fi # end check boot jdk found
15519   fi
15520 
15521 
15522 # If we haven't found anything yet, we've truly lost. Give up.
15523 if test "x$BOOT_JDK_FOUND" = xno; then
15524 
15525     # Print a helpful message on how to acquire the necessary build dependency.
15526     # openjdk is the help tag: freetyp2, cups, pulse, alsa etc
15527     MISSING_DEPENDENCY=openjdk
15528     PKGHANDLER_COMMAND=
15529 
15530     case $PKGHANDLER in
15531         apt-get)
15532                 apt_help     $MISSING_DEPENDENCY ;;
15533     yum)
15534                 yum_help     $MISSING_DEPENDENCY ;;
15535         port)
15536                 port_help    $MISSING_DEPENDENCY ;;
15537         pkgutil)
15538                 pkgutil_help $MISSING_DEPENDENCY ;;
15539         pkgadd)
15540                 pkgadd_help  $MISSING_DEPENDENCY ;;
15541     * )
15542       break ;;
15543     esac
15544 
15545     if test "x$PKGHANDLER_COMMAND" != x; then
15546         HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
15547     fi
15548 
15549   { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
15550 $as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
15551   { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
15552 $as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15553   as_fn_error $? "Cannot continue" "$LINENO" 5
15554 fi
15555 
15556 # Setup proper paths for what we found
15557 BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
15558 if test ! -f "$BOOT_RTJAR"; then
15559     # On MacOSX it is called classes.jar
15560     BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
15561     if test -f "$BOOT_RTJAR"; then
15562       # Remove the ..
15563       BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
15564     fi
15565 fi
15566 BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
15567 BOOT_JDK="$BOOT_JDK"
15568 
15569 
15570 
15571 
15572 # Setup tools from the Boot JDK.
15573 
15574   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
15575 $as_echo_n "checking for java in Boot JDK... " >&6; }
15576   JAVA=$BOOT_JDK/bin/java
15577   if test ! -x $JAVA; then
15578       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15579 $as_echo "not found" >&6; }
15580       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15581 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15582       as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
15583   fi
15584   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15585 $as_echo "ok" >&6; }
15586 
15587 
15588   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
15589 $as_echo_n "checking for javac in Boot JDK... " >&6; }
15590   JAVAC=$BOOT_JDK/bin/javac
15591   if test ! -x $JAVAC; then
15592       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15593 $as_echo "not found" >&6; }
15594       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15595 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15596       as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
15597   fi
15598   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15599 $as_echo "ok" >&6; }
15600 
15601 
15602   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
15603 $as_echo_n "checking for javah in Boot JDK... " >&6; }
15604   JAVAH=$BOOT_JDK/bin/javah
15605   if test ! -x $JAVAH; then
15606       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15607 $as_echo "not found" >&6; }
15608       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15609 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15610       as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
15611   fi
15612   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15613 $as_echo "ok" >&6; }
15614 
15615 
15616   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
15617 $as_echo_n "checking for javap in Boot JDK... " >&6; }
15618   JAVAP=$BOOT_JDK/bin/javap
15619   if test ! -x $JAVAP; then
15620       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15621 $as_echo "not found" >&6; }
15622       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15623 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15624       as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
15625   fi
15626   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15627 $as_echo "ok" >&6; }
15628 
15629 
15630   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
15631 $as_echo_n "checking for jar in Boot JDK... " >&6; }
15632   JAR=$BOOT_JDK/bin/jar
15633   if test ! -x $JAR; then
15634       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15635 $as_echo "not found" >&6; }
15636       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15637 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15638       as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
15639   fi
15640   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15641 $as_echo "ok" >&6; }
15642 
15643 
15644   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
15645 $as_echo_n "checking for rmic in Boot JDK... " >&6; }
15646   RMIC=$BOOT_JDK/bin/rmic
15647   if test ! -x $RMIC; then
15648       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15649 $as_echo "not found" >&6; }
15650       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15651 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15652       as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
15653   fi
15654   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15655 $as_echo "ok" >&6; }
15656 
15657 
15658   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
15659 $as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
15660   NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
15661   if test ! -x $NATIVE2ASCII; then
15662       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15663 $as_echo "not found" >&6; }
15664       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15665 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15666       as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
15667   fi
15668   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15669 $as_echo "ok" >&6; }
15670 
15671 
15672 # Finally, set some other options...
15673 
15674 # When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
15675 BOOT_JDK_SOURCETARGET="-source 7 -target 7"
15676 
15677 
15678 
15679 
15680 ##############################################################################
15681 #
15682 # Specify options for anything that is run with the Boot JDK.
15683 #
15684 
15685 # Check whether --with-boot-jdk-jvmargs was given.
15686 if test "${with_boot_jdk_jvmargs+set}" = set; then :
15687   withval=$with_boot_jdk_jvmargs;
15688 fi
15689 
15690 
15691 if test "x$with_boot_jdk_jvmargs" = x; then
15692     # Not all JVM:s accept the same arguments on the command line.
15693     # OpenJDK specific increase in thread stack for JDK build,
15694     # well more specifically, when running javac.
15695     if test "x$BUILD_NUM_BITS" = x32; then
15696        STACK_SIZE=768
15697     else
15698        # Running Javac on a JVM on a 64-bit machine, the stack takes more space
15699        # since 64-bit pointers are pushed on the stach. Apparently, we need
15700        # to increase the stack space when javacing the JDK....
15701        STACK_SIZE=1536
15702     fi
15703 
15704     # Minimum amount of heap memory.
15705 
15706     # Test if -Xms64M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15707     # If so, then append -Xms64M to boot_jdk_jvmargs
15708     FOUND_WARN=`$JAVA -Xms64M -version 2>&1 | grep -i warn`
15709     FOUND_VERSION=`$JAVA -Xms64M -version 2>&1 | grep " version \""`
15710     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15711         boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
15712     fi
15713 
15714     if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15715         # Why does macosx need more heap? Its the huge JDK batch.
15716 
15717     # Test if -Xmx1600M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15718     # If so, then append -Xmx1600M to boot_jdk_jvmargs
15719     FOUND_WARN=`$JAVA -Xmx1600M -version 2>&1 | grep -i warn`
15720     FOUND_VERSION=`$JAVA -Xmx1600M -version 2>&1 | grep " version \""`
15721     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15722         boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
15723     fi
15724 
15725     else
15726 
15727     # Test if -Xmx1100M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15728     # If so, then append -Xmx1100M to boot_jdk_jvmargs
15729     FOUND_WARN=`$JAVA -Xmx1100M -version 2>&1 | grep -i warn`
15730     FOUND_VERSION=`$JAVA -Xmx1100M -version 2>&1 | grep " version \""`
15731     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15732         boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
15733     fi
15734 
15735     fi
15736     # When is adding -client something that speeds up the JVM?
15737     # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
15738 
15739     # Test if -XX:PermSize=32m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15740     # If so, then append -XX:PermSize=32m to boot_jdk_jvmargs
15741     FOUND_WARN=`$JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
15742     FOUND_VERSION=`$JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
15743     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15744         boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
15745     fi
15746 
15747 
15748     # Test if -XX:MaxPermSize=160m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15749     # If so, then append -XX:MaxPermSize=160m to boot_jdk_jvmargs
15750     FOUND_WARN=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
15751     FOUND_VERSION=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
15752     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15753         boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
15754     fi
15755 
15756 
15757     # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15758     # If so, then append -XX:ThreadStackSize=$STACK_SIZE to boot_jdk_jvmargs
15759     FOUND_WARN=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
15760     FOUND_VERSION=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
15761     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15762         boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
15763     fi
15764 
15765     # Disable special log output when a debug build is used as Boot JDK...
15766 
15767     # Test if -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15768     # If so, then append -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput to boot_jdk_jvmargs
15769     FOUND_WARN=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep -i warn`
15770     FOUND_VERSION=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep " version \""`
15771     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15772         boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
15773     fi
15774 
15775 fi
15776 
15777 BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
15778 
15779 
15780 
15781 ###############################################################################
15782 #
15783 # Configure the sources to use. We can add or override individual directories.
15784 #
15785 ###############################################################################
15786 
15787 
15788 
15789 # Where are the sources. Any of these can be overridden
15790 # using --with-override-corba and the likes.
15791 LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
15792 CORBA_TOPDIR="$SRC_ROOT/corba"
15793 JAXP_TOPDIR="$SRC_ROOT/jaxp"
15794 JAXWS_TOPDIR="$SRC_ROOT/jaxws"
15795 HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
15796 NASHORN_TOPDIR="$SRC_ROOT/nashorn"
15797 JDK_TOPDIR="$SRC_ROOT/jdk"
15798 
15799 
15800 
15801 
15802 
15803 
15804 
15805 
15806 
15807 
15808 ###############################################################################
15809 #
15810 # Pickup additional source for a component from outside of the source root
15811 # or override source for a component.
15812 #
15813 
15814 # Check whether --with-add-source-root was given.
15815 if test "${with_add_source_root+set}" = set; then :
15816   withval=$with_add_source_root;
15817 fi
15818 
15819 
15820 
15821 # Check whether --with-override-source-root was given.
15822 if test "${with_override_source_root+set}" = set; then :
15823   withval=$with_override_source_root;
15824 fi
15825 
15826 
15827 
15828 # Check whether --with-adds-and-overrides was given.
15829 if test "${with_adds_and_overrides+set}" = set; then :
15830   withval=$with_adds_and_overrides;
15831 fi
15832 
15833 
15834 if test "x$with_adds_and_overrides" != x; then
15835     with_add_source_root="$with_adds_and_overrides/adds"
15836     with_override_source_root="$with_adds_and_overrides/overrides"
15837 fi
15838 
15839 if test "x$with_add_source_root" != x; then
15840     if ! test -d $with_add_source_root; then
15841        as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
15842     fi
15843     CURDIR="$PWD"
15844     cd "$with_add_source_root"
15845     ADD_SRC_ROOT="`pwd`"
15846     cd "$CURDIR"
15847     # Verify that the addon source root does not have any root makefiles.
15848     # If it does, then it is usually an error, prevent this.
15849     if test -f $with_add_source_root/langtools/makefiles/Makefile || \
15850        test -f $with_add_source_root/langtools/make/Makefile; then
15851         as_fn_error $? "Your add source root seems to contain a full langtools repo! An add source root should only contain additional sources." "$LINENO" 5
15852     fi
15853     if test -f $with_add_source_root/corba/makefiles/Makefile || \
15854        test -f $with_add_source_root/corba/make/Makefile; then
15855         as_fn_error $? "Your add source root seems to contain a full corba repo! An add source root should only contain additional sources." "$LINENO" 5
15856     fi
15857     if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
15858        test -f $with_add_source_root/jaxp/make/Makefile; then
15859         as_fn_error $? "Your add source root seems to contain a full jaxp repo! An add source root should only contain additional sources." "$LINENO" 5
15860     fi
15861     if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
15862        test -f $with_add_source_root/jaxws/make/Makefile; then
15863         as_fn_error $? "Your add source root seems to contain a full jaxws repo! An add source root should only contain additional sources." "$LINENO" 5
15864     fi
15865     if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
15866        test -f $with_add_source_root/hotspot/make/Makefile; then
15867         as_fn_error $? "Your add source root seems to contain a full hotspot repo! An add source root should only contain additional sources." "$LINENO" 5
15868     fi
15869     if test -f $with_add_source_root/jdk/makefiles/Makefile || \
15870        test -f $with_add_source_root/jdk/make/Makefile; then
15871         as_fn_error $? "Your add source root seems to contain a full JDK repo! An add source root should only contain additional sources." "$LINENO" 5
15872     fi
15873 fi
15874 
15875 
15876 if test "x$with_override_source_root" != x; then
15877     if ! test -d $with_override_source_root; then
15878        as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
15879     fi
15880     CURDIR="$PWD"
15881     cd "$with_override_source_root"
15882     OVERRIDE_SRC_ROOT="`pwd`"
15883     cd "$CURDIR"
15884     if test -f $with_override_source_root/langtools/makefiles/Makefile || \
15885        test -f $with_override_source_root/langtools/make/Makefile; then
15886         as_fn_error $? "Your override source root seems to contain a full langtools repo! An override source root should only contain sources that override." "$LINENO" 5
15887     fi
15888     if test -f $with_override_source_root/corba/makefiles/Makefile || \
15889        test -f $with_override_source_root/corba/make/Makefile; then
15890         as_fn_error $? "Your override source root seems to contain a full corba repo! An override source root should only contain sources that override." "$LINENO" 5
15891     fi
15892     if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
15893        test -f $with_override_source_root/jaxp/make/Makefile; then
15894         as_fn_error $? "Your override source root seems to contain a full jaxp repo! An override source root should only contain sources that override." "$LINENO" 5
15895     fi
15896     if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
15897        test -f $with_override_source_root/jaxws/make/Makefile; then
15898         as_fn_error $? "Your override source root seems to contain a full jaxws repo! An override source root should only contain sources that override." "$LINENO" 5
15899     fi
15900     if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
15901        test -f $with_override_source_root/hotspot/make/Makefile; then
15902         as_fn_error $? "Your override source root seems to contain a full hotspot repo! An override source root should only contain sources that override." "$LINENO" 5
15903     fi
15904     if test -f $with_override_source_root/jdk/makefiles/Makefile || \
15905        test -f $with_override_source_root/jdk/make/Makefile; then
15906         as_fn_error $? "Your override source root seems to contain a full JDK repo! An override source root should only contain sources that override." "$LINENO" 5
15907     fi
15908 fi
15909 
15910 
15911 ###############################################################################
15912 #
15913 # Override a repo completely, this is used for example when you have 3 small
15914 # development sandboxes of the langtools sources and want to avoid having 3 full
15915 # OpenJDK sources checked out on disk.
15916 #
15917 # Assuming that the 3 langtools sandboxes are located here:
15918 # /home/fredrik/sandbox1/langtools
15919 # /home/fredrik/sandbox2/langtools
15920 # /home/fredrik/sandbox3/langtools
15921 #
15922 # From the source root you create build subdirs manually:
15923 #     mkdir -p build1 build2 build3
15924 # in each build directory run:
15925 #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
15926 #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
15927 #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
15928 #
15929 
15930 
15931 # Check whether --with-override-langtools was given.
15932 if test "${with_override_langtools+set}" = set; then :
15933   withval=$with_override_langtools;
15934 fi
15935 
15936 
15937 
15938 # Check whether --with-override-corba was given.
15939 if test "${with_override_corba+set}" = set; then :
15940   withval=$with_override_corba;
15941 fi
15942 
15943 
15944 
15945 # Check whether --with-override-jaxp was given.
15946 if test "${with_override_jaxp+set}" = set; then :
15947   withval=$with_override_jaxp;
15948 fi
15949 
15950 
15951 
15952 # Check whether --with-override-jaxws was given.
15953 if test "${with_override_jaxws+set}" = set; then :
15954   withval=$with_override_jaxws;
15955 fi
15956 
15957 
15958 
15959 # Check whether --with-override-hotspot was given.
15960 if test "${with_override_hotspot+set}" = set; then :
15961   withval=$with_override_hotspot;
15962 fi
15963 
15964 
15965 
15966 # Check whether --with-override-jdk was given.
15967 if test "${with_override_jdk+set}" = set; then :
15968   withval=$with_override_jdk;
15969 fi
15970 
15971 
15972 if test "x$with_override_langtools" != x; then
15973     CURDIR="$PWD"
15974     cd "$with_override_langtools"
15975     LANGTOOLS_TOPDIR="`pwd`"
15976     cd "$CURDIR"
15977     if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
15978         as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
15979     fi
15980     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
15981 $as_echo_n "checking if langtools should be overridden... " >&6; }
15982     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
15983 $as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
15984 fi
15985 if test "x$with_override_corba" != x; then
15986     CURDIR="$PWD"
15987     cd "$with_override_corba"
15988     CORBA_TOPDIR="`pwd`"
15989     cd "$CURDIR"
15990     if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
15991         as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
15992     fi
15993     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
15994 $as_echo_n "checking if corba should be overridden... " >&6; }
15995     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
15996 $as_echo "yes with $CORBA_TOPDIR" >&6; }
15997 fi
15998 if test "x$with_override_jaxp" != x; then
15999     CURDIR="$PWD"
16000     cd "$with_override_jaxp"
16001     JAXP_TOPDIR="`pwd`"
16002     cd "$CURDIR"
16003     if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
16004         as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
16005     fi
16006     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
16007 $as_echo_n "checking if jaxp should be overridden... " >&6; }
16008     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
16009 $as_echo "yes with $JAXP_TOPDIR" >&6; }
16010 fi
16011 if test "x$with_override_jaxws" != x; then
16012     CURDIR="$PWD"
16013     cd "$with_override_jaxws"
16014     JAXWS_TOPDIR="`pwd`"
16015     cd "$CURDIR"
16016     if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
16017         as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
16018     fi
16019     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
16020 $as_echo_n "checking if jaxws should be overridden... " >&6; }
16021     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
16022 $as_echo "yes with $JAXWS_TOPDIR" >&6; }
16023 fi
16024 if test "x$with_override_hotspot" != x; then
16025     CURDIR="$PWD"
16026     cd "$with_override_hotspot"
16027     HOTSPOT_TOPDIR="`pwd`"
16028     cd "$CURDIR"
16029     if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
16030        ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
16031         as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
16032     fi
16033     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
16034 $as_echo_n "checking if hotspot should be overridden... " >&6; }
16035     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
16036 $as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
16037 fi
16038 if test "x$with_override_nashorn" != x; then
16039     CURDIR="$PWD"
16040     cd "$with_override_nashorn"
16041     NASHORN_TOPDIR="`pwd`"
16042     cd "$CURDIR"
16043     if ! test -f $NASHORN_TOPDIR/makefiles/BuildNashorn.gmk; then
16044         as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
16045     fi
16046     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
16047 $as_echo_n "checking if nashorn should be overridden... " >&6; }
16048     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
16049 $as_echo "yes with $NASHORN_TOPDIR" >&6; }
16050 fi
16051 if test "x$with_override_jdk" != x; then
16052     CURDIR="$PWD"
16053     cd "$with_override_jdk"
16054     JDK_TOPDIR="`pwd`"
16055     cd "$CURDIR"
16056     if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
16057         as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
16058     fi
16059     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
16060 $as_echo_n "checking if JDK should be overridden... " >&6; }
16061     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
16062 $as_echo "yes with $JDK_TOPDIR" >&6; }
16063 fi
16064 
16065 
16066 
16067 BUILD_OUTPUT="$OUTPUT_ROOT"
16068 
16069 
16070 HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
16071 BUILD_HOTSPOT=true
16072 
16073 
16074 
16075 # Check whether --with-import-hotspot was given.
16076 if test "${with_import_hotspot+set}" = set; then :
16077   withval=$with_import_hotspot;
16078 fi
16079 
16080 if test "x$with_import_hotspot" != x; then
16081     CURDIR="$PWD"
16082     cd "$with_import_hotspot"
16083     HOTSPOT_DIST="`pwd`"
16084     cd "$CURDIR"
16085     if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
16086         as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
16087     fi
16088     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
16089 $as_echo_n "checking if hotspot should be imported... " >&6; }
16090     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
16091 $as_echo "yes from $HOTSPOT_DIST" >&6; }
16092     BUILD_HOTSPOT=false
16093 fi
16094 
16095 JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
16096 
16097 
16098 ###############################################################################
16099 #
16100 # Setup the toolchain (compilers etc), i.e. the tools that need to be
16101 # cross-compilation aware.
16102 #
16103 ###############################################################################
16104 
16105 
16106 ###############################################################################
16107 #
16108 # Configure the development tool paths and potential sysroot.
16109 #
16110 ac_ext=cpp
16111 ac_cpp='$CXXCPP $CPPFLAGS'
16112 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16113 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16114 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16115 
16116 
16117 # The option used to specify the target .o,.a or .so file.
16118 # When compiling, how to specify the to be created object file.
16119 CC_OUT_OPTION='-o$(SPACE)'
16120 # When linking, how to specify the to be created executable.
16121 EXE_OUT_OPTION='-o$(SPACE)'
16122 # When linking, how to specify the to be created dynamically linkable library.
16123 LD_OUT_OPTION='-o$(SPACE)'
16124 # When archiving, how to specify the to be create static archive for object files.
16125 AR_OUT_OPTION='rcs$(SPACE)'
16126 
16127 
16128 
16129 
16130 
16131 # Locate the actual tools
16132 
16133 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16134 
16135   # Store path to cygwin link.exe to help excluding it when searching for
16136   # VS linker. This must be done before changing the PATH when looking for VS.
16137   # Extract the first word of "link", so it can be a program name with args.
16138 set dummy link; ac_word=$2
16139 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16140 $as_echo_n "checking for $ac_word... " >&6; }
16141 if test "${ac_cv_path_CYGWIN_LINK+set}" = set; then :
16142   $as_echo_n "(cached) " >&6
16143 else
16144   case $CYGWIN_LINK in
16145   [\\/]* | ?:[\\/]*)
16146   ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
16147   ;;
16148   *)
16149   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16150 for as_dir in $PATH
16151 do
16152   IFS=$as_save_IFS
16153   test -z "$as_dir" && as_dir=.
16154     for ac_exec_ext in '' $ac_executable_extensions; do
16155   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16156     ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
16157     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16158     break 2
16159   fi
16160 done
16161   done
16162 IFS=$as_save_IFS
16163 
16164   ;;
16165 esac
16166 fi
16167 CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
16168 if test -n "$CYGWIN_LINK"; then
16169   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
16170 $as_echo "$CYGWIN_LINK" >&6; }
16171 else
16172   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16173 $as_echo "no" >&6; }
16174 fi
16175 
16176 
16177   if test "x$CYGWIN_LINK" != x; then
16178     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
16179 $as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
16180     "$CYGWIN_LINK" --version > /dev/null
16181     if test $? -eq 0 ; then
16182       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16183 $as_echo "yes" >&6; }
16184     else
16185       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16186 $as_echo "no" >&6; }
16187       # This might be the VS linker. Don't exclude it later on.
16188       CYGWIN_LINK=""
16189     fi
16190   fi
16191 
16192   # First-hand choice is to locate and run the vsvars bat file.
16193 
16194   if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16195     VCVARSFILE="vc/bin/vcvars32.bat"
16196   else
16197     VCVARSFILE="vc/bin/amd64/vcvars64.bat"
16198   fi
16199 
16200   VS_ENV_CMD=""
16201   VS_ENV_ARGS=""
16202   if test "x$with_toolsdir" != x; then
16203 
16204   if test "x$VS_ENV_CMD" = x; then
16205     VS100BASE="$with_toolsdir/../.."
16206     METHOD="--with-tools-dir"
16207 
16208   windows_path="$VS100BASE"
16209   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16210     unix_path=`$CYGPATH -u "$windows_path"`
16211     VS100BASE="$unix_path"
16212   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16213     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16214     VS100BASE="$unix_path"
16215   fi
16216 
16217     if test -d "$VS100BASE"; then
16218       if test -f "$VS100BASE/$VCVARSFILE"; then
16219         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16220 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16221         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16222       else
16223         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16224 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16225         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16226 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16227       fi
16228     fi
16229   fi
16230 
16231   fi
16232 
16233   if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
16234     # Having specified an argument which is incorrect will produce an instant failure;
16235     # we should not go on looking
16236     { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
16237 $as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
16238     { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
16239 $as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
16240     as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
16241   fi
16242 
16243   if test "x$ProgramW6432" != x; then
16244 
16245   if test "x$VS_ENV_CMD" = x; then
16246     WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
16247     METHOD="well-known name"
16248 
16249   windows_path="$WIN_SDK_BASE"
16250   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16251     unix_path=`$CYGPATH -u "$windows_path"`
16252     WIN_SDK_BASE="$unix_path"
16253   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16254     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16255     WIN_SDK_BASE="$unix_path"
16256   fi
16257 
16258     if test -d "$WIN_SDK_BASE"; then
16259       # There have been cases of partial or broken SDK installations. A missing
16260       # lib dir is not going to work.
16261       if test ! -d "$WIN_SDK_BASE/../lib"; then
16262         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16263 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16264         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16265 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16266       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16267         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16268 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16269         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16270         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16271           VS_ENV_ARGS="/x86"
16272         else
16273           VS_ENV_ARGS="/x64"
16274         fi
16275       else
16276         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16277 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16278         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16279 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16280       fi
16281     fi
16282   fi
16283 
16284   fi
16285   if test "x$PROGRAMW6432" != x; then
16286 
16287   if test "x$VS_ENV_CMD" = x; then
16288     WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
16289     METHOD="well-known name"
16290 
16291   windows_path="$WIN_SDK_BASE"
16292   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16293     unix_path=`$CYGPATH -u "$windows_path"`
16294     WIN_SDK_BASE="$unix_path"
16295   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16296     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16297     WIN_SDK_BASE="$unix_path"
16298   fi
16299 
16300     if test -d "$WIN_SDK_BASE"; then
16301       # There have been cases of partial or broken SDK installations. A missing
16302       # lib dir is not going to work.
16303       if test ! -d "$WIN_SDK_BASE/../lib"; then
16304         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16305 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16306         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16307 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16308       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16309         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16310 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16311         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16312         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16313           VS_ENV_ARGS="/x86"
16314         else
16315           VS_ENV_ARGS="/x64"
16316         fi
16317       else
16318         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16319 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16320         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16321 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16322       fi
16323     fi
16324   fi
16325 
16326   fi
16327   if test "x$PROGRAMFILES" != x; then
16328 
16329   if test "x$VS_ENV_CMD" = x; then
16330     WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
16331     METHOD="well-known name"
16332 
16333   windows_path="$WIN_SDK_BASE"
16334   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16335     unix_path=`$CYGPATH -u "$windows_path"`
16336     WIN_SDK_BASE="$unix_path"
16337   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16338     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16339     WIN_SDK_BASE="$unix_path"
16340   fi
16341 
16342     if test -d "$WIN_SDK_BASE"; then
16343       # There have been cases of partial or broken SDK installations. A missing
16344       # lib dir is not going to work.
16345       if test ! -d "$WIN_SDK_BASE/../lib"; then
16346         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16347 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16348         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16349 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16350       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16351         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16352 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16353         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16354         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16355           VS_ENV_ARGS="/x86"
16356         else
16357           VS_ENV_ARGS="/x64"
16358         fi
16359       else
16360         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16361 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16362         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16363 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16364       fi
16365     fi
16366   fi
16367 
16368   fi
16369 
16370   if test "x$VS_ENV_CMD" = x; then
16371     WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
16372     METHOD="well-known name"
16373 
16374   windows_path="$WIN_SDK_BASE"
16375   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16376     unix_path=`$CYGPATH -u "$windows_path"`
16377     WIN_SDK_BASE="$unix_path"
16378   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16379     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16380     WIN_SDK_BASE="$unix_path"
16381   fi
16382 
16383     if test -d "$WIN_SDK_BASE"; then
16384       # There have been cases of partial or broken SDK installations. A missing
16385       # lib dir is not going to work.
16386       if test ! -d "$WIN_SDK_BASE/../lib"; then
16387         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16388 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16389         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16390 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16391       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16392         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16393 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16394         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16395         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16396           VS_ENV_ARGS="/x86"
16397         else
16398           VS_ENV_ARGS="/x64"
16399         fi
16400       else
16401         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16402 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16403         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16404 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16405       fi
16406     fi
16407   fi
16408 
16409 
16410   if test "x$VS_ENV_CMD" = x; then
16411     WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
16412     METHOD="well-known name"
16413 
16414   windows_path="$WIN_SDK_BASE"
16415   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16416     unix_path=`$CYGPATH -u "$windows_path"`
16417     WIN_SDK_BASE="$unix_path"
16418   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16419     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16420     WIN_SDK_BASE="$unix_path"
16421   fi
16422 
16423     if test -d "$WIN_SDK_BASE"; then
16424       # There have been cases of partial or broken SDK installations. A missing
16425       # lib dir is not going to work.
16426       if test ! -d "$WIN_SDK_BASE/../lib"; then
16427         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16428 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16429         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16430 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16431       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16432         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16433 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16434         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16435         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16436           VS_ENV_ARGS="/x86"
16437         else
16438           VS_ENV_ARGS="/x64"
16439         fi
16440       else
16441         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16442 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16443         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16444 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16445       fi
16446     fi
16447   fi
16448 
16449 
16450   if test "x$VS100COMNTOOLS" != x; then
16451 
16452   if test "x$VS_ENV_CMD" = x; then
16453     VS100BASE="$VS100COMNTOOLS/../.."
16454     METHOD="VS100COMNTOOLS variable"
16455 
16456   windows_path="$VS100BASE"
16457   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16458     unix_path=`$CYGPATH -u "$windows_path"`
16459     VS100BASE="$unix_path"
16460   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16461     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16462     VS100BASE="$unix_path"
16463   fi
16464 
16465     if test -d "$VS100BASE"; then
16466       if test -f "$VS100BASE/$VCVARSFILE"; then
16467         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16468 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16469         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16470       else
16471         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16472 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16473         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16474 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16475       fi
16476     fi
16477   fi
16478 
16479   fi
16480   if test "x$PROGRAMFILES" != x; then
16481 
16482   if test "x$VS_ENV_CMD" = x; then
16483     VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
16484     METHOD="well-known name"
16485 
16486   windows_path="$VS100BASE"
16487   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16488     unix_path=`$CYGPATH -u "$windows_path"`
16489     VS100BASE="$unix_path"
16490   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16491     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16492     VS100BASE="$unix_path"
16493   fi
16494 
16495     if test -d "$VS100BASE"; then
16496       if test -f "$VS100BASE/$VCVARSFILE"; then
16497         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16498 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16499         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16500       else
16501         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16502 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16503         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16504 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16505       fi
16506     fi
16507   fi
16508 
16509   fi
16510 
16511   if test "x$VS_ENV_CMD" = x; then
16512     VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
16513     METHOD="well-known name"
16514 
16515   windows_path="$VS100BASE"
16516   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16517     unix_path=`$CYGPATH -u "$windows_path"`
16518     VS100BASE="$unix_path"
16519   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16520     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16521     VS100BASE="$unix_path"
16522   fi
16523 
16524     if test -d "$VS100BASE"; then
16525       if test -f "$VS100BASE/$VCVARSFILE"; then
16526         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16527 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16528         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16529       else
16530         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16531 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16532         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16533 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16534       fi
16535     fi
16536   fi
16537 
16538 
16539   if test "x$VS_ENV_CMD" = x; then
16540     VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
16541     METHOD="well-known name"
16542 
16543   windows_path="$VS100BASE"
16544   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16545     unix_path=`$CYGPATH -u "$windows_path"`
16546     VS100BASE="$unix_path"
16547   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16548     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16549     VS100BASE="$unix_path"
16550   fi
16551 
16552     if test -d "$VS100BASE"; then
16553       if test -f "$VS100BASE/$VCVARSFILE"; then
16554         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16555 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16556         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16557       else
16558         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16559 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16560         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16561 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16562       fi
16563     fi
16564   fi
16565 
16566 
16567   if test "x$VS_ENV_CMD" != x; then
16568     # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
16569 
16570   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16571 
16572   # First separate the path from the arguments. This will split at the first
16573   # space.
16574   complete="$VS_ENV_CMD"
16575   path="${complete%% *}"
16576   tmp="$complete EOL"
16577   arguments="${tmp#* }"
16578 
16579   # Input might be given as Windows format, start by converting to
16580   # unix format.
16581   new_path=`$CYGPATH -u "$path"`
16582 
16583   # Now try to locate executable using which
16584   new_path=`$WHICH "$new_path" 2> /dev/null`
16585   # bat and cmd files are not always considered executable in cygwin causing which
16586   # to not find them
16587   if test "x$new_path" = x \
16588            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16589            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16590     new_path=`$CYGPATH -u "$path"`
16591   fi
16592   if test "x$new_path" = x; then
16593     # Oops. Which didn't find the executable.
16594     # The splitting of arguments from the executable at a space might have been incorrect,
16595     # since paths with space are more likely in Windows. Give it another try with the whole
16596     # argument.
16597     path="$complete"
16598     arguments="EOL"
16599     new_path=`$CYGPATH -u "$path"`
16600     new_path=`$WHICH "$new_path" 2> /dev/null`
16601     # bat and cmd files are not always considered executable in cygwin causing which
16602     # to not find them
16603     if test "x$new_path" = x \
16604              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16605              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16606       new_path=`$CYGPATH -u "$path"`
16607     fi
16608     if test "x$new_path" = x; then
16609       # It's still not found. Now this is an unrecoverable error.
16610       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16611 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16612       has_space=`$ECHO "$complete" | $GREP " "`
16613       if test "x$has_space" != x; then
16614         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16615 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16616       fi
16617       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16618     fi
16619   fi
16620 
16621   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16622   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16623   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16624   # "foo.exe" is OK but "foo" is an error.
16625   #
16626   # This test is therefore slightly more accurate than "test -f" to check for file precense.
16627   # It is also a way to make sure we got the proper file name for the real test later on.
16628   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16629   if test "x$test_shortpath" = x; then
16630     # Short path failed, file does not exist as specified.
16631     # Try adding .exe or .cmd
16632     if test -f "${new_path}.exe"; then
16633        input_to_shortpath="${new_path}.exe"
16634     elif test -f "${new_path}.cmd"; then
16635        input_to_shortpath="${new_path}.cmd"
16636     else
16637       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
16638 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
16639       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16640 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16641       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16642     fi
16643   else
16644     input_to_shortpath="$new_path"
16645   fi
16646 
16647   # Call helper function which possibly converts this using DOS-style short mode.
16648   # If so, the updated path is stored in $new_path.
16649   new_path="$input_to_shortpath"
16650 
16651   input_path="$input_to_shortpath"
16652   # Check if we need to convert this using DOS-style short mode. If the path
16653   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16654   # take no chances and rewrite it.
16655   # Note: m4 eats our [], so we need to use [ and ] instead.
16656   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16657   if test "x$has_forbidden_chars" != x; then
16658     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16659     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16660     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16661     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16662       # Going to short mode and back again did indeed matter. Since short mode is
16663       # case insensitive, let's make it lowercase to improve readability.
16664       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16665       # Now convert it back to Unix-stile (cygpath)
16666       input_path=`$CYGPATH -u "$shortmode_path"`
16667       new_path="$input_path"
16668     fi
16669   fi
16670 
16671   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16672   if test "x$test_cygdrive_prefix" = x; then
16673     # As a simple fix, exclude /usr/bin since it's not a real path.
16674     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16675       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16676       # a path prefixed by /cygdrive for fixpath to work.
16677       new_path="$CYGWIN_ROOT_PATH$input_path"
16678     fi
16679   fi
16680 
16681   # remove trailing .exe if any
16682   new_path="${new_path/%.exe/}"
16683 
16684   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16685 
16686   # First separate the path from the arguments. This will split at the first
16687   # space.
16688   complete="$VS_ENV_CMD"
16689   path="${complete%% *}"
16690   tmp="$complete EOL"
16691   arguments="${tmp#* }"
16692 
16693   # Input might be given as Windows format, start by converting to
16694   # unix format.
16695   new_path="$path"
16696 
16697   windows_path="$new_path"
16698   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16699     unix_path=`$CYGPATH -u "$windows_path"`
16700     new_path="$unix_path"
16701   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16702     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16703     new_path="$unix_path"
16704   fi
16705 
16706 
16707   # Now try to locate executable using which
16708   new_path=`$WHICH "$new_path" 2> /dev/null`
16709 
16710   if test "x$new_path" = x; then
16711     # Oops. Which didn't find the executable.
16712     # The splitting of arguments from the executable at a space might have been incorrect,
16713     # since paths with space are more likely in Windows. Give it another try with the whole
16714     # argument.
16715     path="$complete"
16716     arguments="EOL"
16717     new_path="$path"
16718 
16719   windows_path="$new_path"
16720   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16721     unix_path=`$CYGPATH -u "$windows_path"`
16722     new_path="$unix_path"
16723   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16724     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16725     new_path="$unix_path"
16726   fi
16727 
16728 
16729     new_path=`$WHICH "$new_path" 2> /dev/null`
16730 
16731     if test "x$new_path" = x; then
16732       # It's still not found. Now this is an unrecoverable error.
16733       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16734 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16735       has_space=`$ECHO "$complete" | $GREP " "`
16736       if test "x$has_space" != x; then
16737         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16738 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16739       fi
16740       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16741     fi
16742   fi
16743 
16744   # Now new_path has a complete unix path to the binary
16745   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16746     # Keep paths in /bin as-is, but remove trailing .exe if any
16747     new_path="${new_path/%.exe/}"
16748     # Do not save /bin paths to all_fixpath_prefixes!
16749   else
16750     # Not in mixed or Windows style, start by that.
16751     new_path=`cmd //c echo $new_path`
16752 
16753   input_path="$new_path"
16754   # Check if we need to convert this using DOS-style short mode. If the path
16755   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16756   # take no chances and rewrite it.
16757   # Note: m4 eats our [], so we need to use [ and ] instead.
16758   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16759   if test "x$has_forbidden_chars" != x; then
16760     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16761     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16762   fi
16763 
16764     # Output is in $new_path
16765 
16766   windows_path="$new_path"
16767   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16768     unix_path=`$CYGPATH -u "$windows_path"`
16769     new_path="$unix_path"
16770   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16771     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16772     new_path="$unix_path"
16773   fi
16774 
16775     # remove trailing .exe if any
16776     new_path="${new_path/%.exe/}"
16777 
16778     # Save the first 10 bytes of this path to the storage, so fixpath can work.
16779     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16780   fi
16781 
16782   else
16783     # We're on a posix platform. Hooray! :)
16784     # First separate the path from the arguments. This will split at the first
16785     # space.
16786     complete="$VS_ENV_CMD"
16787     path="${complete%% *}"
16788     tmp="$complete EOL"
16789     arguments="${tmp#* }"
16790 
16791     # Cannot rely on the command "which" here since it doesn't always work.
16792     is_absolute_path=`$ECHO "$path" | $GREP ^/`
16793     if test -z "$is_absolute_path"; then
16794       # Path to executable is not absolute. Find it.
16795       IFS_save="$IFS"
16796       IFS=:
16797       for p in $PATH; do
16798         if test -f "$p/$path" && test -x "$p/$path"; then
16799           new_path="$p/$path"
16800           break
16801         fi
16802       done
16803       IFS="$IFS_save"
16804     else
16805       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
16806 $as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
16807       new_path="$path"
16808     fi
16809 
16810     if test "x$new_path" = x; then
16811         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16812 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16813         has_space=`$ECHO "$complete" | $GREP " "`
16814         if test "x$has_space" != x; then
16815           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16816 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16817         fi
16818         as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16819       fi
16820   fi
16821 
16822       # Now join together the path and the arguments once again
16823       if test "x$arguments" != xEOL; then
16824         new_complete="$new_path ${arguments% *}"
16825       else
16826         new_complete="$new_path"
16827       fi
16828 
16829   if test "x$complete" != "x$new_complete"; then
16830       VS_ENV_CMD="$new_complete"
16831       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
16832 $as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
16833     fi
16834 
16835 
16836     # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
16837     { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
16838 $as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
16839     cd $OUTPUT_ROOT
16840     # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
16841     # to autoconf standards.
16842 
16843     #----
16844 
16845     # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
16846     # but calculate the difference in Cygwin environment before/after running it and then
16847     # apply the diff.
16848 
16849     if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
16850       _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
16851       _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
16852       _dosbash=`cygpath -a -w -s \`which bash\`.*`
16853     else
16854       _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
16855       _dosbash=`cmd //c echo \`which bash\``
16856     fi
16857 
16858     # generate the set of exported vars before/after the vs10 setup
16859     $ECHO "@echo off"                                           >  localdevenvtmp.bat
16860     $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
16861     $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
16862     $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
16863 
16864     # Now execute the newly created bat file.
16865     # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
16866     cmd /c localdevenvtmp.bat | cat
16867 
16868     # apply the diff (less some non-vs10 vars named by "!")
16869     $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
16870     $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
16871     $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
16872 
16873     # cleanup
16874     $RM localdevenvtmp*
16875     #----
16876     cd $CURDIR
16877     if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
16878       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16879 $as_echo "no" >&6; }
16880       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
16881 $as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
16882       { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16883 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16884       { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16885 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16886       as_fn_error $? "Cannot continue" "$LINENO" 5
16887     fi
16888 
16889     # Now set all paths and other env variables. This will allow the rest of
16890     # the configure script to find and run the compiler in the proper way.
16891     { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
16892 $as_echo "$as_me: Setting extracted environment variables" >&6;}
16893     . $OUTPUT_ROOT/localdevenv.sh
16894   else
16895     # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
16896     { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
16897 $as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
16898   fi
16899 
16900   # At this point, we should have corrent variables in the environment, or we can't continue.
16901   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
16902 $as_echo_n "checking for Visual Studio variables... " >&6; }
16903 
16904   if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
16905     if test "x$INCLUDE" = x || test "x$LIB" = x; then
16906       { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
16907 $as_echo "present but broken" >&6; }
16908       as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
16909     else
16910       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16911 $as_echo "ok" >&6; }
16912       # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
16913       VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
16914       VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
16915       VS_PATH="$PATH"
16916 
16917 
16918 
16919     fi
16920   else
16921     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16922 $as_echo "not found" >&6; }
16923 
16924     if test "x$VS_ENV_CMD" = x; then
16925       { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
16926 $as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
16927       { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
16928 $as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
16929     else
16930       { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
16931 $as_echo "$as_me: Running the extraction script failed." >&6;}
16932     fi
16933     { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16934 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16935     { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16936 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16937     as_fn_error $? "Cannot continue" "$LINENO" 5
16938   fi
16939 
16940   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
16941 $as_echo_n "checking for msvcr100.dll... " >&6; }
16942 
16943 # Check whether --with-msvcr-dll was given.
16944 if test "${with_msvcr_dll+set}" = set; then :
16945   withval=$with_msvcr_dll;
16946 fi
16947 
16948   if test "x$with_msvcr_dll" != x; then
16949     MSVCR_DLL="$with_msvcr_dll"
16950   else
16951     if test "x$VCINSTALLDIR" != x; then
16952       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16953         MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x64 | head --lines 1`
16954       else
16955         MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
16956         if test "x$MSVCR_DLL" = x; then
16957           MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | head --lines 1`
16958         fi
16959       fi
16960       if test "x$MSVCR_DLL" != x; then
16961         { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16962 $as_echo "$as_me: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16963       else
16964         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16965 $as_echo "$as_me: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16966       fi
16967     fi
16968     if test "x$MSVCR_DLL" = x; then
16969       if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then
16970         { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $SYSTEMROOT/system32" >&5
16971 $as_echo "$as_me: msvcr100.dll found in $SYSTEMROOT/system32" >&6;}
16972         MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll"
16973       fi
16974     fi
16975   fi
16976   if test "x$MSVCR_DLL" = x; then
16977     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16978 $as_echo "no" >&6; }
16979     as_fn_error $? "Could not find msvcr100.dll !" "$LINENO" 5
16980   fi
16981   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
16982 $as_echo "$MSVCR_DLL" >&6; }
16983 
16984   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16985 
16986   # Input might be given as Windows format, start by converting to
16987   # unix format.
16988   path="$MSVCR_DLL"
16989   new_path=`$CYGPATH -u "$path"`
16990 
16991   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16992   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16993   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16994   # "foo.exe" is OK but "foo" is an error.
16995   #
16996   # This test is therefore slightly more accurate than "test -f" to check for file precense.
16997   # It is also a way to make sure we got the proper file name for the real test later on.
16998   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16999   if test "x$test_shortpath" = x; then
17000     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17001 $as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17002     as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
17003   fi
17004 
17005   # Call helper function which possibly converts this using DOS-style short mode.
17006   # If so, the updated path is stored in $new_path.
17007 
17008   input_path="$new_path"
17009   # Check if we need to convert this using DOS-style short mode. If the path
17010   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17011   # take no chances and rewrite it.
17012   # Note: m4 eats our [], so we need to use [ and ] instead.
17013   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17014   if test "x$has_forbidden_chars" != x; then
17015     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17016     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17017     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17018     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17019       # Going to short mode and back again did indeed matter. Since short mode is
17020       # case insensitive, let's make it lowercase to improve readability.
17021       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17022       # Now convert it back to Unix-stile (cygpath)
17023       input_path=`$CYGPATH -u "$shortmode_path"`
17024       new_path="$input_path"
17025     fi
17026   fi
17027 
17028   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17029   if test "x$test_cygdrive_prefix" = x; then
17030     # As a simple fix, exclude /usr/bin since it's not a real path.
17031     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17032       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17033       # a path prefixed by /cygdrive for fixpath to work.
17034       new_path="$CYGWIN_ROOT_PATH$input_path"
17035     fi
17036   fi
17037 
17038 
17039   if test "x$path" != "x$new_path"; then
17040     MSVCR_DLL="$new_path"
17041     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17042 $as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17043   fi
17044 
17045   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17046 
17047   path="$MSVCR_DLL"
17048   has_colon=`$ECHO $path | $GREP ^.:`
17049   new_path="$path"
17050   if test "x$has_colon" = x; then
17051     # Not in mixed or Windows style, start by that.
17052     new_path=`cmd //c echo $path`
17053   fi
17054 
17055 
17056   input_path="$new_path"
17057   # Check if we need to convert this using DOS-style short mode. If the path
17058   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17059   # take no chances and rewrite it.
17060   # Note: m4 eats our [], so we need to use [ and ] instead.
17061   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17062   if test "x$has_forbidden_chars" != x; then
17063     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17064     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17065   fi
17066 
17067 
17068   windows_path="$new_path"
17069   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17070     unix_path=`$CYGPATH -u "$windows_path"`
17071     new_path="$unix_path"
17072   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17073     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17074     new_path="$unix_path"
17075   fi
17076 
17077   if test "x$path" != "x$new_path"; then
17078     MSVCR_DLL="$new_path"
17079     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17080 $as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17081   fi
17082 
17083   # Save the first 10 bytes of this path to the storage, so fixpath can work.
17084   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17085 
17086   else
17087     # We're on a posix platform. Hooray! :)
17088     path="$MSVCR_DLL"
17089 
17090     if test ! -f "$path" && test ! -d "$path"; then
17091       as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
17092     fi
17093 
17094     has_space=`$ECHO "$path" | $GREP " "`
17095     if test "x$has_space" != x; then
17096       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17097 $as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17098       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17099     fi
17100   fi
17101 
17102 
17103 
17104 
17105 # Check whether --with-dxsdk was given.
17106 if test "${with_dxsdk+set}" = set; then :
17107   withval=$with_dxsdk;
17108 fi
17109 
17110 
17111 # Check whether --with-dxsdk-lib was given.
17112 if test "${with_dxsdk_lib+set}" = set; then :
17113   withval=$with_dxsdk_lib;
17114 fi
17115 
17116 
17117 # Check whether --with-dxsdk-include was given.
17118 if test "${with_dxsdk_include+set}" = set; then :
17119   withval=$with_dxsdk_include;
17120 fi
17121 
17122 
17123   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK" >&5
17124 $as_echo_n "checking for DirectX SDK... " >&6; }
17125 
17126   if test "x$with_dxsdk" != x; then
17127     dxsdk_path="$with_dxsdk"
17128   elif test "x$DXSDK_DIR" != x; then
17129     dxsdk_path="$DXSDK_DIR"
17130   elif test -d "C:/DXSDK"; then
17131     dxsdk_path="C:/DXSDK"
17132   else
17133     as_fn_error $? "Could not find the DirectX SDK" "$LINENO" 5
17134   fi
17135   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dxsdk_path" >&5
17136 $as_echo "$dxsdk_path" >&6; }
17137 
17138   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17139 
17140   # Input might be given as Windows format, start by converting to
17141   # unix format.
17142   path="$dxsdk_path"
17143   new_path=`$CYGPATH -u "$path"`
17144 
17145   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17146   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17147   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17148   # "foo.exe" is OK but "foo" is an error.
17149   #
17150   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17151   # It is also a way to make sure we got the proper file name for the real test later on.
17152   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17153   if test "x$test_shortpath" = x; then
17154     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&5
17155 $as_echo "$as_me: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&6;}
17156     as_fn_error $? "Cannot locate the the path of dxsdk_path" "$LINENO" 5
17157   fi
17158 
17159   # Call helper function which possibly converts this using DOS-style short mode.
17160   # If so, the updated path is stored in $new_path.
17161 
17162   input_path="$new_path"
17163   # Check if we need to convert this using DOS-style short mode. If the path
17164   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17165   # take no chances and rewrite it.
17166   # Note: m4 eats our [], so we need to use [ and ] instead.
17167   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17168   if test "x$has_forbidden_chars" != x; then
17169     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17170     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17171     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17172     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17173       # Going to short mode and back again did indeed matter. Since short mode is
17174       # case insensitive, let's make it lowercase to improve readability.
17175       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17176       # Now convert it back to Unix-stile (cygpath)
17177       input_path=`$CYGPATH -u "$shortmode_path"`
17178       new_path="$input_path"
17179     fi
17180   fi
17181 
17182   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17183   if test "x$test_cygdrive_prefix" = x; then
17184     # As a simple fix, exclude /usr/bin since it's not a real path.
17185     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17186       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17187       # a path prefixed by /cygdrive for fixpath to work.
17188       new_path="$CYGWIN_ROOT_PATH$input_path"
17189     fi
17190   fi
17191 
17192 
17193   if test "x$path" != "x$new_path"; then
17194     dxsdk_path="$new_path"
17195     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting dxsdk_path to \"$new_path\"" >&5
17196 $as_echo "$as_me: Rewriting dxsdk_path to \"$new_path\"" >&6;}
17197   fi
17198 
17199   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17200 
17201   path="$dxsdk_path"
17202   has_colon=`$ECHO $path | $GREP ^.:`
17203   new_path="$path"
17204   if test "x$has_colon" = x; then
17205     # Not in mixed or Windows style, start by that.
17206     new_path=`cmd //c echo $path`
17207   fi
17208 
17209 
17210   input_path="$new_path"
17211   # Check if we need to convert this using DOS-style short mode. If the path
17212   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17213   # take no chances and rewrite it.
17214   # Note: m4 eats our [], so we need to use [ and ] instead.
17215   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17216   if test "x$has_forbidden_chars" != x; then
17217     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17218     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17219   fi
17220 
17221 
17222   windows_path="$new_path"
17223   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17224     unix_path=`$CYGPATH -u "$windows_path"`
17225     new_path="$unix_path"
17226   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17227     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17228     new_path="$unix_path"
17229   fi
17230 
17231   if test "x$path" != "x$new_path"; then
17232     dxsdk_path="$new_path"
17233     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting dxsdk_path to \"$new_path\"" >&5
17234 $as_echo "$as_me: Rewriting dxsdk_path to \"$new_path\"" >&6;}
17235   fi
17236 
17237   # Save the first 10 bytes of this path to the storage, so fixpath can work.
17238   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17239 
17240   else
17241     # We're on a posix platform. Hooray! :)
17242     path="$dxsdk_path"
17243 
17244     if test ! -f "$path" && test ! -d "$path"; then
17245       as_fn_error $? "The path of dxsdk_path, which resolves as \"$path\", is not found." "$LINENO" 5
17246     fi
17247 
17248     has_space=`$ECHO "$path" | $GREP " "`
17249     if test "x$has_space" != x; then
17250       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&5
17251 $as_echo "$as_me: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&6;}
17252       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17253     fi
17254   fi
17255 
17256 
17257   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK lib dir" >&5
17258 $as_echo_n "checking for DirectX SDK lib dir... " >&6; }
17259   if test "x$with_dxsdk_lib" != x; then
17260     DXSDK_LIB_PATH="$with_dxsdk_lib"
17261   elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
17262     DXSDK_LIB_PATH="$dxsdk_path/Lib/x64"
17263   else
17264     DXSDK_LIB_PATH="$dxsdk_path/Lib"
17265   fi
17266   # dsound.lib is linked to in jsoundds
17267   if test ! -f "$DXSDK_LIB_PATH/dsound.lib"; then
17268     as_fn_error $? "Invalid DirectX SDK lib dir" "$LINENO" 5
17269   fi
17270   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DXSDK_LIB_PATH" >&5
17271 $as_echo "$DXSDK_LIB_PATH" >&6; }
17272 
17273   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17274 
17275   # Input might be given as Windows format, start by converting to
17276   # unix format.
17277   path="$DXSDK_LIB_PATH"
17278   new_path=`$CYGPATH -u "$path"`
17279 
17280   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17281   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17282   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17283   # "foo.exe" is OK but "foo" is an error.
17284   #
17285   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17286   # It is also a way to make sure we got the proper file name for the real test later on.
17287   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17288   if test "x$test_shortpath" = x; then
17289     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&5
17290 $as_echo "$as_me: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
17291     as_fn_error $? "Cannot locate the the path of DXSDK_LIB_PATH" "$LINENO" 5
17292   fi
17293 
17294   # Call helper function which possibly converts this using DOS-style short mode.
17295   # If so, the updated path is stored in $new_path.
17296 
17297   input_path="$new_path"
17298   # Check if we need to convert this using DOS-style short mode. If the path
17299   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17300   # take no chances and rewrite it.
17301   # Note: m4 eats our [], so we need to use [ and ] instead.
17302   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17303   if test "x$has_forbidden_chars" != x; then
17304     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17305     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17306     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17307     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17308       # Going to short mode and back again did indeed matter. Since short mode is
17309       # case insensitive, let's make it lowercase to improve readability.
17310       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17311       # Now convert it back to Unix-stile (cygpath)
17312       input_path=`$CYGPATH -u "$shortmode_path"`
17313       new_path="$input_path"
17314     fi
17315   fi
17316 
17317   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17318   if test "x$test_cygdrive_prefix" = x; then
17319     # As a simple fix, exclude /usr/bin since it's not a real path.
17320     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17321       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17322       # a path prefixed by /cygdrive for fixpath to work.
17323       new_path="$CYGWIN_ROOT_PATH$input_path"
17324     fi
17325   fi
17326 
17327 
17328   if test "x$path" != "x$new_path"; then
17329     DXSDK_LIB_PATH="$new_path"
17330     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&5
17331 $as_echo "$as_me: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&6;}
17332   fi
17333 
17334   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17335 
17336   path="$DXSDK_LIB_PATH"
17337   has_colon=`$ECHO $path | $GREP ^.:`
17338   new_path="$path"
17339   if test "x$has_colon" = x; then
17340     # Not in mixed or Windows style, start by that.
17341     new_path=`cmd //c echo $path`
17342   fi
17343 
17344 
17345   input_path="$new_path"
17346   # Check if we need to convert this using DOS-style short mode. If the path
17347   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17348   # take no chances and rewrite it.
17349   # Note: m4 eats our [], so we need to use [ and ] instead.
17350   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17351   if test "x$has_forbidden_chars" != x; then
17352     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17353     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17354   fi
17355 
17356 
17357   windows_path="$new_path"
17358   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17359     unix_path=`$CYGPATH -u "$windows_path"`
17360     new_path="$unix_path"
17361   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17362     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17363     new_path="$unix_path"
17364   fi
17365 
17366   if test "x$path" != "x$new_path"; then
17367     DXSDK_LIB_PATH="$new_path"
17368     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&5
17369 $as_echo "$as_me: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&6;}
17370   fi
17371 
17372   # Save the first 10 bytes of this path to the storage, so fixpath can work.
17373   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17374 
17375   else
17376     # We're on a posix platform. Hooray! :)
17377     path="$DXSDK_LIB_PATH"
17378 
17379     if test ! -f "$path" && test ! -d "$path"; then
17380       as_fn_error $? "The path of DXSDK_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
17381     fi
17382 
17383     has_space=`$ECHO "$path" | $GREP " "`
17384     if test "x$has_space" != x; then
17385       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&5
17386 $as_echo "$as_me: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
17387       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17388     fi
17389   fi
17390 
17391 
17392   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK include dir" >&5
17393 $as_echo_n "checking for DirectX SDK include dir... " >&6; }
17394   if test "x$with_dxsdk_include" != x; then
17395     DXSDK_INCLUDE_PATH="$with_dxsdk_include"
17396   else
17397     DXSDK_INCLUDE_PATH="$dxsdk_path/Include"
17398   fi
17399   # dsound.h is included in jsoundds
17400   if test ! -f "$DXSDK_INCLUDE_PATH/dsound.h"; then
17401     as_fn_error $? "Invalid DirectX SDK lib dir" "$LINENO" 5
17402   fi
17403   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DXSDK_INCLUDE_PATH" >&5
17404 $as_echo "$DXSDK_INCLUDE_PATH" >&6; }
17405 
17406   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17407 
17408   # Input might be given as Windows format, start by converting to
17409   # unix format.
17410   path="$DXSDK_INCLUDE_PATH"
17411   new_path=`$CYGPATH -u "$path"`
17412 
17413   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17414   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17415   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17416   # "foo.exe" is OK but "foo" is an error.
17417   #
17418   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17419   # It is also a way to make sure we got the proper file name for the real test later on.
17420   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17421   if test "x$test_shortpath" = x; then
17422     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
17423 $as_echo "$as_me: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
17424     as_fn_error $? "Cannot locate the the path of DXSDK_INCLUDE_PATH" "$LINENO" 5
17425   fi
17426 
17427   # Call helper function which possibly converts this using DOS-style short mode.
17428   # If so, the updated path is stored in $new_path.
17429 
17430   input_path="$new_path"
17431   # Check if we need to convert this using DOS-style short mode. If the path
17432   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17433   # take no chances and rewrite it.
17434   # Note: m4 eats our [], so we need to use [ and ] instead.
17435   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17436   if test "x$has_forbidden_chars" != x; then
17437     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17438     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17439     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17440     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17441       # Going to short mode and back again did indeed matter. Since short mode is
17442       # case insensitive, let's make it lowercase to improve readability.
17443       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17444       # Now convert it back to Unix-stile (cygpath)
17445       input_path=`$CYGPATH -u "$shortmode_path"`
17446       new_path="$input_path"
17447     fi
17448   fi
17449 
17450   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17451   if test "x$test_cygdrive_prefix" = x; then
17452     # As a simple fix, exclude /usr/bin since it's not a real path.
17453     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17454       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17455       # a path prefixed by /cygdrive for fixpath to work.
17456       new_path="$CYGWIN_ROOT_PATH$input_path"
17457     fi
17458   fi
17459 
17460 
17461   if test "x$path" != "x$new_path"; then
17462     DXSDK_INCLUDE_PATH="$new_path"
17463     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&5
17464 $as_echo "$as_me: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&6;}
17465   fi
17466 
17467   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17468 
17469   path="$DXSDK_INCLUDE_PATH"
17470   has_colon=`$ECHO $path | $GREP ^.:`
17471   new_path="$path"
17472   if test "x$has_colon" = x; then
17473     # Not in mixed or Windows style, start by that.
17474     new_path=`cmd //c echo $path`
17475   fi
17476 
17477 
17478   input_path="$new_path"
17479   # Check if we need to convert this using DOS-style short mode. If the path
17480   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17481   # take no chances and rewrite it.
17482   # Note: m4 eats our [], so we need to use [ and ] instead.
17483   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17484   if test "x$has_forbidden_chars" != x; then
17485     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17486     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17487   fi
17488 
17489 
17490   windows_path="$new_path"
17491   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17492     unix_path=`$CYGPATH -u "$windows_path"`
17493     new_path="$unix_path"
17494   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17495     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17496     new_path="$unix_path"
17497   fi
17498 
17499   if test "x$path" != "x$new_path"; then
17500     DXSDK_INCLUDE_PATH="$new_path"
17501     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&5
17502 $as_echo "$as_me: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&6;}
17503   fi
17504 
17505   # Save the first 10 bytes of this path to the storage, so fixpath can work.
17506   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17507 
17508   else
17509     # We're on a posix platform. Hooray! :)
17510     path="$DXSDK_INCLUDE_PATH"
17511 
17512     if test ! -f "$path" && test ! -d "$path"; then
17513       as_fn_error $? "The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
17514     fi
17515 
17516     has_space=`$ECHO "$path" | $GREP " "`
17517     if test "x$has_space" != x; then
17518       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
17519 $as_echo "$as_me: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
17520       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17521     fi
17522   fi
17523 
17524 
17525 
17526 
17527   LDFLAGS_JDK="$LDFLAGS_JDK -libpath:$DXSDK_LIB_PATH"
17528 
17529 fi
17530 
17531 
17532 
17533 # If --build AND --host is set, then the configure script will find any
17534 # cross compilation tools in the PATH. Cross compilation tools
17535 # follows the cross compilation standard where they are prefixed with ${host}.
17536 # For example the binary i686-sun-solaris2.10-gcc
17537 # will cross compile for i686-sun-solaris2.10
17538 # If neither of build and host is not set, then build=host and the
17539 # default compiler found in the path will be used.
17540 # Setting only --host, does not seem to be really supported.
17541 # Please set both --build and --host if you want to cross compile.
17542 
17543 if test "x$COMPILE_TYPE" = "xcross"; then
17544     # Now we to find a C/C++ compiler that can build executables for the build
17545     # platform. We can't use the AC_PROG_CC macro, since it can only be used
17546     # once. Also, we need to do this before adding a tools dir to the path,
17547     # otherwise we might pick up cross-compilers which don't use standard naming.
17548     # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
17549     # to wait until they are properly discovered.
17550     for ac_prog in cl cc gcc
17551 do
17552   # Extract the first word of "$ac_prog", so it can be a program name with args.
17553 set dummy $ac_prog; ac_word=$2
17554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17555 $as_echo_n "checking for $ac_word... " >&6; }
17556 if test "${ac_cv_path_BUILD_CC+set}" = set; then :
17557   $as_echo_n "(cached) " >&6
17558 else
17559   case $BUILD_CC in
17560   [\\/]* | ?:[\\/]*)
17561   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
17562   ;;
17563   *)
17564   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17565 for as_dir in $PATH
17566 do
17567   IFS=$as_save_IFS
17568   test -z "$as_dir" && as_dir=.
17569     for ac_exec_ext in '' $ac_executable_extensions; do
17570   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17571     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
17572     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17573     break 2
17574   fi
17575 done
17576   done
17577 IFS=$as_save_IFS
17578 
17579   ;;
17580 esac
17581 fi
17582 BUILD_CC=$ac_cv_path_BUILD_CC
17583 if test -n "$BUILD_CC"; then
17584   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
17585 $as_echo "$BUILD_CC" >&6; }
17586 else
17587   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17588 $as_echo "no" >&6; }
17589 fi
17590 
17591 
17592   test -n "$BUILD_CC" && break
17593 done
17594 
17595 
17596   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17597 
17598   # First separate the path from the arguments. This will split at the first
17599   # space.
17600   complete="$BUILD_CC"
17601   path="${complete%% *}"
17602   tmp="$complete EOL"
17603   arguments="${tmp#* }"
17604 
17605   # Input might be given as Windows format, start by converting to
17606   # unix format.
17607   new_path=`$CYGPATH -u "$path"`
17608 
17609   # Now try to locate executable using which
17610   new_path=`$WHICH "$new_path" 2> /dev/null`
17611   # bat and cmd files are not always considered executable in cygwin causing which
17612   # to not find them
17613   if test "x$new_path" = x \
17614            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17615            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17616     new_path=`$CYGPATH -u "$path"`
17617   fi
17618   if test "x$new_path" = x; then
17619     # Oops. Which didn't find the executable.
17620     # The splitting of arguments from the executable at a space might have been incorrect,
17621     # since paths with space are more likely in Windows. Give it another try with the whole
17622     # argument.
17623     path="$complete"
17624     arguments="EOL"
17625     new_path=`$CYGPATH -u "$path"`
17626     new_path=`$WHICH "$new_path" 2> /dev/null`
17627     # bat and cmd files are not always considered executable in cygwin causing which
17628     # to not find them
17629     if test "x$new_path" = x \
17630              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17631              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17632       new_path=`$CYGPATH -u "$path"`
17633     fi
17634     if test "x$new_path" = x; then
17635       # It's still not found. Now this is an unrecoverable error.
17636       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17637 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17638       has_space=`$ECHO "$complete" | $GREP " "`
17639       if test "x$has_space" != x; then
17640         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17641 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17642       fi
17643       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17644     fi
17645   fi
17646 
17647   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17648   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17649   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17650   # "foo.exe" is OK but "foo" is an error.
17651   #
17652   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17653   # It is also a way to make sure we got the proper file name for the real test later on.
17654   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17655   if test "x$test_shortpath" = x; then
17656     # Short path failed, file does not exist as specified.
17657     # Try adding .exe or .cmd
17658     if test -f "${new_path}.exe"; then
17659        input_to_shortpath="${new_path}.exe"
17660     elif test -f "${new_path}.cmd"; then
17661        input_to_shortpath="${new_path}.cmd"
17662     else
17663       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
17664 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
17665       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17666 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17667       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17668     fi
17669   else
17670     input_to_shortpath="$new_path"
17671   fi
17672 
17673   # Call helper function which possibly converts this using DOS-style short mode.
17674   # If so, the updated path is stored in $new_path.
17675   new_path="$input_to_shortpath"
17676 
17677   input_path="$input_to_shortpath"
17678   # Check if we need to convert this using DOS-style short mode. If the path
17679   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17680   # take no chances and rewrite it.
17681   # Note: m4 eats our [], so we need to use [ and ] instead.
17682   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17683   if test "x$has_forbidden_chars" != x; then
17684     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17685     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17686     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17687     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17688       # Going to short mode and back again did indeed matter. Since short mode is
17689       # case insensitive, let's make it lowercase to improve readability.
17690       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17691       # Now convert it back to Unix-stile (cygpath)
17692       input_path=`$CYGPATH -u "$shortmode_path"`
17693       new_path="$input_path"
17694     fi
17695   fi
17696 
17697   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17698   if test "x$test_cygdrive_prefix" = x; then
17699     # As a simple fix, exclude /usr/bin since it's not a real path.
17700     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17701       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17702       # a path prefixed by /cygdrive for fixpath to work.
17703       new_path="$CYGWIN_ROOT_PATH$input_path"
17704     fi
17705   fi
17706 
17707   # remove trailing .exe if any
17708   new_path="${new_path/%.exe/}"
17709 
17710   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17711 
17712   # First separate the path from the arguments. This will split at the first
17713   # space.
17714   complete="$BUILD_CC"
17715   path="${complete%% *}"
17716   tmp="$complete EOL"
17717   arguments="${tmp#* }"
17718 
17719   # Input might be given as Windows format, start by converting to
17720   # unix format.
17721   new_path="$path"
17722 
17723   windows_path="$new_path"
17724   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17725     unix_path=`$CYGPATH -u "$windows_path"`
17726     new_path="$unix_path"
17727   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17728     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17729     new_path="$unix_path"
17730   fi
17731 
17732 
17733   # Now try to locate executable using which
17734   new_path=`$WHICH "$new_path" 2> /dev/null`
17735 
17736   if test "x$new_path" = x; then
17737     # Oops. Which didn't find the executable.
17738     # The splitting of arguments from the executable at a space might have been incorrect,
17739     # since paths with space are more likely in Windows. Give it another try with the whole
17740     # argument.
17741     path="$complete"
17742     arguments="EOL"
17743     new_path="$path"
17744 
17745   windows_path="$new_path"
17746   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17747     unix_path=`$CYGPATH -u "$windows_path"`
17748     new_path="$unix_path"
17749   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17750     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17751     new_path="$unix_path"
17752   fi
17753 
17754 
17755     new_path=`$WHICH "$new_path" 2> /dev/null`
17756 
17757     if test "x$new_path" = x; then
17758       # It's still not found. Now this is an unrecoverable error.
17759       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17760 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17761       has_space=`$ECHO "$complete" | $GREP " "`
17762       if test "x$has_space" != x; then
17763         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17764 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17765       fi
17766       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17767     fi
17768   fi
17769 
17770   # Now new_path has a complete unix path to the binary
17771   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17772     # Keep paths in /bin as-is, but remove trailing .exe if any
17773     new_path="${new_path/%.exe/}"
17774     # Do not save /bin paths to all_fixpath_prefixes!
17775   else
17776     # Not in mixed or Windows style, start by that.
17777     new_path=`cmd //c echo $new_path`
17778 
17779   input_path="$new_path"
17780   # Check if we need to convert this using DOS-style short mode. If the path
17781   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17782   # take no chances and rewrite it.
17783   # Note: m4 eats our [], so we need to use [ and ] instead.
17784   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17785   if test "x$has_forbidden_chars" != x; then
17786     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17787     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17788   fi
17789 
17790     # Output is in $new_path
17791 
17792   windows_path="$new_path"
17793   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17794     unix_path=`$CYGPATH -u "$windows_path"`
17795     new_path="$unix_path"
17796   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17797     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17798     new_path="$unix_path"
17799   fi
17800 
17801     # remove trailing .exe if any
17802     new_path="${new_path/%.exe/}"
17803 
17804     # Save the first 10 bytes of this path to the storage, so fixpath can work.
17805     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17806   fi
17807 
17808   else
17809     # We're on a posix platform. Hooray! :)
17810     # First separate the path from the arguments. This will split at the first
17811     # space.
17812     complete="$BUILD_CC"
17813     path="${complete%% *}"
17814     tmp="$complete EOL"
17815     arguments="${tmp#* }"
17816 
17817     # Cannot rely on the command "which" here since it doesn't always work.
17818     is_absolute_path=`$ECHO "$path" | $GREP ^/`
17819     if test -z "$is_absolute_path"; then
17820       # Path to executable is not absolute. Find it.
17821       IFS_save="$IFS"
17822       IFS=:
17823       for p in $PATH; do
17824         if test -f "$p/$path" && test -x "$p/$path"; then
17825           new_path="$p/$path"
17826           break
17827         fi
17828       done
17829       IFS="$IFS_save"
17830     else
17831       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
17832 $as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
17833       new_path="$path"
17834     fi
17835 
17836     if test "x$new_path" = x; then
17837         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17838 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17839         has_space=`$ECHO "$complete" | $GREP " "`
17840         if test "x$has_space" != x; then
17841           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17842 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17843         fi
17844         as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17845       fi
17846   fi
17847 
17848       # Now join together the path and the arguments once again
17849       if test "x$arguments" != xEOL; then
17850         new_complete="$new_path ${arguments% *}"
17851       else
17852         new_complete="$new_path"
17853       fi
17854 
17855   if test "x$complete" != "x$new_complete"; then
17856       BUILD_CC="$new_complete"
17857       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
17858 $as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
17859     fi
17860 
17861     for ac_prog in cl CC g++
17862 do
17863   # Extract the first word of "$ac_prog", so it can be a program name with args.
17864 set dummy $ac_prog; ac_word=$2
17865 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17866 $as_echo_n "checking for $ac_word... " >&6; }
17867 if test "${ac_cv_path_BUILD_CXX+set}" = set; then :
17868   $as_echo_n "(cached) " >&6
17869 else
17870   case $BUILD_CXX in
17871   [\\/]* | ?:[\\/]*)
17872   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
17873   ;;
17874   *)
17875   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17876 for as_dir in $PATH
17877 do
17878   IFS=$as_save_IFS
17879   test -z "$as_dir" && as_dir=.
17880     for ac_exec_ext in '' $ac_executable_extensions; do
17881   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17882     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
17883     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17884     break 2
17885   fi
17886 done
17887   done
17888 IFS=$as_save_IFS
17889 
17890   ;;
17891 esac
17892 fi
17893 BUILD_CXX=$ac_cv_path_BUILD_CXX
17894 if test -n "$BUILD_CXX"; then
17895   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
17896 $as_echo "$BUILD_CXX" >&6; }
17897 else
17898   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17899 $as_echo "no" >&6; }
17900 fi
17901 
17902 
17903   test -n "$BUILD_CXX" && break
17904 done
17905 
17906 
17907   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17908 
17909   # First separate the path from the arguments. This will split at the first
17910   # space.
17911   complete="$BUILD_CXX"
17912   path="${complete%% *}"
17913   tmp="$complete EOL"
17914   arguments="${tmp#* }"
17915 
17916   # Input might be given as Windows format, start by converting to
17917   # unix format.
17918   new_path=`$CYGPATH -u "$path"`
17919 
17920   # Now try to locate executable using which
17921   new_path=`$WHICH "$new_path" 2> /dev/null`
17922   # bat and cmd files are not always considered executable in cygwin causing which
17923   # to not find them
17924   if test "x$new_path" = x \
17925            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17926            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17927     new_path=`$CYGPATH -u "$path"`
17928   fi
17929   if test "x$new_path" = x; then
17930     # Oops. Which didn't find the executable.
17931     # The splitting of arguments from the executable at a space might have been incorrect,
17932     # since paths with space are more likely in Windows. Give it another try with the whole
17933     # argument.
17934     path="$complete"
17935     arguments="EOL"
17936     new_path=`$CYGPATH -u "$path"`
17937     new_path=`$WHICH "$new_path" 2> /dev/null`
17938     # bat and cmd files are not always considered executable in cygwin causing which
17939     # to not find them
17940     if test "x$new_path" = x \
17941              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17942              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17943       new_path=`$CYGPATH -u "$path"`
17944     fi
17945     if test "x$new_path" = x; then
17946       # It's still not found. Now this is an unrecoverable error.
17947       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17948 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17949       has_space=`$ECHO "$complete" | $GREP " "`
17950       if test "x$has_space" != x; then
17951         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17952 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17953       fi
17954       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17955     fi
17956   fi
17957 
17958   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17959   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17960   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17961   # "foo.exe" is OK but "foo" is an error.
17962   #
17963   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17964   # It is also a way to make sure we got the proper file name for the real test later on.
17965   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17966   if test "x$test_shortpath" = x; then
17967     # Short path failed, file does not exist as specified.
17968     # Try adding .exe or .cmd
17969     if test -f "${new_path}.exe"; then
17970        input_to_shortpath="${new_path}.exe"
17971     elif test -f "${new_path}.cmd"; then
17972        input_to_shortpath="${new_path}.cmd"
17973     else
17974       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
17975 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
17976       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17977 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17978       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17979     fi
17980   else
17981     input_to_shortpath="$new_path"
17982   fi
17983 
17984   # Call helper function which possibly converts this using DOS-style short mode.
17985   # If so, the updated path is stored in $new_path.
17986   new_path="$input_to_shortpath"
17987 
17988   input_path="$input_to_shortpath"
17989   # Check if we need to convert this using DOS-style short mode. If the path
17990   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17991   # take no chances and rewrite it.
17992   # Note: m4 eats our [], so we need to use [ and ] instead.
17993   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17994   if test "x$has_forbidden_chars" != x; then
17995     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17996     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17997     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17998     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17999       # Going to short mode and back again did indeed matter. Since short mode is
18000       # case insensitive, let's make it lowercase to improve readability.
18001       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18002       # Now convert it back to Unix-stile (cygpath)
18003       input_path=`$CYGPATH -u "$shortmode_path"`
18004       new_path="$input_path"
18005     fi
18006   fi
18007 
18008   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18009   if test "x$test_cygdrive_prefix" = x; then
18010     # As a simple fix, exclude /usr/bin since it's not a real path.
18011     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18012       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18013       # a path prefixed by /cygdrive for fixpath to work.
18014       new_path="$CYGWIN_ROOT_PATH$input_path"
18015     fi
18016   fi
18017 
18018   # remove trailing .exe if any
18019   new_path="${new_path/%.exe/}"
18020 
18021   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18022 
18023   # First separate the path from the arguments. This will split at the first
18024   # space.
18025   complete="$BUILD_CXX"
18026   path="${complete%% *}"
18027   tmp="$complete EOL"
18028   arguments="${tmp#* }"
18029 
18030   # Input might be given as Windows format, start by converting to
18031   # unix format.
18032   new_path="$path"
18033 
18034   windows_path="$new_path"
18035   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18036     unix_path=`$CYGPATH -u "$windows_path"`
18037     new_path="$unix_path"
18038   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18039     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18040     new_path="$unix_path"
18041   fi
18042 
18043 
18044   # Now try to locate executable using which
18045   new_path=`$WHICH "$new_path" 2> /dev/null`
18046 
18047   if test "x$new_path" = x; then
18048     # Oops. Which didn't find the executable.
18049     # The splitting of arguments from the executable at a space might have been incorrect,
18050     # since paths with space are more likely in Windows. Give it another try with the whole
18051     # argument.
18052     path="$complete"
18053     arguments="EOL"
18054     new_path="$path"
18055 
18056   windows_path="$new_path"
18057   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18058     unix_path=`$CYGPATH -u "$windows_path"`
18059     new_path="$unix_path"
18060   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18061     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18062     new_path="$unix_path"
18063   fi
18064 
18065 
18066     new_path=`$WHICH "$new_path" 2> /dev/null`
18067 
18068     if test "x$new_path" = x; then
18069       # It's still not found. Now this is an unrecoverable error.
18070       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18071 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18072       has_space=`$ECHO "$complete" | $GREP " "`
18073       if test "x$has_space" != x; then
18074         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18075 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18076       fi
18077       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18078     fi
18079   fi
18080 
18081   # Now new_path has a complete unix path to the binary
18082   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18083     # Keep paths in /bin as-is, but remove trailing .exe if any
18084     new_path="${new_path/%.exe/}"
18085     # Do not save /bin paths to all_fixpath_prefixes!
18086   else
18087     # Not in mixed or Windows style, start by that.
18088     new_path=`cmd //c echo $new_path`
18089 
18090   input_path="$new_path"
18091   # Check if we need to convert this using DOS-style short mode. If the path
18092   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18093   # take no chances and rewrite it.
18094   # Note: m4 eats our [], so we need to use [ and ] instead.
18095   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18096   if test "x$has_forbidden_chars" != x; then
18097     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18098     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18099   fi
18100 
18101     # Output is in $new_path
18102 
18103   windows_path="$new_path"
18104   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18105     unix_path=`$CYGPATH -u "$windows_path"`
18106     new_path="$unix_path"
18107   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18108     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18109     new_path="$unix_path"
18110   fi
18111 
18112     # remove trailing .exe if any
18113     new_path="${new_path/%.exe/}"
18114 
18115     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18116     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18117   fi
18118 
18119   else
18120     # We're on a posix platform. Hooray! :)
18121     # First separate the path from the arguments. This will split at the first
18122     # space.
18123     complete="$BUILD_CXX"
18124     path="${complete%% *}"
18125     tmp="$complete EOL"
18126     arguments="${tmp#* }"
18127 
18128     # Cannot rely on the command "which" here since it doesn't always work.
18129     is_absolute_path=`$ECHO "$path" | $GREP ^/`
18130     if test -z "$is_absolute_path"; then
18131       # Path to executable is not absolute. Find it.
18132       IFS_save="$IFS"
18133       IFS=:
18134       for p in $PATH; do
18135         if test -f "$p/$path" && test -x "$p/$path"; then
18136           new_path="$p/$path"
18137           break
18138         fi
18139       done
18140       IFS="$IFS_save"
18141     else
18142       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
18143 $as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
18144       new_path="$path"
18145     fi
18146 
18147     if test "x$new_path" = x; then
18148         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18149 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18150         has_space=`$ECHO "$complete" | $GREP " "`
18151         if test "x$has_space" != x; then
18152           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18153 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18154         fi
18155         as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18156       fi
18157   fi
18158 
18159       # Now join together the path and the arguments once again
18160       if test "x$arguments" != xEOL; then
18161         new_complete="$new_path ${arguments% *}"
18162       else
18163         new_complete="$new_path"
18164       fi
18165 
18166   if test "x$complete" != "x$new_complete"; then
18167       BUILD_CXX="$new_complete"
18168       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
18169 $as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
18170     fi
18171 
18172     # Extract the first word of "ld", so it can be a program name with args.
18173 set dummy ld; ac_word=$2
18174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18175 $as_echo_n "checking for $ac_word... " >&6; }
18176 if test "${ac_cv_path_BUILD_LD+set}" = set; then :
18177   $as_echo_n "(cached) " >&6
18178 else
18179   case $BUILD_LD in
18180   [\\/]* | ?:[\\/]*)
18181   ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
18182   ;;
18183   *)
18184   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18185 for as_dir in $PATH
18186 do
18187   IFS=$as_save_IFS
18188   test -z "$as_dir" && as_dir=.
18189     for ac_exec_ext in '' $ac_executable_extensions; do
18190   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18191     ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
18192     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18193     break 2
18194   fi
18195 done
18196   done
18197 IFS=$as_save_IFS
18198 
18199   ;;
18200 esac
18201 fi
18202 BUILD_LD=$ac_cv_path_BUILD_LD
18203 if test -n "$BUILD_LD"; then
18204   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
18205 $as_echo "$BUILD_LD" >&6; }
18206 else
18207   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18208 $as_echo "no" >&6; }
18209 fi
18210 
18211 
18212 
18213   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18214 
18215   # First separate the path from the arguments. This will split at the first
18216   # space.
18217   complete="$BUILD_LD"
18218   path="${complete%% *}"
18219   tmp="$complete EOL"
18220   arguments="${tmp#* }"
18221 
18222   # Input might be given as Windows format, start by converting to
18223   # unix format.
18224   new_path=`$CYGPATH -u "$path"`
18225 
18226   # Now try to locate executable using which
18227   new_path=`$WHICH "$new_path" 2> /dev/null`
18228   # bat and cmd files are not always considered executable in cygwin causing which
18229   # to not find them
18230   if test "x$new_path" = x \
18231            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18232            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18233     new_path=`$CYGPATH -u "$path"`
18234   fi
18235   if test "x$new_path" = x; then
18236     # Oops. Which didn't find the executable.
18237     # The splitting of arguments from the executable at a space might have been incorrect,
18238     # since paths with space are more likely in Windows. Give it another try with the whole
18239     # argument.
18240     path="$complete"
18241     arguments="EOL"
18242     new_path=`$CYGPATH -u "$path"`
18243     new_path=`$WHICH "$new_path" 2> /dev/null`
18244     # bat and cmd files are not always considered executable in cygwin causing which
18245     # to not find them
18246     if test "x$new_path" = x \
18247              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18248              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18249       new_path=`$CYGPATH -u "$path"`
18250     fi
18251     if test "x$new_path" = x; then
18252       # It's still not found. Now this is an unrecoverable error.
18253       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18254 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18255       has_space=`$ECHO "$complete" | $GREP " "`
18256       if test "x$has_space" != x; then
18257         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18258 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18259       fi
18260       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18261     fi
18262   fi
18263 
18264   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18265   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18266   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18267   # "foo.exe" is OK but "foo" is an error.
18268   #
18269   # This test is therefore slightly more accurate than "test -f" to check for file precense.
18270   # It is also a way to make sure we got the proper file name for the real test later on.
18271   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18272   if test "x$test_shortpath" = x; then
18273     # Short path failed, file does not exist as specified.
18274     # Try adding .exe or .cmd
18275     if test -f "${new_path}.exe"; then
18276        input_to_shortpath="${new_path}.exe"
18277     elif test -f "${new_path}.cmd"; then
18278        input_to_shortpath="${new_path}.cmd"
18279     else
18280       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
18281 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
18282       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18283 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18284       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18285     fi
18286   else
18287     input_to_shortpath="$new_path"
18288   fi
18289 
18290   # Call helper function which possibly converts this using DOS-style short mode.
18291   # If so, the updated path is stored in $new_path.
18292   new_path="$input_to_shortpath"
18293 
18294   input_path="$input_to_shortpath"
18295   # Check if we need to convert this using DOS-style short mode. If the path
18296   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18297   # take no chances and rewrite it.
18298   # Note: m4 eats our [], so we need to use [ and ] instead.
18299   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18300   if test "x$has_forbidden_chars" != x; then
18301     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18302     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18303     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18304     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18305       # Going to short mode and back again did indeed matter. Since short mode is
18306       # case insensitive, let's make it lowercase to improve readability.
18307       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18308       # Now convert it back to Unix-stile (cygpath)
18309       input_path=`$CYGPATH -u "$shortmode_path"`
18310       new_path="$input_path"
18311     fi
18312   fi
18313 
18314   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18315   if test "x$test_cygdrive_prefix" = x; then
18316     # As a simple fix, exclude /usr/bin since it's not a real path.
18317     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18318       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18319       # a path prefixed by /cygdrive for fixpath to work.
18320       new_path="$CYGWIN_ROOT_PATH$input_path"
18321     fi
18322   fi
18323 
18324   # remove trailing .exe if any
18325   new_path="${new_path/%.exe/}"
18326 
18327   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18328 
18329   # First separate the path from the arguments. This will split at the first
18330   # space.
18331   complete="$BUILD_LD"
18332   path="${complete%% *}"
18333   tmp="$complete EOL"
18334   arguments="${tmp#* }"
18335 
18336   # Input might be given as Windows format, start by converting to
18337   # unix format.
18338   new_path="$path"
18339 
18340   windows_path="$new_path"
18341   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18342     unix_path=`$CYGPATH -u "$windows_path"`
18343     new_path="$unix_path"
18344   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18345     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18346     new_path="$unix_path"
18347   fi
18348 
18349 
18350   # Now try to locate executable using which
18351   new_path=`$WHICH "$new_path" 2> /dev/null`
18352 
18353   if test "x$new_path" = x; then
18354     # Oops. Which didn't find the executable.
18355     # The splitting of arguments from the executable at a space might have been incorrect,
18356     # since paths with space are more likely in Windows. Give it another try with the whole
18357     # argument.
18358     path="$complete"
18359     arguments="EOL"
18360     new_path="$path"
18361 
18362   windows_path="$new_path"
18363   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18364     unix_path=`$CYGPATH -u "$windows_path"`
18365     new_path="$unix_path"
18366   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18367     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18368     new_path="$unix_path"
18369   fi
18370 
18371 
18372     new_path=`$WHICH "$new_path" 2> /dev/null`
18373 
18374     if test "x$new_path" = x; then
18375       # It's still not found. Now this is an unrecoverable error.
18376       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18377 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18378       has_space=`$ECHO "$complete" | $GREP " "`
18379       if test "x$has_space" != x; then
18380         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18381 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18382       fi
18383       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18384     fi
18385   fi
18386 
18387   # Now new_path has a complete unix path to the binary
18388   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18389     # Keep paths in /bin as-is, but remove trailing .exe if any
18390     new_path="${new_path/%.exe/}"
18391     # Do not save /bin paths to all_fixpath_prefixes!
18392   else
18393     # Not in mixed or Windows style, start by that.
18394     new_path=`cmd //c echo $new_path`
18395 
18396   input_path="$new_path"
18397   # Check if we need to convert this using DOS-style short mode. If the path
18398   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18399   # take no chances and rewrite it.
18400   # Note: m4 eats our [], so we need to use [ and ] instead.
18401   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18402   if test "x$has_forbidden_chars" != x; then
18403     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18404     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18405   fi
18406 
18407     # Output is in $new_path
18408 
18409   windows_path="$new_path"
18410   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18411     unix_path=`$CYGPATH -u "$windows_path"`
18412     new_path="$unix_path"
18413   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18414     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18415     new_path="$unix_path"
18416   fi
18417 
18418     # remove trailing .exe if any
18419     new_path="${new_path/%.exe/}"
18420 
18421     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18422     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18423   fi
18424 
18425   else
18426     # We're on a posix platform. Hooray! :)
18427     # First separate the path from the arguments. This will split at the first
18428     # space.
18429     complete="$BUILD_LD"
18430     path="${complete%% *}"
18431     tmp="$complete EOL"
18432     arguments="${tmp#* }"
18433 
18434     # Cannot rely on the command "which" here since it doesn't always work.
18435     is_absolute_path=`$ECHO "$path" | $GREP ^/`
18436     if test -z "$is_absolute_path"; then
18437       # Path to executable is not absolute. Find it.
18438       IFS_save="$IFS"
18439       IFS=:
18440       for p in $PATH; do
18441         if test -f "$p/$path" && test -x "$p/$path"; then
18442           new_path="$p/$path"
18443           break
18444         fi
18445       done
18446       IFS="$IFS_save"
18447     else
18448       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
18449 $as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
18450       new_path="$path"
18451     fi
18452 
18453     if test "x$new_path" = x; then
18454         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18455 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18456         has_space=`$ECHO "$complete" | $GREP " "`
18457         if test "x$has_space" != x; then
18458           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18459 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18460         fi
18461         as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18462       fi
18463   fi
18464 
18465       # Now join together the path and the arguments once again
18466       if test "x$arguments" != xEOL; then
18467         new_complete="$new_path ${arguments% *}"
18468       else
18469         new_complete="$new_path"
18470       fi
18471 
18472   if test "x$complete" != "x$new_complete"; then
18473       BUILD_LD="$new_complete"
18474       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
18475 $as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
18476     fi
18477 
18478 fi
18479 
18480 
18481 
18482 
18483 # If a devkit is found on the builddeps server, then prepend its path to the
18484 # PATH variable. If there are cross compilers available in the devkit, these
18485 # will be found by AC_PROG_CC et al.
18486 DEVKIT=
18487 
18488 
18489     if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
18490         # Source the builddeps file again, to make sure it uses the latest variables!
18491         . $builddepsfile
18492         # Look for a target and build machine specific resource!
18493         eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
18494         if test "x$resource" = x; then
18495             # Ok, lets instead look for a target specific resource
18496             eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
18497         fi
18498         if test "x$resource" = x; then
18499             # Ok, lets instead look for a build specific resource
18500             eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
18501         fi
18502         if test "x$resource" = x; then
18503             # Ok, lets instead look for a generic resource
18504             # (The devkit comes from M4 and not the shell, thus no need for eval here.)
18505             resource=${builddep_devkit}
18506         fi
18507         if test "x$resource" != x; then
18508             { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
18509 $as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
18510             # If the resource in the builddeps.conf file is an existing directory,
18511             # for example /java/linux/cups
18512             if test -d ${resource}; then
18513                depdir=${resource}
18514             else
18515 
18516 # devkit is for example mymodule
18517 # $resource is for example libs/general/libmymod_1_2_3.zip
18518 # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
18519 # $with_builddeps_dir is for example /localhome/builddeps
18520 # depdir is the name of the variable into which we store the depdir, eg MYMOD
18521 # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
18522 # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
18523     filename=`basename $resource`
18524     filebase=`echo $filename | sed 's/\.[^\.]*$//'`
18525     filebase=${filename%%.*}
18526     extension=${filename#*.}
18527     installdir=$with_builddeps_dir/$filebase
18528     if test ! -f $installdir/$filename.unpacked; then
18529         { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
18530 $as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
18531         if test ! -d $installdir; then
18532             mkdir -p $installdir
18533         fi
18534         if test ! -d $installdir; then
18535             as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
18536         fi
18537         tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
18538         touch $tmpfile
18539         if test ! -f $tmpfile; then
18540             as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
18541         fi
18542 
18543     # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
18544     # $tmpfile is the local file name for the downloaded file.
18545     VALID_TOOL=no
18546     if test "x$BDEPS_FTP" = xwget; then
18547        VALID_TOOL=yes
18548        wget -O $tmpfile $with_builddeps_server/$resource
18549     fi
18550     if test "x$BDEPS_FTP" = xlftp; then
18551        VALID_TOOL=yes
18552        lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
18553     fi
18554     if test "x$BDEPS_FTP" = xftp; then
18555         VALID_TOOL=yes
18556         FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
18557         FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
18558         FTPUSERPWD=${FTPSERVER%%@*}
18559         if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
18560             FTPUSER=${userpwd%%:*}
18561             FTPPWD=${userpwd#*@}
18562             FTPSERVER=${FTPSERVER#*@}
18563         else
18564             FTPUSER=ftp
18565             FTPPWD=ftp
18566         fi
18567         # the "pass" command does not work on some
18568         # ftp clients (read ftp.exe) but if it works,
18569         # passive mode is better!
18570         (\
18571             echo "user $FTPUSER $FTPPWD"        ;\
18572             echo "pass"                         ;\
18573             echo "bin"                          ;\
18574             echo "get $FTPPATH $tmpfile"              ;\
18575         ) | ftp -in $FTPSERVER
18576     fi
18577     if test "x$VALID_TOOL" != xyes; then
18578        as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
18579     fi
18580 
18581         mv $tmpfile $installdir/$filename
18582         if test ! -s $installdir/$filename; then
18583             as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
18584         fi
18585         case "$extension" in
18586             zip)  echo "Unzipping $installdir/$filename..."
18587                (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
18588             ;;
18589             tar.gz) echo "Untaring $installdir/$filename..."
18590                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18591             ;;
18592             tgz) echo "Untaring $installdir/$filename..."
18593                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18594             ;;
18595             *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
18596             ;;
18597         esac
18598     fi
18599     if test -f $installdir/$filename.unpacked; then
18600         depdir=$installdir
18601     fi
18602 
18603             fi
18604             # Source the builddeps file again, because in the previous command, the depdir
18605             # was updated to point at the current build dependency install directory.
18606             . $builddepsfile
18607             # Now extract variables from the builddeps.conf files.
18608             theroot=${builddep_devkit_ROOT}
18609             thecflags=${builddep_devkit_CFLAGS}
18610             thelibs=${builddep_devkit_LIBS}
18611             if test "x$depdir" = x; then
18612                 as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
18613             fi
18614             DEVKIT=$depdir
18615             if test "x$theroot" != x; then
18616                DEVKIT="$theroot"
18617             fi
18618             if test "x$thecflags" != x; then
18619                DEVKIT_CFLAGS="$thecflags"
18620             fi
18621             if test "x$thelibs" != x; then
18622                DEVKIT_LIBS="$thelibs"
18623             fi
18624             # Found devkit
18625                      PATH="$DEVKIT/bin:$PATH"
18626                      SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
18627                      if test "x$x_includes" = "xNONE"; then
18628                          x_includes="$SYS_ROOT/usr/include/X11"
18629                      fi
18630                      if test "x$x_libraries" = "xNONE"; then
18631                          x_libraries="$SYS_ROOT/usr/lib"
18632                      fi
18633 
18634 
18635         fi
18636 
18637     fi
18638 
18639 
18640 if test "x$SYS_ROOT" != "x/" ; then
18641     CFLAGS="--sysroot=$SYS_ROOT $CFLAGS"
18642     CXXFLAGS="--sysroot=$SYS_ROOT $CXXFLAGS"
18643     OBJCFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
18644     OBJCXXFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
18645     CPPFLAGS="--sysroot=$SYS_ROOT $CPPFLAGS"
18646     LDFLAGS="--sysroot=$SYS_ROOT $LDFLAGS"
18647 fi
18648 
18649 # Store the CFLAGS etal passed to the configure script.
18650 ORG_CFLAGS="$CFLAGS"
18651 ORG_CXXFLAGS="$CXXFLAGS"
18652 ORG_OBJCFLAGS="$OBJCFLAGS"
18653 
18654 # autoconf magic only relies on PATH, so update it if tools dir is specified
18655 OLD_PATH="$PATH"
18656 if test "x$TOOLS_DIR" != x; then
18657   PATH=$TOOLS_DIR:$PATH
18658 fi
18659 
18660 
18661 ### Locate C compiler (CC)
18662 
18663 # On windows, only cl.exe is supported.
18664 # On Solaris, cc is preferred to gcc.
18665 # Elsewhere, gcc is preferred to cc.
18666 
18667 if test "x$CC" != x; then
18668   COMPILER_CHECK_LIST="$CC"
18669 elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
18670   COMPILER_CHECK_LIST="cl"
18671 elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
18672   COMPILER_CHECK_LIST="cc gcc"
18673 else
18674   COMPILER_CHECK_LIST="gcc cc"
18675 fi
18676 
18677 
18678   COMPILER_NAME=C
18679 
18680   CC=
18681   # If TOOLS_DIR is set, check for all compiler names in there first
18682   # before checking the rest of the PATH.
18683   if test -n "$TOOLS_DIR"; then
18684     PATH_save="$PATH"
18685     PATH="$TOOLS_DIR"
18686     for ac_prog in $COMPILER_CHECK_LIST
18687 do
18688   # Extract the first word of "$ac_prog", so it can be a program name with args.
18689 set dummy $ac_prog; ac_word=$2
18690 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18691 $as_echo_n "checking for $ac_word... " >&6; }
18692 if test "${ac_cv_path_TOOLS_DIR_CC+set}" = set; then :
18693   $as_echo_n "(cached) " >&6
18694 else
18695   case $TOOLS_DIR_CC in
18696   [\\/]* | ?:[\\/]*)
18697   ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
18698   ;;
18699   *)
18700   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18701 for as_dir in $PATH
18702 do
18703   IFS=$as_save_IFS
18704   test -z "$as_dir" && as_dir=.
18705     for ac_exec_ext in '' $ac_executable_extensions; do
18706   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18707     ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
18708     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18709     break 2
18710   fi
18711 done
18712   done
18713 IFS=$as_save_IFS
18714 
18715   ;;
18716 esac
18717 fi
18718 TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
18719 if test -n "$TOOLS_DIR_CC"; then
18720   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
18721 $as_echo "$TOOLS_DIR_CC" >&6; }
18722 else
18723   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18724 $as_echo "no" >&6; }
18725 fi
18726 
18727 
18728   test -n "$TOOLS_DIR_CC" && break
18729 done
18730 
18731     CC=$TOOLS_DIR_CC
18732     PATH="$PATH_save"
18733   fi
18734 
18735   # AC_PATH_PROGS can't be run multiple times with the same variable,
18736   # so create a new name for this run.
18737   if test "x$CC" = x; then
18738     for ac_prog in $COMPILER_CHECK_LIST
18739 do
18740   # Extract the first word of "$ac_prog", so it can be a program name with args.
18741 set dummy $ac_prog; ac_word=$2
18742 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18743 $as_echo_n "checking for $ac_word... " >&6; }
18744 if test "${ac_cv_path_POTENTIAL_CC+set}" = set; then :
18745   $as_echo_n "(cached) " >&6
18746 else
18747   case $POTENTIAL_CC in
18748   [\\/]* | ?:[\\/]*)
18749   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
18750   ;;
18751   *)
18752   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18753 for as_dir in $PATH
18754 do
18755   IFS=$as_save_IFS
18756   test -z "$as_dir" && as_dir=.
18757     for ac_exec_ext in '' $ac_executable_extensions; do
18758   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18759     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
18760     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18761     break 2
18762   fi
18763 done
18764   done
18765 IFS=$as_save_IFS
18766 
18767   ;;
18768 esac
18769 fi
18770 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
18771 if test -n "$POTENTIAL_CC"; then
18772   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
18773 $as_echo "$POTENTIAL_CC" >&6; }
18774 else
18775   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18776 $as_echo "no" >&6; }
18777 fi
18778 
18779 
18780   test -n "$POTENTIAL_CC" && break
18781 done
18782 
18783     CC=$POTENTIAL_CC
18784   fi
18785 
18786   if test "x$CC" = x; then
18787 
18788     # Print a helpful message on how to acquire the necessary build dependency.
18789     # devkit is the help tag: freetyp2, cups, pulse, alsa etc
18790     MISSING_DEPENDENCY=devkit
18791     PKGHANDLER_COMMAND=
18792 
18793     case $PKGHANDLER in
18794         apt-get)
18795                 apt_help     $MISSING_DEPENDENCY ;;
18796     yum)
18797                 yum_help     $MISSING_DEPENDENCY ;;
18798         port)
18799                 port_help    $MISSING_DEPENDENCY ;;
18800         pkgutil)
18801                 pkgutil_help $MISSING_DEPENDENCY ;;
18802         pkgadd)
18803                 pkgadd_help  $MISSING_DEPENDENCY ;;
18804     * )
18805       break ;;
18806     esac
18807 
18808     if test "x$PKGHANDLER_COMMAND" != x; then
18809         HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
18810     fi
18811 
18812       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
18813   fi
18814 
18815   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18816 
18817   # First separate the path from the arguments. This will split at the first
18818   # space.
18819   complete="$CC"
18820   path="${complete%% *}"
18821   tmp="$complete EOL"
18822   arguments="${tmp#* }"
18823 
18824   # Input might be given as Windows format, start by converting to
18825   # unix format.
18826   new_path=`$CYGPATH -u "$path"`
18827 
18828   # Now try to locate executable using which
18829   new_path=`$WHICH "$new_path" 2> /dev/null`
18830   # bat and cmd files are not always considered executable in cygwin causing which
18831   # to not find them
18832   if test "x$new_path" = x \
18833            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18834            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18835     new_path=`$CYGPATH -u "$path"`
18836   fi
18837   if test "x$new_path" = x; then
18838     # Oops. Which didn't find the executable.
18839     # The splitting of arguments from the executable at a space might have been incorrect,
18840     # since paths with space are more likely in Windows. Give it another try with the whole
18841     # argument.
18842     path="$complete"
18843     arguments="EOL"
18844     new_path=`$CYGPATH -u "$path"`
18845     new_path=`$WHICH "$new_path" 2> /dev/null`
18846     # bat and cmd files are not always considered executable in cygwin causing which
18847     # to not find them
18848     if test "x$new_path" = x \
18849              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18850              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18851       new_path=`$CYGPATH -u "$path"`
18852     fi
18853     if test "x$new_path" = x; then
18854       # It's still not found. Now this is an unrecoverable error.
18855       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18856 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18857       has_space=`$ECHO "$complete" | $GREP " "`
18858       if test "x$has_space" != x; then
18859         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18860 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18861       fi
18862       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18863     fi
18864   fi
18865 
18866   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18867   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18868   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18869   # "foo.exe" is OK but "foo" is an error.
18870   #
18871   # This test is therefore slightly more accurate than "test -f" to check for file precense.
18872   # It is also a way to make sure we got the proper file name for the real test later on.
18873   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18874   if test "x$test_shortpath" = x; then
18875     # Short path failed, file does not exist as specified.
18876     # Try adding .exe or .cmd
18877     if test -f "${new_path}.exe"; then
18878        input_to_shortpath="${new_path}.exe"
18879     elif test -f "${new_path}.cmd"; then
18880        input_to_shortpath="${new_path}.cmd"
18881     else
18882       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
18883 $as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
18884       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18885 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18886       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18887     fi
18888   else
18889     input_to_shortpath="$new_path"
18890   fi
18891 
18892   # Call helper function which possibly converts this using DOS-style short mode.
18893   # If so, the updated path is stored in $new_path.
18894   new_path="$input_to_shortpath"
18895 
18896   input_path="$input_to_shortpath"
18897   # Check if we need to convert this using DOS-style short mode. If the path
18898   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18899   # take no chances and rewrite it.
18900   # Note: m4 eats our [], so we need to use [ and ] instead.
18901   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18902   if test "x$has_forbidden_chars" != x; then
18903     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18904     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18905     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18906     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18907       # Going to short mode and back again did indeed matter. Since short mode is
18908       # case insensitive, let's make it lowercase to improve readability.
18909       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18910       # Now convert it back to Unix-stile (cygpath)
18911       input_path=`$CYGPATH -u "$shortmode_path"`
18912       new_path="$input_path"
18913     fi
18914   fi
18915 
18916   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18917   if test "x$test_cygdrive_prefix" = x; then
18918     # As a simple fix, exclude /usr/bin since it's not a real path.
18919     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18920       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18921       # a path prefixed by /cygdrive for fixpath to work.
18922       new_path="$CYGWIN_ROOT_PATH$input_path"
18923     fi
18924   fi
18925 
18926   # remove trailing .exe if any
18927   new_path="${new_path/%.exe/}"
18928 
18929   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18930 
18931   # First separate the path from the arguments. This will split at the first
18932   # space.
18933   complete="$CC"
18934   path="${complete%% *}"
18935   tmp="$complete EOL"
18936   arguments="${tmp#* }"
18937 
18938   # Input might be given as Windows format, start by converting to
18939   # unix format.
18940   new_path="$path"
18941 
18942   windows_path="$new_path"
18943   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18944     unix_path=`$CYGPATH -u "$windows_path"`
18945     new_path="$unix_path"
18946   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18947     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18948     new_path="$unix_path"
18949   fi
18950 
18951 
18952   # Now try to locate executable using which
18953   new_path=`$WHICH "$new_path" 2> /dev/null`
18954 
18955   if test "x$new_path" = x; then
18956     # Oops. Which didn't find the executable.
18957     # The splitting of arguments from the executable at a space might have been incorrect,
18958     # since paths with space are more likely in Windows. Give it another try with the whole
18959     # argument.
18960     path="$complete"
18961     arguments="EOL"
18962     new_path="$path"
18963 
18964   windows_path="$new_path"
18965   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18966     unix_path=`$CYGPATH -u "$windows_path"`
18967     new_path="$unix_path"
18968   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18969     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18970     new_path="$unix_path"
18971   fi
18972 
18973 
18974     new_path=`$WHICH "$new_path" 2> /dev/null`
18975 
18976     if test "x$new_path" = x; then
18977       # It's still not found. Now this is an unrecoverable error.
18978       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18979 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18980       has_space=`$ECHO "$complete" | $GREP " "`
18981       if test "x$has_space" != x; then
18982         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18983 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18984       fi
18985       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18986     fi
18987   fi
18988 
18989   # Now new_path has a complete unix path to the binary
18990   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18991     # Keep paths in /bin as-is, but remove trailing .exe if any
18992     new_path="${new_path/%.exe/}"
18993     # Do not save /bin paths to all_fixpath_prefixes!
18994   else
18995     # Not in mixed or Windows style, start by that.
18996     new_path=`cmd //c echo $new_path`
18997 
18998   input_path="$new_path"
18999   # Check if we need to convert this using DOS-style short mode. If the path
19000   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19001   # take no chances and rewrite it.
19002   # Note: m4 eats our [], so we need to use [ and ] instead.
19003   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19004   if test "x$has_forbidden_chars" != x; then
19005     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19006     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19007   fi
19008 
19009     # Output is in $new_path
19010 
19011   windows_path="$new_path"
19012   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19013     unix_path=`$CYGPATH -u "$windows_path"`
19014     new_path="$unix_path"
19015   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19016     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19017     new_path="$unix_path"
19018   fi
19019 
19020     # remove trailing .exe if any
19021     new_path="${new_path/%.exe/}"
19022 
19023     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19024     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19025   fi
19026 
19027   else
19028     # We're on a posix platform. Hooray! :)
19029     # First separate the path from the arguments. This will split at the first
19030     # space.
19031     complete="$CC"
19032     path="${complete%% *}"
19033     tmp="$complete EOL"
19034     arguments="${tmp#* }"
19035 
19036     # Cannot rely on the command "which" here since it doesn't always work.
19037     is_absolute_path=`$ECHO "$path" | $GREP ^/`
19038     if test -z "$is_absolute_path"; then
19039       # Path to executable is not absolute. Find it.
19040       IFS_save="$IFS"
19041       IFS=:
19042       for p in $PATH; do
19043         if test -f "$p/$path" && test -x "$p/$path"; then
19044           new_path="$p/$path"
19045           break
19046         fi
19047       done
19048       IFS="$IFS_save"
19049     else
19050       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
19051 $as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
19052       new_path="$path"
19053     fi
19054 
19055     if test "x$new_path" = x; then
19056         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19057 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19058         has_space=`$ECHO "$complete" | $GREP " "`
19059         if test "x$has_space" != x; then
19060           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19061 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19062         fi
19063         as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19064       fi
19065   fi
19066 
19067       # Now join together the path and the arguments once again
19068       if test "x$arguments" != xEOL; then
19069         new_complete="$new_path ${arguments% *}"
19070       else
19071         new_complete="$new_path"
19072       fi
19073 
19074   if test "x$complete" != "x$new_complete"; then
19075       CC="$new_complete"
19076       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
19077 $as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
19078     fi
19079 
19080   { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
19081 $as_echo_n "checking resolved symbolic links for CC... " >&6; }
19082   TEST_COMPILER="$CC"
19083 
19084     if test "x$OPENJDK_BUILD_OS" != xwindows; then
19085         # Follow a chain of symbolic links. Use readlink
19086         # where it exists, else fall back to horribly
19087         # complicated shell code.
19088         if test "x$READLINK_TESTED" != yes; then
19089             # On MacOSX there is a readlink tool with a different
19090             # purpose than the GNU readlink tool. Check the found readlink.
19091             ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19092             if test "x$ISGNU" = x; then
19093                  # A readlink that we do not know how to use.
19094                  # Are there other non-GNU readlinks out there?
19095                  READLINK_TESTED=yes
19096                  READLINK=
19097             fi
19098         fi
19099 
19100         if test "x$READLINK" != x; then
19101             TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
19102         else
19103             # Save the current directory for restoring afterwards
19104             STARTDIR=$PWD
19105             COUNTER=0
19106             sym_link_dir=`$DIRNAME $TEST_COMPILER`
19107             sym_link_file=`$BASENAME $TEST_COMPILER`
19108             # Use the system pwd and not the shell builtin to resolve directory symlinks
19109             cd $sym_link_dir
19110             cd `$THEPWDCMD`
19111             sym_link_dir=`$THEPWDCMD`
19112             # Resolve file symlinks
19113             while test $COUNTER -lt 20; do
19114                 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19115                 if test "x$ISLINK" == x; then
19116                     # This is not a symbolic link! We are done!
19117                     break
19118                 fi
19119                 # Again resolve directory symlinks since the target of the just found
19120                 # link could be in a different directory
19121                 cd `$DIRNAME $ISLINK`
19122                 sym_link_dir=`$THEPWDCMD`
19123                 sym_link_file=`$BASENAME $ISLINK`
19124                 let COUNTER=COUNTER+1
19125             done
19126             cd $STARTDIR
19127             TEST_COMPILER=$sym_link_dir/$sym_link_file
19128         fi
19129     fi
19130 
19131   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
19132 $as_echo "$TEST_COMPILER" >&6; }
19133   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
19134 $as_echo_n "checking if CC is disguised ccache... " >&6; }
19135 
19136   COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
19137   if test "x$COMPILER_BASENAME" = "xccache"; then
19138     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
19139 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
19140     # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
19141     # We want to control ccache invocation ourselves, so ignore this cc and try
19142     # searching again.
19143 
19144     # Remove the path to the fake ccache cc from the PATH
19145     RETRY_COMPILER_SAVED_PATH="$PATH"
19146     COMPILER_DIRNAME=`$DIRNAME $CC`
19147     PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
19148 
19149     # Try again looking for our compiler
19150     if test -n "$ac_tool_prefix"; then
19151   for ac_prog in $COMPILER_CHECK_LIST
19152   do
19153     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19154 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19156 $as_echo_n "checking for $ac_word... " >&6; }
19157 if test "${ac_cv_prog_PROPER_COMPILER_CC+set}" = set; then :
19158   $as_echo_n "(cached) " >&6
19159 else
19160   if test -n "$PROPER_COMPILER_CC"; then
19161   ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
19162 else
19163 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19164 for as_dir in $PATH
19165 do
19166   IFS=$as_save_IFS
19167   test -z "$as_dir" && as_dir=.
19168     for ac_exec_ext in '' $ac_executable_extensions; do
19169   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19170     ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
19171     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19172     break 2
19173   fi
19174 done
19175   done
19176 IFS=$as_save_IFS
19177 
19178 fi
19179 fi
19180 PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
19181 if test -n "$PROPER_COMPILER_CC"; then
19182   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19183 $as_echo "$PROPER_COMPILER_CC" >&6; }
19184 else
19185   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19186 $as_echo "no" >&6; }
19187 fi
19188 
19189 
19190     test -n "$PROPER_COMPILER_CC" && break
19191   done
19192 fi
19193 if test -z "$PROPER_COMPILER_CC"; then
19194   ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
19195   for ac_prog in $COMPILER_CHECK_LIST
19196 do
19197   # Extract the first word of "$ac_prog", so it can be a program name with args.
19198 set dummy $ac_prog; ac_word=$2
19199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19200 $as_echo_n "checking for $ac_word... " >&6; }
19201 if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+set}" = set; then :
19202   $as_echo_n "(cached) " >&6
19203 else
19204   if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19205   ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
19206 else
19207 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19208 for as_dir in $PATH
19209 do
19210   IFS=$as_save_IFS
19211   test -z "$as_dir" && as_dir=.
19212     for ac_exec_ext in '' $ac_executable_extensions; do
19213   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19214     ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
19215     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19216     break 2
19217   fi
19218 done
19219   done
19220 IFS=$as_save_IFS
19221 
19222 fi
19223 fi
19224 ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
19225 if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19226   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
19227 $as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
19228 else
19229   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19230 $as_echo "no" >&6; }
19231 fi
19232 
19233 
19234   test -n "$ac_ct_PROPER_COMPILER_CC" && break
19235 done
19236 
19237   if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
19238     PROPER_COMPILER_CC=""
19239   else
19240     case $cross_compiling:$ac_tool_warned in
19241 yes:)
19242 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19243 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19244 ac_tool_warned=yes ;;
19245 esac
19246     PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
19247   fi
19248 fi
19249 
19250 
19251   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19252 
19253   # First separate the path from the arguments. This will split at the first
19254   # space.
19255   complete="$PROPER_COMPILER_CC"
19256   path="${complete%% *}"
19257   tmp="$complete EOL"
19258   arguments="${tmp#* }"
19259 
19260   # Input might be given as Windows format, start by converting to
19261   # unix format.
19262   new_path=`$CYGPATH -u "$path"`
19263 
19264   # Now try to locate executable using which
19265   new_path=`$WHICH "$new_path" 2> /dev/null`
19266   # bat and cmd files are not always considered executable in cygwin causing which
19267   # to not find them
19268   if test "x$new_path" = x \
19269            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19270            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19271     new_path=`$CYGPATH -u "$path"`
19272   fi
19273   if test "x$new_path" = x; then
19274     # Oops. Which didn't find the executable.
19275     # The splitting of arguments from the executable at a space might have been incorrect,
19276     # since paths with space are more likely in Windows. Give it another try with the whole
19277     # argument.
19278     path="$complete"
19279     arguments="EOL"
19280     new_path=`$CYGPATH -u "$path"`
19281     new_path=`$WHICH "$new_path" 2> /dev/null`
19282     # bat and cmd files are not always considered executable in cygwin causing which
19283     # to not find them
19284     if test "x$new_path" = x \
19285              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19286              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19287       new_path=`$CYGPATH -u "$path"`
19288     fi
19289     if test "x$new_path" = x; then
19290       # It's still not found. Now this is an unrecoverable error.
19291       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19292 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19293       has_space=`$ECHO "$complete" | $GREP " "`
19294       if test "x$has_space" != x; then
19295         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19296 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19297       fi
19298       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19299     fi
19300   fi
19301 
19302   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19303   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19304   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19305   # "foo.exe" is OK but "foo" is an error.
19306   #
19307   # This test is therefore slightly more accurate than "test -f" to check for file precense.
19308   # It is also a way to make sure we got the proper file name for the real test later on.
19309   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19310   if test "x$test_shortpath" = x; then
19311     # Short path failed, file does not exist as specified.
19312     # Try adding .exe or .cmd
19313     if test -f "${new_path}.exe"; then
19314        input_to_shortpath="${new_path}.exe"
19315     elif test -f "${new_path}.cmd"; then
19316        input_to_shortpath="${new_path}.cmd"
19317     else
19318       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
19319 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
19320       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19321 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19322       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19323     fi
19324   else
19325     input_to_shortpath="$new_path"
19326   fi
19327 
19328   # Call helper function which possibly converts this using DOS-style short mode.
19329   # If so, the updated path is stored in $new_path.
19330   new_path="$input_to_shortpath"
19331 
19332   input_path="$input_to_shortpath"
19333   # Check if we need to convert this using DOS-style short mode. If the path
19334   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19335   # take no chances and rewrite it.
19336   # Note: m4 eats our [], so we need to use [ and ] instead.
19337   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19338   if test "x$has_forbidden_chars" != x; then
19339     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19340     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19341     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19342     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19343       # Going to short mode and back again did indeed matter. Since short mode is
19344       # case insensitive, let's make it lowercase to improve readability.
19345       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19346       # Now convert it back to Unix-stile (cygpath)
19347       input_path=`$CYGPATH -u "$shortmode_path"`
19348       new_path="$input_path"
19349     fi
19350   fi
19351 
19352   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19353   if test "x$test_cygdrive_prefix" = x; then
19354     # As a simple fix, exclude /usr/bin since it's not a real path.
19355     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19356       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19357       # a path prefixed by /cygdrive for fixpath to work.
19358       new_path="$CYGWIN_ROOT_PATH$input_path"
19359     fi
19360   fi
19361 
19362   # remove trailing .exe if any
19363   new_path="${new_path/%.exe/}"
19364 
19365   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19366 
19367   # First separate the path from the arguments. This will split at the first
19368   # space.
19369   complete="$PROPER_COMPILER_CC"
19370   path="${complete%% *}"
19371   tmp="$complete EOL"
19372   arguments="${tmp#* }"
19373 
19374   # Input might be given as Windows format, start by converting to
19375   # unix format.
19376   new_path="$path"
19377 
19378   windows_path="$new_path"
19379   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19380     unix_path=`$CYGPATH -u "$windows_path"`
19381     new_path="$unix_path"
19382   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19383     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19384     new_path="$unix_path"
19385   fi
19386 
19387 
19388   # Now try to locate executable using which
19389   new_path=`$WHICH "$new_path" 2> /dev/null`
19390 
19391   if test "x$new_path" = x; then
19392     # Oops. Which didn't find the executable.
19393     # The splitting of arguments from the executable at a space might have been incorrect,
19394     # since paths with space are more likely in Windows. Give it another try with the whole
19395     # argument.
19396     path="$complete"
19397     arguments="EOL"
19398     new_path="$path"
19399 
19400   windows_path="$new_path"
19401   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19402     unix_path=`$CYGPATH -u "$windows_path"`
19403     new_path="$unix_path"
19404   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19405     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19406     new_path="$unix_path"
19407   fi
19408 
19409 
19410     new_path=`$WHICH "$new_path" 2> /dev/null`
19411 
19412     if test "x$new_path" = x; then
19413       # It's still not found. Now this is an unrecoverable error.
19414       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19415 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19416       has_space=`$ECHO "$complete" | $GREP " "`
19417       if test "x$has_space" != x; then
19418         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19419 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19420       fi
19421       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19422     fi
19423   fi
19424 
19425   # Now new_path has a complete unix path to the binary
19426   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19427     # Keep paths in /bin as-is, but remove trailing .exe if any
19428     new_path="${new_path/%.exe/}"
19429     # Do not save /bin paths to all_fixpath_prefixes!
19430   else
19431     # Not in mixed or Windows style, start by that.
19432     new_path=`cmd //c echo $new_path`
19433 
19434   input_path="$new_path"
19435   # Check if we need to convert this using DOS-style short mode. If the path
19436   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19437   # take no chances and rewrite it.
19438   # Note: m4 eats our [], so we need to use [ and ] instead.
19439   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19440   if test "x$has_forbidden_chars" != x; then
19441     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19442     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19443   fi
19444 
19445     # Output is in $new_path
19446 
19447   windows_path="$new_path"
19448   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19449     unix_path=`$CYGPATH -u "$windows_path"`
19450     new_path="$unix_path"
19451   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19452     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19453     new_path="$unix_path"
19454   fi
19455 
19456     # remove trailing .exe if any
19457     new_path="${new_path/%.exe/}"
19458 
19459     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19460     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19461   fi
19462 
19463   else
19464     # We're on a posix platform. Hooray! :)
19465     # First separate the path from the arguments. This will split at the first
19466     # space.
19467     complete="$PROPER_COMPILER_CC"
19468     path="${complete%% *}"
19469     tmp="$complete EOL"
19470     arguments="${tmp#* }"
19471 
19472     # Cannot rely on the command "which" here since it doesn't always work.
19473     is_absolute_path=`$ECHO "$path" | $GREP ^/`
19474     if test -z "$is_absolute_path"; then
19475       # Path to executable is not absolute. Find it.
19476       IFS_save="$IFS"
19477       IFS=:
19478       for p in $PATH; do
19479         if test -f "$p/$path" && test -x "$p/$path"; then
19480           new_path="$p/$path"
19481           break
19482         fi
19483       done
19484       IFS="$IFS_save"
19485     else
19486       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
19487 $as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
19488       new_path="$path"
19489     fi
19490 
19491     if test "x$new_path" = x; then
19492         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19493 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19494         has_space=`$ECHO "$complete" | $GREP " "`
19495         if test "x$has_space" != x; then
19496           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19497 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19498         fi
19499         as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19500       fi
19501   fi
19502 
19503       # Now join together the path and the arguments once again
19504       if test "x$arguments" != xEOL; then
19505         new_complete="$new_path ${arguments% *}"
19506       else
19507         new_complete="$new_path"
19508       fi
19509 
19510   if test "x$complete" != "x$new_complete"; then
19511       PROPER_COMPILER_CC="$new_complete"
19512       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
19513 $as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
19514     fi
19515 
19516     PATH="$RETRY_COMPILER_SAVED_PATH"
19517 
19518     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
19519 $as_echo_n "checking for resolved symbolic links for CC... " >&6; }
19520 
19521     if test "x$OPENJDK_BUILD_OS" != xwindows; then
19522         # Follow a chain of symbolic links. Use readlink
19523         # where it exists, else fall back to horribly
19524         # complicated shell code.
19525         if test "x$READLINK_TESTED" != yes; then
19526             # On MacOSX there is a readlink tool with a different
19527             # purpose than the GNU readlink tool. Check the found readlink.
19528             ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19529             if test "x$ISGNU" = x; then
19530                  # A readlink that we do not know how to use.
19531                  # Are there other non-GNU readlinks out there?
19532                  READLINK_TESTED=yes
19533                  READLINK=
19534             fi
19535         fi
19536 
19537         if test "x$READLINK" != x; then
19538             PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
19539         else
19540             # Save the current directory for restoring afterwards
19541             STARTDIR=$PWD
19542             COUNTER=0
19543             sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
19544             sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
19545             # Use the system pwd and not the shell builtin to resolve directory symlinks
19546             cd $sym_link_dir
19547             cd `$THEPWDCMD`
19548             sym_link_dir=`$THEPWDCMD`
19549             # Resolve file symlinks
19550             while test $COUNTER -lt 20; do
19551                 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19552                 if test "x$ISLINK" == x; then
19553                     # This is not a symbolic link! We are done!
19554                     break
19555                 fi
19556                 # Again resolve directory symlinks since the target of the just found
19557                 # link could be in a different directory
19558                 cd `$DIRNAME $ISLINK`
19559                 sym_link_dir=`$THEPWDCMD`
19560                 sym_link_file=`$BASENAME $ISLINK`
19561                 let COUNTER=COUNTER+1
19562             done
19563             cd $STARTDIR
19564             PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
19565         fi
19566     fi
19567 
19568     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19569 $as_echo "$PROPER_COMPILER_CC" >&6; }
19570     CC="$PROPER_COMPILER_CC"
19571   else
19572     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
19573 $as_echo "no, keeping CC" >&6; }
19574     CC="$TEST_COMPILER"
19575   fi
19576 
19577   COMPILER=$CC
19578   COMPILER_NAME=$COMPILER_NAME
19579 
19580   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
19581     # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
19582     COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
19583     $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
19584     if test $? -ne 0; then
19585       GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19586 
19587       { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&5
19588 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
19589       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
19590 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
19591       as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19592     else
19593       COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
19594       COMPILER_VENDOR="Sun Studio"
19595     fi
19596   elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
19597     # First line typically looks something like:
19598     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
19599     COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
19600     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
19601     COMPILER_VENDOR="Microsoft CL.EXE"
19602     COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
19603     if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
19604       if test "x$COMPILER_CPU_TEST" != "x80x86"; then
19605         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
19606       fi
19607     elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
19608       if test "x$COMPILER_CPU_TEST" != "xx64"; then
19609         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
19610       fi
19611     fi
19612   else
19613     COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19614     # Check that this is likely to be GCC.
19615     $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
19616     if test $? -ne 0; then
19617       { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
19618 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
19619       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
19620 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
19621       as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19622     fi
19623 
19624     # First line typically looks something like:
19625     # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
19626     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
19627     COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
19628   fi
19629   # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
19630   CC_VERSION="$COMPILER_VERSION"
19631   # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
19632   CC_VENDOR="$COMPILER_VENDOR"
19633 
19634   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
19635 $as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
19636 
19637 
19638 # Now that we have resolved CC ourself, let autoconf have its go at it
19639 ac_ext=c
19640 ac_cpp='$CPP $CPPFLAGS'
19641 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19642 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19643 ac_compiler_gnu=$ac_cv_c_compiler_gnu
19644 if test -n "$ac_tool_prefix"; then
19645   for ac_prog in $CC
19646   do
19647     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19648 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19650 $as_echo_n "checking for $ac_word... " >&6; }
19651 if test "${ac_cv_prog_CC+set}" = set; then :
19652   $as_echo_n "(cached) " >&6
19653 else
19654   if test -n "$CC"; then
19655   ac_cv_prog_CC="$CC" # Let the user override the test.
19656 else
19657 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19658 for as_dir in $PATH
19659 do
19660   IFS=$as_save_IFS
19661   test -z "$as_dir" && as_dir=.
19662     for ac_exec_ext in '' $ac_executable_extensions; do
19663   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19664     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
19665     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19666     break 2
19667   fi
19668 done
19669   done
19670 IFS=$as_save_IFS
19671 
19672 fi
19673 fi
19674 CC=$ac_cv_prog_CC
19675 if test -n "$CC"; then
19676   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
19677 $as_echo "$CC" >&6; }
19678 else
19679   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19680 $as_echo "no" >&6; }
19681 fi
19682 
19683 
19684     test -n "$CC" && break
19685   done
19686 fi
19687 if test -z "$CC"; then
19688   ac_ct_CC=$CC
19689   for ac_prog in $CC
19690 do
19691   # Extract the first word of "$ac_prog", so it can be a program name with args.
19692 set dummy $ac_prog; ac_word=$2
19693 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19694 $as_echo_n "checking for $ac_word... " >&6; }
19695 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
19696   $as_echo_n "(cached) " >&6
19697 else
19698   if test -n "$ac_ct_CC"; then
19699   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
19700 else
19701 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19702 for as_dir in $PATH
19703 do
19704   IFS=$as_save_IFS
19705   test -z "$as_dir" && as_dir=.
19706     for ac_exec_ext in '' $ac_executable_extensions; do
19707   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19708     ac_cv_prog_ac_ct_CC="$ac_prog"
19709     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19710     break 2
19711   fi
19712 done
19713   done
19714 IFS=$as_save_IFS
19715 
19716 fi
19717 fi
19718 ac_ct_CC=$ac_cv_prog_ac_ct_CC
19719 if test -n "$ac_ct_CC"; then
19720   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
19721 $as_echo "$ac_ct_CC" >&6; }
19722 else
19723   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19724 $as_echo "no" >&6; }
19725 fi
19726 
19727 
19728   test -n "$ac_ct_CC" && break
19729 done
19730 
19731   if test "x$ac_ct_CC" = x; then
19732     CC=""
19733   else
19734     case $cross_compiling:$ac_tool_warned in
19735 yes:)
19736 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19737 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19738 ac_tool_warned=yes ;;
19739 esac
19740     CC=$ac_ct_CC
19741   fi
19742 fi
19743 
19744 
19745 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19746 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19747 as_fn_error $? "no acceptable C compiler found in \$PATH
19748 See \`config.log' for more details" "$LINENO" 5 ; }
19749 
19750 # Provide some information about the compiler.
19751 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
19752 set X $ac_compile
19753 ac_compiler=$2
19754 for ac_option in --version -v -V -qversion; do
19755   { { ac_try="$ac_compiler $ac_option >&5"
19756 case "(($ac_try" in
19757   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19758   *) ac_try_echo=$ac_try;;
19759 esac
19760 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19761 $as_echo "$ac_try_echo"; } >&5
19762   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
19763   ac_status=$?
19764   if test -s conftest.err; then
19765     sed '10a\
19766 ... rest of stderr output deleted ...
19767          10q' conftest.err >conftest.er1
19768     cat conftest.er1 >&5
19769   fi
19770   rm -f conftest.er1 conftest.err
19771   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19772   test $ac_status = 0; }
19773 done
19774 
19775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19776 /* end confdefs.h.  */
19777 
19778 int
19779 main ()
19780 {
19781 
19782   ;
19783   return 0;
19784 }
19785 _ACEOF
19786 ac_clean_files_save=$ac_clean_files
19787 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
19788 # Try to create an executable without -o first, disregard a.out.
19789 # It will help us diagnose broken compilers, and finding out an intuition
19790 # of exeext.
19791 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
19792 $as_echo_n "checking whether the C compiler works... " >&6; }
19793 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
19794 
19795 # The possible output files:
19796 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
19797 
19798 ac_rmfiles=
19799 for ac_file in $ac_files
19800 do
19801   case $ac_file in
19802     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
19803     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
19804   esac
19805 done
19806 rm -f $ac_rmfiles
19807 
19808 if { { ac_try="$ac_link_default"
19809 case "(($ac_try" in
19810   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19811   *) ac_try_echo=$ac_try;;
19812 esac
19813 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19814 $as_echo "$ac_try_echo"; } >&5
19815   (eval "$ac_link_default") 2>&5
19816   ac_status=$?
19817   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19818   test $ac_status = 0; }; then :
19819   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
19820 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
19821 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
19822 # so that the user can short-circuit this test for compilers unknown to
19823 # Autoconf.
19824 for ac_file in $ac_files ''
19825 do
19826   test -f "$ac_file" || continue
19827   case $ac_file in
19828     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
19829         ;;
19830     [ab].out )
19831         # We found the default executable, but exeext='' is most
19832         # certainly right.
19833         break;;
19834     *.* )
19835         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
19836         then :; else
19837            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
19838         fi
19839         # We set ac_cv_exeext here because the later test for it is not
19840         # safe: cross compilers may not add the suffix if given an `-o'
19841         # argument, so we may need to know it at that point already.
19842         # Even if this section looks crufty: it has the advantage of
19843         # actually working.
19844         break;;
19845     * )
19846         break;;
19847   esac
19848 done
19849 test "$ac_cv_exeext" = no && ac_cv_exeext=
19850 
19851 else
19852   ac_file=''
19853 fi
19854 if test -z "$ac_file"; then :
19855   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19856 $as_echo "no" >&6; }
19857 $as_echo "$as_me: failed program was:" >&5
19858 sed 's/^/| /' conftest.$ac_ext >&5
19859 
19860 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19861 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19862 as_fn_error 77 "C compiler cannot create executables
19863 See \`config.log' for more details" "$LINENO" 5 ; }
19864 else
19865   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19866 $as_echo "yes" >&6; }
19867 fi
19868 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
19869 $as_echo_n "checking for C compiler default output file name... " >&6; }
19870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
19871 $as_echo "$ac_file" >&6; }
19872 ac_exeext=$ac_cv_exeext
19873 
19874 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
19875 ac_clean_files=$ac_clean_files_save
19876 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
19877 $as_echo_n "checking for suffix of executables... " >&6; }
19878 if { { ac_try="$ac_link"
19879 case "(($ac_try" in
19880   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19881   *) ac_try_echo=$ac_try;;
19882 esac
19883 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19884 $as_echo "$ac_try_echo"; } >&5
19885   (eval "$ac_link") 2>&5
19886   ac_status=$?
19887   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19888   test $ac_status = 0; }; then :
19889   # If both `conftest.exe' and `conftest' are `present' (well, observable)
19890 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
19891 # work properly (i.e., refer to `conftest.exe'), while it won't with
19892 # `rm'.
19893 for ac_file in conftest.exe conftest conftest.*; do
19894   test -f "$ac_file" || continue
19895   case $ac_file in
19896     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
19897     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
19898           break;;
19899     * ) break;;
19900   esac
19901 done
19902 else
19903   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19904 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19905 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
19906 See \`config.log' for more details" "$LINENO" 5 ; }
19907 fi
19908 rm -f conftest conftest$ac_cv_exeext
19909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
19910 $as_echo "$ac_cv_exeext" >&6; }
19911 
19912 rm -f conftest.$ac_ext
19913 EXEEXT=$ac_cv_exeext
19914 ac_exeext=$EXEEXT
19915 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19916 /* end confdefs.h.  */
19917 #include <stdio.h>
19918 int
19919 main ()
19920 {
19921 FILE *f = fopen ("conftest.out", "w");
19922  return ferror (f) || fclose (f) != 0;
19923 
19924   ;
19925   return 0;
19926 }
19927 _ACEOF
19928 ac_clean_files="$ac_clean_files conftest.out"
19929 # Check that the compiler produces executables we can run.  If not, either
19930 # the compiler is broken, or we cross compile.
19931 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
19932 $as_echo_n "checking whether we are cross compiling... " >&6; }
19933 if test "$cross_compiling" != yes; then
19934   { { ac_try="$ac_link"
19935 case "(($ac_try" in
19936   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19937   *) ac_try_echo=$ac_try;;
19938 esac
19939 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19940 $as_echo "$ac_try_echo"; } >&5
19941   (eval "$ac_link") 2>&5
19942   ac_status=$?
19943   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19944   test $ac_status = 0; }
19945   if { ac_try='./conftest$ac_cv_exeext'
19946   { { case "(($ac_try" in
19947   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19948   *) ac_try_echo=$ac_try;;
19949 esac
19950 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19951 $as_echo "$ac_try_echo"; } >&5
19952   (eval "$ac_try") 2>&5
19953   ac_status=$?
19954   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19955   test $ac_status = 0; }; }; then
19956     cross_compiling=no
19957   else
19958     if test "$cross_compiling" = maybe; then
19959         cross_compiling=yes
19960     else
19961         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19962 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19963 as_fn_error $? "cannot run C compiled programs.
19964 If you meant to cross compile, use \`--host'.
19965 See \`config.log' for more details" "$LINENO" 5 ; }
19966     fi
19967   fi
19968 fi
19969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
19970 $as_echo "$cross_compiling" >&6; }
19971 
19972 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
19973 ac_clean_files=$ac_clean_files_save
19974 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
19975 $as_echo_n "checking for suffix of object files... " >&6; }
19976 if test "${ac_cv_objext+set}" = set; then :
19977   $as_echo_n "(cached) " >&6
19978 else
19979   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19980 /* end confdefs.h.  */
19981 
19982 int
19983 main ()
19984 {
19985 
19986   ;
19987   return 0;
19988 }
19989 _ACEOF
19990 rm -f conftest.o conftest.obj
19991 if { { ac_try="$ac_compile"
19992 case "(($ac_try" in
19993   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19994   *) ac_try_echo=$ac_try;;
19995 esac
19996 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19997 $as_echo "$ac_try_echo"; } >&5
19998   (eval "$ac_compile") 2>&5
19999   ac_status=$?
20000   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20001   test $ac_status = 0; }; then :
20002   for ac_file in conftest.o conftest.obj conftest.*; do
20003   test -f "$ac_file" || continue;
20004   case $ac_file in
20005     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
20006     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
20007        break;;
20008   esac
20009 done
20010 else
20011   $as_echo "$as_me: failed program was:" >&5
20012 sed 's/^/| /' conftest.$ac_ext >&5
20013 
20014 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20015 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20016 as_fn_error $? "cannot compute suffix of object files: cannot compile
20017 See \`config.log' for more details" "$LINENO" 5 ; }
20018 fi
20019 rm -f conftest.$ac_cv_objext conftest.$ac_ext
20020 fi
20021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
20022 $as_echo "$ac_cv_objext" >&6; }
20023 OBJEXT=$ac_cv_objext
20024 ac_objext=$OBJEXT
20025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
20026 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
20027 if test "${ac_cv_c_compiler_gnu+set}" = set; then :
20028   $as_echo_n "(cached) " >&6
20029 else
20030   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20031 /* end confdefs.h.  */
20032 
20033 int
20034 main ()
20035 {
20036 #ifndef __GNUC__
20037        choke me
20038 #endif
20039 
20040   ;
20041   return 0;
20042 }
20043 _ACEOF
20044 if ac_fn_c_try_compile "$LINENO"; then :
20045   ac_compiler_gnu=yes
20046 else
20047   ac_compiler_gnu=no
20048 fi
20049 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20050 ac_cv_c_compiler_gnu=$ac_compiler_gnu
20051 
20052 fi
20053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
20054 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
20055 if test $ac_compiler_gnu = yes; then
20056   GCC=yes
20057 else
20058   GCC=
20059 fi
20060 ac_test_CFLAGS=${CFLAGS+set}
20061 ac_save_CFLAGS=$CFLAGS
20062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
20063 $as_echo_n "checking whether $CC accepts -g... " >&6; }
20064 if test "${ac_cv_prog_cc_g+set}" = set; then :
20065   $as_echo_n "(cached) " >&6
20066 else
20067   ac_save_c_werror_flag=$ac_c_werror_flag
20068    ac_c_werror_flag=yes
20069    ac_cv_prog_cc_g=no
20070    CFLAGS="-g"
20071    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20072 /* end confdefs.h.  */
20073 
20074 int
20075 main ()
20076 {
20077 
20078   ;
20079   return 0;
20080 }
20081 _ACEOF
20082 if ac_fn_c_try_compile "$LINENO"; then :
20083   ac_cv_prog_cc_g=yes
20084 else
20085   CFLAGS=""
20086       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20087 /* end confdefs.h.  */
20088 
20089 int
20090 main ()
20091 {
20092 
20093   ;
20094   return 0;
20095 }
20096 _ACEOF
20097 if ac_fn_c_try_compile "$LINENO"; then :
20098 
20099 else
20100   ac_c_werror_flag=$ac_save_c_werror_flag
20101          CFLAGS="-g"
20102          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20103 /* end confdefs.h.  */
20104 
20105 int
20106 main ()
20107 {
20108 
20109   ;
20110   return 0;
20111 }
20112 _ACEOF
20113 if ac_fn_c_try_compile "$LINENO"; then :
20114   ac_cv_prog_cc_g=yes
20115 fi
20116 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20117 fi
20118 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20119 fi
20120 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20121    ac_c_werror_flag=$ac_save_c_werror_flag
20122 fi
20123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
20124 $as_echo "$ac_cv_prog_cc_g" >&6; }
20125 if test "$ac_test_CFLAGS" = set; then
20126   CFLAGS=$ac_save_CFLAGS
20127 elif test $ac_cv_prog_cc_g = yes; then
20128   if test "$GCC" = yes; then
20129     CFLAGS="-g -O2"
20130   else
20131     CFLAGS="-g"
20132   fi
20133 else
20134   if test "$GCC" = yes; then
20135     CFLAGS="-O2"
20136   else
20137     CFLAGS=
20138   fi
20139 fi
20140 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
20141 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
20142 if test "${ac_cv_prog_cc_c89+set}" = set; then :
20143   $as_echo_n "(cached) " >&6
20144 else
20145   ac_cv_prog_cc_c89=no
20146 ac_save_CC=$CC
20147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20148 /* end confdefs.h.  */
20149 #include <stdarg.h>
20150 #include <stdio.h>
20151 #include <sys/types.h>
20152 #include <sys/stat.h>
20153 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
20154 struct buf { int x; };
20155 FILE * (*rcsopen) (struct buf *, struct stat *, int);
20156 static char *e (p, i)
20157      char **p;
20158      int i;
20159 {
20160   return p[i];
20161 }
20162 static char *f (char * (*g) (char **, int), char **p, ...)
20163 {
20164   char *s;
20165   va_list v;
20166   va_start (v,p);
20167   s = g (p, va_arg (v,int));
20168   va_end (v);
20169   return s;
20170 }
20171 
20172 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
20173    function prototypes and stuff, but not '\xHH' hex character constants.
20174    These don't provoke an error unfortunately, instead are silently treated
20175    as 'x'.  The following induces an error, until -std is added to get
20176    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
20177    array size at least.  It's necessary to write '\x00'==0 to get something
20178    that's true only with -std.  */
20179 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
20180 
20181 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
20182    inside strings and character constants.  */
20183 #define FOO(x) 'x'
20184 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
20185 
20186 int test (int i, double x);
20187 struct s1 {int (*f) (int a);};
20188 struct s2 {int (*f) (double a);};
20189 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
20190 int argc;
20191 char **argv;
20192 int
20193 main ()
20194 {
20195 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
20196   ;
20197   return 0;
20198 }
20199 _ACEOF
20200 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
20201         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
20202 do
20203   CC="$ac_save_CC $ac_arg"
20204   if ac_fn_c_try_compile "$LINENO"; then :
20205   ac_cv_prog_cc_c89=$ac_arg
20206 fi
20207 rm -f core conftest.err conftest.$ac_objext
20208   test "x$ac_cv_prog_cc_c89" != "xno" && break
20209 done
20210 rm -f conftest.$ac_ext
20211 CC=$ac_save_CC
20212 
20213 fi
20214 # AC_CACHE_VAL
20215 case "x$ac_cv_prog_cc_c89" in
20216   x)
20217     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
20218 $as_echo "none needed" >&6; } ;;
20219   xno)
20220     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
20221 $as_echo "unsupported" >&6; } ;;
20222   *)
20223     CC="$CC $ac_cv_prog_cc_c89"
20224     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
20225 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
20226 esac
20227 if test "x$ac_cv_prog_cc_c89" != xno; then :
20228 
20229 fi
20230 
20231 ac_ext=cpp
20232 ac_cpp='$CXXCPP $CPPFLAGS'
20233 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20234 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20235 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20236 
20237 
20238 ### Locate C++ compiler (CXX)
20239 
20240 if test "x$CXX" != x; then
20241   COMPILER_CHECK_LIST="$CXX"
20242 elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
20243   COMPILER_CHECK_LIST="cl"
20244 elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
20245   COMPILER_CHECK_LIST="CC g++"
20246 else
20247   COMPILER_CHECK_LIST="g++ CC"
20248 fi
20249 
20250 
20251   COMPILER_NAME=C++
20252 
20253   CXX=
20254   # If TOOLS_DIR is set, check for all compiler names in there first
20255   # before checking the rest of the PATH.
20256   if test -n "$TOOLS_DIR"; then
20257     PATH_save="$PATH"
20258     PATH="$TOOLS_DIR"
20259     for ac_prog in $COMPILER_CHECK_LIST
20260 do
20261   # Extract the first word of "$ac_prog", so it can be a program name with args.
20262 set dummy $ac_prog; ac_word=$2
20263 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20264 $as_echo_n "checking for $ac_word... " >&6; }
20265 if test "${ac_cv_path_TOOLS_DIR_CXX+set}" = set; then :
20266   $as_echo_n "(cached) " >&6
20267 else
20268   case $TOOLS_DIR_CXX in
20269   [\\/]* | ?:[\\/]*)
20270   ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
20271   ;;
20272   *)
20273   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20274 for as_dir in $PATH
20275 do
20276   IFS=$as_save_IFS
20277   test -z "$as_dir" && as_dir=.
20278     for ac_exec_ext in '' $ac_executable_extensions; do
20279   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20280     ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
20281     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20282     break 2
20283   fi
20284 done
20285   done
20286 IFS=$as_save_IFS
20287 
20288   ;;
20289 esac
20290 fi
20291 TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
20292 if test -n "$TOOLS_DIR_CXX"; then
20293   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
20294 $as_echo "$TOOLS_DIR_CXX" >&6; }
20295 else
20296   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20297 $as_echo "no" >&6; }
20298 fi
20299 
20300 
20301   test -n "$TOOLS_DIR_CXX" && break
20302 done
20303 
20304     CXX=$TOOLS_DIR_CXX
20305     PATH="$PATH_save"
20306   fi
20307 
20308   # AC_PATH_PROGS can't be run multiple times with the same variable,
20309   # so create a new name for this run.
20310   if test "x$CXX" = x; then
20311     for ac_prog in $COMPILER_CHECK_LIST
20312 do
20313   # Extract the first word of "$ac_prog", so it can be a program name with args.
20314 set dummy $ac_prog; ac_word=$2
20315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20316 $as_echo_n "checking for $ac_word... " >&6; }
20317 if test "${ac_cv_path_POTENTIAL_CXX+set}" = set; then :
20318   $as_echo_n "(cached) " >&6
20319 else
20320   case $POTENTIAL_CXX in
20321   [\\/]* | ?:[\\/]*)
20322   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
20323   ;;
20324   *)
20325   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20326 for as_dir in $PATH
20327 do
20328   IFS=$as_save_IFS
20329   test -z "$as_dir" && as_dir=.
20330     for ac_exec_ext in '' $ac_executable_extensions; do
20331   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20332     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
20333     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20334     break 2
20335   fi
20336 done
20337   done
20338 IFS=$as_save_IFS
20339 
20340   ;;
20341 esac
20342 fi
20343 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
20344 if test -n "$POTENTIAL_CXX"; then
20345   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
20346 $as_echo "$POTENTIAL_CXX" >&6; }
20347 else
20348   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20349 $as_echo "no" >&6; }
20350 fi
20351 
20352 
20353   test -n "$POTENTIAL_CXX" && break
20354 done
20355 
20356     CXX=$POTENTIAL_CXX
20357   fi
20358 
20359   if test "x$CXX" = x; then
20360 
20361     # Print a helpful message on how to acquire the necessary build dependency.
20362     # devkit is the help tag: freetyp2, cups, pulse, alsa etc
20363     MISSING_DEPENDENCY=devkit
20364     PKGHANDLER_COMMAND=
20365 
20366     case $PKGHANDLER in
20367         apt-get)
20368                 apt_help     $MISSING_DEPENDENCY ;;
20369     yum)
20370                 yum_help     $MISSING_DEPENDENCY ;;
20371         port)
20372                 port_help    $MISSING_DEPENDENCY ;;
20373         pkgutil)
20374                 pkgutil_help $MISSING_DEPENDENCY ;;
20375         pkgadd)
20376                 pkgadd_help  $MISSING_DEPENDENCY ;;
20377     * )
20378       break ;;
20379     esac
20380 
20381     if test "x$PKGHANDLER_COMMAND" != x; then
20382         HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
20383     fi
20384 
20385       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
20386   fi
20387 
20388   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20389 
20390   # First separate the path from the arguments. This will split at the first
20391   # space.
20392   complete="$CXX"
20393   path="${complete%% *}"
20394   tmp="$complete EOL"
20395   arguments="${tmp#* }"
20396 
20397   # Input might be given as Windows format, start by converting to
20398   # unix format.
20399   new_path=`$CYGPATH -u "$path"`
20400 
20401   # Now try to locate executable using which
20402   new_path=`$WHICH "$new_path" 2> /dev/null`
20403   # bat and cmd files are not always considered executable in cygwin causing which
20404   # to not find them
20405   if test "x$new_path" = x \
20406            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20407            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20408     new_path=`$CYGPATH -u "$path"`
20409   fi
20410   if test "x$new_path" = x; then
20411     # Oops. Which didn't find the executable.
20412     # The splitting of arguments from the executable at a space might have been incorrect,
20413     # since paths with space are more likely in Windows. Give it another try with the whole
20414     # argument.
20415     path="$complete"
20416     arguments="EOL"
20417     new_path=`$CYGPATH -u "$path"`
20418     new_path=`$WHICH "$new_path" 2> /dev/null`
20419     # bat and cmd files are not always considered executable in cygwin causing which
20420     # to not find them
20421     if test "x$new_path" = x \
20422              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20423              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20424       new_path=`$CYGPATH -u "$path"`
20425     fi
20426     if test "x$new_path" = x; then
20427       # It's still not found. Now this is an unrecoverable error.
20428       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20429 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20430       has_space=`$ECHO "$complete" | $GREP " "`
20431       if test "x$has_space" != x; then
20432         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20433 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20434       fi
20435       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20436     fi
20437   fi
20438 
20439   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20440   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20441   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20442   # "foo.exe" is OK but "foo" is an error.
20443   #
20444   # This test is therefore slightly more accurate than "test -f" to check for file precense.
20445   # It is also a way to make sure we got the proper file name for the real test later on.
20446   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20447   if test "x$test_shortpath" = x; then
20448     # Short path failed, file does not exist as specified.
20449     # Try adding .exe or .cmd
20450     if test -f "${new_path}.exe"; then
20451        input_to_shortpath="${new_path}.exe"
20452     elif test -f "${new_path}.cmd"; then
20453        input_to_shortpath="${new_path}.cmd"
20454     else
20455       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
20456 $as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
20457       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20458 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20459       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20460     fi
20461   else
20462     input_to_shortpath="$new_path"
20463   fi
20464 
20465   # Call helper function which possibly converts this using DOS-style short mode.
20466   # If so, the updated path is stored in $new_path.
20467   new_path="$input_to_shortpath"
20468 
20469   input_path="$input_to_shortpath"
20470   # Check if we need to convert this using DOS-style short mode. If the path
20471   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20472   # take no chances and rewrite it.
20473   # Note: m4 eats our [], so we need to use [ and ] instead.
20474   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20475   if test "x$has_forbidden_chars" != x; then
20476     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20477     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20478     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20479     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20480       # Going to short mode and back again did indeed matter. Since short mode is
20481       # case insensitive, let's make it lowercase to improve readability.
20482       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20483       # Now convert it back to Unix-stile (cygpath)
20484       input_path=`$CYGPATH -u "$shortmode_path"`
20485       new_path="$input_path"
20486     fi
20487   fi
20488 
20489   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20490   if test "x$test_cygdrive_prefix" = x; then
20491     # As a simple fix, exclude /usr/bin since it's not a real path.
20492     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20493       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20494       # a path prefixed by /cygdrive for fixpath to work.
20495       new_path="$CYGWIN_ROOT_PATH$input_path"
20496     fi
20497   fi
20498 
20499   # remove trailing .exe if any
20500   new_path="${new_path/%.exe/}"
20501 
20502   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20503 
20504   # First separate the path from the arguments. This will split at the first
20505   # space.
20506   complete="$CXX"
20507   path="${complete%% *}"
20508   tmp="$complete EOL"
20509   arguments="${tmp#* }"
20510 
20511   # Input might be given as Windows format, start by converting to
20512   # unix format.
20513   new_path="$path"
20514 
20515   windows_path="$new_path"
20516   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20517     unix_path=`$CYGPATH -u "$windows_path"`
20518     new_path="$unix_path"
20519   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20520     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20521     new_path="$unix_path"
20522   fi
20523 
20524 
20525   # Now try to locate executable using which
20526   new_path=`$WHICH "$new_path" 2> /dev/null`
20527 
20528   if test "x$new_path" = x; then
20529     # Oops. Which didn't find the executable.
20530     # The splitting of arguments from the executable at a space might have been incorrect,
20531     # since paths with space are more likely in Windows. Give it another try with the whole
20532     # argument.
20533     path="$complete"
20534     arguments="EOL"
20535     new_path="$path"
20536 
20537   windows_path="$new_path"
20538   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20539     unix_path=`$CYGPATH -u "$windows_path"`
20540     new_path="$unix_path"
20541   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20542     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20543     new_path="$unix_path"
20544   fi
20545 
20546 
20547     new_path=`$WHICH "$new_path" 2> /dev/null`
20548 
20549     if test "x$new_path" = x; then
20550       # It's still not found. Now this is an unrecoverable error.
20551       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20552 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20553       has_space=`$ECHO "$complete" | $GREP " "`
20554       if test "x$has_space" != x; then
20555         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20556 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20557       fi
20558       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20559     fi
20560   fi
20561 
20562   # Now new_path has a complete unix path to the binary
20563   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20564     # Keep paths in /bin as-is, but remove trailing .exe if any
20565     new_path="${new_path/%.exe/}"
20566     # Do not save /bin paths to all_fixpath_prefixes!
20567   else
20568     # Not in mixed or Windows style, start by that.
20569     new_path=`cmd //c echo $new_path`
20570 
20571   input_path="$new_path"
20572   # Check if we need to convert this using DOS-style short mode. If the path
20573   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20574   # take no chances and rewrite it.
20575   # Note: m4 eats our [], so we need to use [ and ] instead.
20576   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20577   if test "x$has_forbidden_chars" != x; then
20578     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20579     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20580   fi
20581 
20582     # Output is in $new_path
20583 
20584   windows_path="$new_path"
20585   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20586     unix_path=`$CYGPATH -u "$windows_path"`
20587     new_path="$unix_path"
20588   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20589     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20590     new_path="$unix_path"
20591   fi
20592 
20593     # remove trailing .exe if any
20594     new_path="${new_path/%.exe/}"
20595 
20596     # Save the first 10 bytes of this path to the storage, so fixpath can work.
20597     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20598   fi
20599 
20600   else
20601     # We're on a posix platform. Hooray! :)
20602     # First separate the path from the arguments. This will split at the first
20603     # space.
20604     complete="$CXX"
20605     path="${complete%% *}"
20606     tmp="$complete EOL"
20607     arguments="${tmp#* }"
20608 
20609     # Cannot rely on the command "which" here since it doesn't always work.
20610     is_absolute_path=`$ECHO "$path" | $GREP ^/`
20611     if test -z "$is_absolute_path"; then
20612       # Path to executable is not absolute. Find it.
20613       IFS_save="$IFS"
20614       IFS=:
20615       for p in $PATH; do
20616         if test -f "$p/$path" && test -x "$p/$path"; then
20617           new_path="$p/$path"
20618           break
20619         fi
20620       done
20621       IFS="$IFS_save"
20622     else
20623       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
20624 $as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
20625       new_path="$path"
20626     fi
20627 
20628     if test "x$new_path" = x; then
20629         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20630 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20631         has_space=`$ECHO "$complete" | $GREP " "`
20632         if test "x$has_space" != x; then
20633           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20634 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20635         fi
20636         as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20637       fi
20638   fi
20639 
20640       # Now join together the path and the arguments once again
20641       if test "x$arguments" != xEOL; then
20642         new_complete="$new_path ${arguments% *}"
20643       else
20644         new_complete="$new_path"
20645       fi
20646 
20647   if test "x$complete" != "x$new_complete"; then
20648       CXX="$new_complete"
20649       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
20650 $as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
20651     fi
20652 
20653   { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
20654 $as_echo_n "checking resolved symbolic links for CXX... " >&6; }
20655   TEST_COMPILER="$CXX"
20656 
20657     if test "x$OPENJDK_BUILD_OS" != xwindows; then
20658         # Follow a chain of symbolic links. Use readlink
20659         # where it exists, else fall back to horribly
20660         # complicated shell code.
20661         if test "x$READLINK_TESTED" != yes; then
20662             # On MacOSX there is a readlink tool with a different
20663             # purpose than the GNU readlink tool. Check the found readlink.
20664             ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20665             if test "x$ISGNU" = x; then
20666                  # A readlink that we do not know how to use.
20667                  # Are there other non-GNU readlinks out there?
20668                  READLINK_TESTED=yes
20669                  READLINK=
20670             fi
20671         fi
20672 
20673         if test "x$READLINK" != x; then
20674             TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
20675         else
20676             # Save the current directory for restoring afterwards
20677             STARTDIR=$PWD
20678             COUNTER=0
20679             sym_link_dir=`$DIRNAME $TEST_COMPILER`
20680             sym_link_file=`$BASENAME $TEST_COMPILER`
20681             # Use the system pwd and not the shell builtin to resolve directory symlinks
20682             cd $sym_link_dir
20683             cd `$THEPWDCMD`
20684             sym_link_dir=`$THEPWDCMD`
20685             # Resolve file symlinks
20686             while test $COUNTER -lt 20; do
20687                 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20688                 if test "x$ISLINK" == x; then
20689                     # This is not a symbolic link! We are done!
20690                     break
20691                 fi
20692                 # Again resolve directory symlinks since the target of the just found
20693                 # link could be in a different directory
20694                 cd `$DIRNAME $ISLINK`
20695                 sym_link_dir=`$THEPWDCMD`
20696                 sym_link_file=`$BASENAME $ISLINK`
20697                 let COUNTER=COUNTER+1
20698             done
20699             cd $STARTDIR
20700             TEST_COMPILER=$sym_link_dir/$sym_link_file
20701         fi
20702     fi
20703 
20704   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
20705 $as_echo "$TEST_COMPILER" >&6; }
20706   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
20707 $as_echo_n "checking if CXX is disguised ccache... " >&6; }
20708 
20709   COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
20710   if test "x$COMPILER_BASENAME" = "xccache"; then
20711     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
20712 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
20713     # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
20714     # We want to control ccache invocation ourselves, so ignore this cc and try
20715     # searching again.
20716 
20717     # Remove the path to the fake ccache cc from the PATH
20718     RETRY_COMPILER_SAVED_PATH="$PATH"
20719     COMPILER_DIRNAME=`$DIRNAME $CXX`
20720     PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
20721 
20722     # Try again looking for our compiler
20723     if test -n "$ac_tool_prefix"; then
20724   for ac_prog in $COMPILER_CHECK_LIST
20725   do
20726     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20727 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20728 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20729 $as_echo_n "checking for $ac_word... " >&6; }
20730 if test "${ac_cv_prog_PROPER_COMPILER_CXX+set}" = set; then :
20731   $as_echo_n "(cached) " >&6
20732 else
20733   if test -n "$PROPER_COMPILER_CXX"; then
20734   ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
20735 else
20736 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20737 for as_dir in $PATH
20738 do
20739   IFS=$as_save_IFS
20740   test -z "$as_dir" && as_dir=.
20741     for ac_exec_ext in '' $ac_executable_extensions; do
20742   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20743     ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
20744     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20745     break 2
20746   fi
20747 done
20748   done
20749 IFS=$as_save_IFS
20750 
20751 fi
20752 fi
20753 PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
20754 if test -n "$PROPER_COMPILER_CXX"; then
20755   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
20756 $as_echo "$PROPER_COMPILER_CXX" >&6; }
20757 else
20758   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20759 $as_echo "no" >&6; }
20760 fi
20761 
20762 
20763     test -n "$PROPER_COMPILER_CXX" && break
20764   done
20765 fi
20766 if test -z "$PROPER_COMPILER_CXX"; then
20767   ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
20768   for ac_prog in $COMPILER_CHECK_LIST
20769 do
20770   # Extract the first word of "$ac_prog", so it can be a program name with args.
20771 set dummy $ac_prog; ac_word=$2
20772 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20773 $as_echo_n "checking for $ac_word... " >&6; }
20774 if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+set}" = set; then :
20775   $as_echo_n "(cached) " >&6
20776 else
20777   if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20778   ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
20779 else
20780 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20781 for as_dir in $PATH
20782 do
20783   IFS=$as_save_IFS
20784   test -z "$as_dir" && as_dir=.
20785     for ac_exec_ext in '' $ac_executable_extensions; do
20786   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20787     ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
20788     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20789     break 2
20790   fi
20791 done
20792   done
20793 IFS=$as_save_IFS
20794 
20795 fi
20796 fi
20797 ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
20798 if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20799   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
20800 $as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
20801 else
20802   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20803 $as_echo "no" >&6; }
20804 fi
20805 
20806 
20807   test -n "$ac_ct_PROPER_COMPILER_CXX" && break
20808 done
20809 
20810   if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
20811     PROPER_COMPILER_CXX=""
20812   else
20813     case $cross_compiling:$ac_tool_warned in
20814 yes:)
20815 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20816 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20817 ac_tool_warned=yes ;;
20818 esac
20819     PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
20820   fi
20821 fi
20822 
20823 
20824   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20825 
20826   # First separate the path from the arguments. This will split at the first
20827   # space.
20828   complete="$PROPER_COMPILER_CXX"
20829   path="${complete%% *}"
20830   tmp="$complete EOL"
20831   arguments="${tmp#* }"
20832 
20833   # Input might be given as Windows format, start by converting to
20834   # unix format.
20835   new_path=`$CYGPATH -u "$path"`
20836 
20837   # Now try to locate executable using which
20838   new_path=`$WHICH "$new_path" 2> /dev/null`
20839   # bat and cmd files are not always considered executable in cygwin causing which
20840   # to not find them
20841   if test "x$new_path" = x \
20842            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20843            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20844     new_path=`$CYGPATH -u "$path"`
20845   fi
20846   if test "x$new_path" = x; then
20847     # Oops. Which didn't find the executable.
20848     # The splitting of arguments from the executable at a space might have been incorrect,
20849     # since paths with space are more likely in Windows. Give it another try with the whole
20850     # argument.
20851     path="$complete"
20852     arguments="EOL"
20853     new_path=`$CYGPATH -u "$path"`
20854     new_path=`$WHICH "$new_path" 2> /dev/null`
20855     # bat and cmd files are not always considered executable in cygwin causing which
20856     # to not find them
20857     if test "x$new_path" = x \
20858              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20859              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20860       new_path=`$CYGPATH -u "$path"`
20861     fi
20862     if test "x$new_path" = x; then
20863       # It's still not found. Now this is an unrecoverable error.
20864       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20865 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20866       has_space=`$ECHO "$complete" | $GREP " "`
20867       if test "x$has_space" != x; then
20868         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20869 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20870       fi
20871       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20872     fi
20873   fi
20874 
20875   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20876   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20877   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20878   # "foo.exe" is OK but "foo" is an error.
20879   #
20880   # This test is therefore slightly more accurate than "test -f" to check for file precense.
20881   # It is also a way to make sure we got the proper file name for the real test later on.
20882   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20883   if test "x$test_shortpath" = x; then
20884     # Short path failed, file does not exist as specified.
20885     # Try adding .exe or .cmd
20886     if test -f "${new_path}.exe"; then
20887        input_to_shortpath="${new_path}.exe"
20888     elif test -f "${new_path}.cmd"; then
20889        input_to_shortpath="${new_path}.cmd"
20890     else
20891       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
20892 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
20893       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20894 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20895       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20896     fi
20897   else
20898     input_to_shortpath="$new_path"
20899   fi
20900 
20901   # Call helper function which possibly converts this using DOS-style short mode.
20902   # If so, the updated path is stored in $new_path.
20903   new_path="$input_to_shortpath"
20904 
20905   input_path="$input_to_shortpath"
20906   # Check if we need to convert this using DOS-style short mode. If the path
20907   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20908   # take no chances and rewrite it.
20909   # Note: m4 eats our [], so we need to use [ and ] instead.
20910   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20911   if test "x$has_forbidden_chars" != x; then
20912     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20913     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20914     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20915     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20916       # Going to short mode and back again did indeed matter. Since short mode is
20917       # case insensitive, let's make it lowercase to improve readability.
20918       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20919       # Now convert it back to Unix-stile (cygpath)
20920       input_path=`$CYGPATH -u "$shortmode_path"`
20921       new_path="$input_path"
20922     fi
20923   fi
20924 
20925   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20926   if test "x$test_cygdrive_prefix" = x; then
20927     # As a simple fix, exclude /usr/bin since it's not a real path.
20928     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20929       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20930       # a path prefixed by /cygdrive for fixpath to work.
20931       new_path="$CYGWIN_ROOT_PATH$input_path"
20932     fi
20933   fi
20934 
20935   # remove trailing .exe if any
20936   new_path="${new_path/%.exe/}"
20937 
20938   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20939 
20940   # First separate the path from the arguments. This will split at the first
20941   # space.
20942   complete="$PROPER_COMPILER_CXX"
20943   path="${complete%% *}"
20944   tmp="$complete EOL"
20945   arguments="${tmp#* }"
20946 
20947   # Input might be given as Windows format, start by converting to
20948   # unix format.
20949   new_path="$path"
20950 
20951   windows_path="$new_path"
20952   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20953     unix_path=`$CYGPATH -u "$windows_path"`
20954     new_path="$unix_path"
20955   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20956     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20957     new_path="$unix_path"
20958   fi
20959 
20960 
20961   # Now try to locate executable using which
20962   new_path=`$WHICH "$new_path" 2> /dev/null`
20963 
20964   if test "x$new_path" = x; then
20965     # Oops. Which didn't find the executable.
20966     # The splitting of arguments from the executable at a space might have been incorrect,
20967     # since paths with space are more likely in Windows. Give it another try with the whole
20968     # argument.
20969     path="$complete"
20970     arguments="EOL"
20971     new_path="$path"
20972 
20973   windows_path="$new_path"
20974   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20975     unix_path=`$CYGPATH -u "$windows_path"`
20976     new_path="$unix_path"
20977   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20978     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20979     new_path="$unix_path"
20980   fi
20981 
20982 
20983     new_path=`$WHICH "$new_path" 2> /dev/null`
20984 
20985     if test "x$new_path" = x; then
20986       # It's still not found. Now this is an unrecoverable error.
20987       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20988 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20989       has_space=`$ECHO "$complete" | $GREP " "`
20990       if test "x$has_space" != x; then
20991         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20992 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20993       fi
20994       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20995     fi
20996   fi
20997 
20998   # Now new_path has a complete unix path to the binary
20999   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21000     # Keep paths in /bin as-is, but remove trailing .exe if any
21001     new_path="${new_path/%.exe/}"
21002     # Do not save /bin paths to all_fixpath_prefixes!
21003   else
21004     # Not in mixed or Windows style, start by that.
21005     new_path=`cmd //c echo $new_path`
21006 
21007   input_path="$new_path"
21008   # Check if we need to convert this using DOS-style short mode. If the path
21009   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21010   # take no chances and rewrite it.
21011   # Note: m4 eats our [], so we need to use [ and ] instead.
21012   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21013   if test "x$has_forbidden_chars" != x; then
21014     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21015     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21016   fi
21017 
21018     # Output is in $new_path
21019 
21020   windows_path="$new_path"
21021   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21022     unix_path=`$CYGPATH -u "$windows_path"`
21023     new_path="$unix_path"
21024   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21025     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21026     new_path="$unix_path"
21027   fi
21028 
21029     # remove trailing .exe if any
21030     new_path="${new_path/%.exe/}"
21031 
21032     # Save the first 10 bytes of this path to the storage, so fixpath can work.
21033     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21034   fi
21035 
21036   else
21037     # We're on a posix platform. Hooray! :)
21038     # First separate the path from the arguments. This will split at the first
21039     # space.
21040     complete="$PROPER_COMPILER_CXX"
21041     path="${complete%% *}"
21042     tmp="$complete EOL"
21043     arguments="${tmp#* }"
21044 
21045     # Cannot rely on the command "which" here since it doesn't always work.
21046     is_absolute_path=`$ECHO "$path" | $GREP ^/`
21047     if test -z "$is_absolute_path"; then
21048       # Path to executable is not absolute. Find it.
21049       IFS_save="$IFS"
21050       IFS=:
21051       for p in $PATH; do
21052         if test -f "$p/$path" && test -x "$p/$path"; then
21053           new_path="$p/$path"
21054           break
21055         fi
21056       done
21057       IFS="$IFS_save"
21058     else
21059       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
21060 $as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
21061       new_path="$path"
21062     fi
21063 
21064     if test "x$new_path" = x; then
21065         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21066 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21067         has_space=`$ECHO "$complete" | $GREP " "`
21068         if test "x$has_space" != x; then
21069           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21070 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21071         fi
21072         as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21073       fi
21074   fi
21075 
21076       # Now join together the path and the arguments once again
21077       if test "x$arguments" != xEOL; then
21078         new_complete="$new_path ${arguments% *}"
21079       else
21080         new_complete="$new_path"
21081       fi
21082 
21083   if test "x$complete" != "x$new_complete"; then
21084       PROPER_COMPILER_CXX="$new_complete"
21085       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
21086 $as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
21087     fi
21088 
21089     PATH="$RETRY_COMPILER_SAVED_PATH"
21090 
21091     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
21092 $as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
21093 
21094     if test "x$OPENJDK_BUILD_OS" != xwindows; then
21095         # Follow a chain of symbolic links. Use readlink
21096         # where it exists, else fall back to horribly
21097         # complicated shell code.
21098         if test "x$READLINK_TESTED" != yes; then
21099             # On MacOSX there is a readlink tool with a different
21100             # purpose than the GNU readlink tool. Check the found readlink.
21101             ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21102             if test "x$ISGNU" = x; then
21103                  # A readlink that we do not know how to use.
21104                  # Are there other non-GNU readlinks out there?
21105                  READLINK_TESTED=yes
21106                  READLINK=
21107             fi
21108         fi
21109 
21110         if test "x$READLINK" != x; then
21111             PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
21112         else
21113             # Save the current directory for restoring afterwards
21114             STARTDIR=$PWD
21115             COUNTER=0
21116             sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
21117             sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
21118             # Use the system pwd and not the shell builtin to resolve directory symlinks
21119             cd $sym_link_dir
21120             cd `$THEPWDCMD`
21121             sym_link_dir=`$THEPWDCMD`
21122             # Resolve file symlinks
21123             while test $COUNTER -lt 20; do
21124                 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21125                 if test "x$ISLINK" == x; then
21126                     # This is not a symbolic link! We are done!
21127                     break
21128                 fi
21129                 # Again resolve directory symlinks since the target of the just found
21130                 # link could be in a different directory
21131                 cd `$DIRNAME $ISLINK`
21132                 sym_link_dir=`$THEPWDCMD`
21133                 sym_link_file=`$BASENAME $ISLINK`
21134                 let COUNTER=COUNTER+1
21135             done
21136             cd $STARTDIR
21137             PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
21138         fi
21139     fi
21140 
21141     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21142 $as_echo "$PROPER_COMPILER_CXX" >&6; }
21143     CXX="$PROPER_COMPILER_CXX"
21144   else
21145     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
21146 $as_echo "no, keeping CXX" >&6; }
21147     CXX="$TEST_COMPILER"
21148   fi
21149 
21150   COMPILER=$CXX
21151   COMPILER_NAME=$COMPILER_NAME
21152 
21153   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
21154     # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
21155     COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
21156     $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
21157     if test $? -ne 0; then
21158       GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21159 
21160       { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&5
21161 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
21162       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
21163 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
21164       as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21165     else
21166       COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
21167       COMPILER_VENDOR="Sun Studio"
21168     fi
21169   elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
21170     # First line typically looks something like:
21171     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
21172     COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
21173     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
21174     COMPILER_VENDOR="Microsoft CL.EXE"
21175     COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
21176     if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
21177       if test "x$COMPILER_CPU_TEST" != "x80x86"; then
21178         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
21179       fi
21180     elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
21181       if test "x$COMPILER_CPU_TEST" != "xx64"; then
21182         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
21183       fi
21184     fi
21185   else
21186     COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21187     # Check that this is likely to be GCC.
21188     $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
21189     if test $? -ne 0; then
21190       { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
21191 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
21192       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
21193 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
21194       as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21195     fi
21196 
21197     # First line typically looks something like:
21198     # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
21199     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
21200     COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
21201   fi
21202   # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
21203   CXX_VERSION="$COMPILER_VERSION"
21204   # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
21205   CXX_VENDOR="$COMPILER_VENDOR"
21206 
21207   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
21208 $as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
21209 
21210 
21211 # Now that we have resolved CXX ourself, let autoconf have its go at it
21212 ac_ext=cpp
21213 ac_cpp='$CXXCPP $CPPFLAGS'
21214 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21215 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21216 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21217 if test -z "$CXX"; then
21218   if test -n "$CCC"; then
21219     CXX=$CCC
21220   else
21221     if test -n "$ac_tool_prefix"; then
21222   for ac_prog in $CXX
21223   do
21224     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21225 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21226 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21227 $as_echo_n "checking for $ac_word... " >&6; }
21228 if test "${ac_cv_prog_CXX+set}" = set; then :
21229   $as_echo_n "(cached) " >&6
21230 else
21231   if test -n "$CXX"; then
21232   ac_cv_prog_CXX="$CXX" # Let the user override the test.
21233 else
21234 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21235 for as_dir in $PATH
21236 do
21237   IFS=$as_save_IFS
21238   test -z "$as_dir" && as_dir=.
21239     for ac_exec_ext in '' $ac_executable_extensions; do
21240   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21241     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
21242     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21243     break 2
21244   fi
21245 done
21246   done
21247 IFS=$as_save_IFS
21248 
21249 fi
21250 fi
21251 CXX=$ac_cv_prog_CXX
21252 if test -n "$CXX"; then
21253   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
21254 $as_echo "$CXX" >&6; }
21255 else
21256   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21257 $as_echo "no" >&6; }
21258 fi
21259 
21260 
21261     test -n "$CXX" && break
21262   done
21263 fi
21264 if test -z "$CXX"; then
21265   ac_ct_CXX=$CXX
21266   for ac_prog in $CXX
21267 do
21268   # Extract the first word of "$ac_prog", so it can be a program name with args.
21269 set dummy $ac_prog; ac_word=$2
21270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21271 $as_echo_n "checking for $ac_word... " >&6; }
21272 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
21273   $as_echo_n "(cached) " >&6
21274 else
21275   if test -n "$ac_ct_CXX"; then
21276   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
21277 else
21278 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21279 for as_dir in $PATH
21280 do
21281   IFS=$as_save_IFS
21282   test -z "$as_dir" && as_dir=.
21283     for ac_exec_ext in '' $ac_executable_extensions; do
21284   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21285     ac_cv_prog_ac_ct_CXX="$ac_prog"
21286     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21287     break 2
21288   fi
21289 done
21290   done
21291 IFS=$as_save_IFS
21292 
21293 fi
21294 fi
21295 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
21296 if test -n "$ac_ct_CXX"; then
21297   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
21298 $as_echo "$ac_ct_CXX" >&6; }
21299 else
21300   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21301 $as_echo "no" >&6; }
21302 fi
21303 
21304 
21305   test -n "$ac_ct_CXX" && break
21306 done
21307 
21308   if test "x$ac_ct_CXX" = x; then
21309     CXX="g++"
21310   else
21311     case $cross_compiling:$ac_tool_warned in
21312 yes:)
21313 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21314 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21315 ac_tool_warned=yes ;;
21316 esac
21317     CXX=$ac_ct_CXX
21318   fi
21319 fi
21320 
21321   fi
21322 fi
21323 # Provide some information about the compiler.
21324 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
21325 set X $ac_compile
21326 ac_compiler=$2
21327 for ac_option in --version -v -V -qversion; do
21328   { { ac_try="$ac_compiler $ac_option >&5"
21329 case "(($ac_try" in
21330   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21331   *) ac_try_echo=$ac_try;;
21332 esac
21333 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21334 $as_echo "$ac_try_echo"; } >&5
21335   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21336   ac_status=$?
21337   if test -s conftest.err; then
21338     sed '10a\
21339 ... rest of stderr output deleted ...
21340          10q' conftest.err >conftest.er1
21341     cat conftest.er1 >&5
21342   fi
21343   rm -f conftest.er1 conftest.err
21344   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21345   test $ac_status = 0; }
21346 done
21347 
21348 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
21349 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
21350 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
21351   $as_echo_n "(cached) " >&6
21352 else
21353   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21354 /* end confdefs.h.  */
21355 
21356 int
21357 main ()
21358 {
21359 #ifndef __GNUC__
21360        choke me
21361 #endif
21362 
21363   ;
21364   return 0;
21365 }
21366 _ACEOF
21367 if ac_fn_cxx_try_compile "$LINENO"; then :
21368   ac_compiler_gnu=yes
21369 else
21370   ac_compiler_gnu=no
21371 fi
21372 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21373 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
21374 
21375 fi
21376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
21377 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
21378 if test $ac_compiler_gnu = yes; then
21379   GXX=yes
21380 else
21381   GXX=
21382 fi
21383 ac_test_CXXFLAGS=${CXXFLAGS+set}
21384 ac_save_CXXFLAGS=$CXXFLAGS
21385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
21386 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
21387 if test "${ac_cv_prog_cxx_g+set}" = set; then :
21388   $as_echo_n "(cached) " >&6
21389 else
21390   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
21391    ac_cxx_werror_flag=yes
21392    ac_cv_prog_cxx_g=no
21393    CXXFLAGS="-g"
21394    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21395 /* end confdefs.h.  */
21396 
21397 int
21398 main ()
21399 {
21400 
21401   ;
21402   return 0;
21403 }
21404 _ACEOF
21405 if ac_fn_cxx_try_compile "$LINENO"; then :
21406   ac_cv_prog_cxx_g=yes
21407 else
21408   CXXFLAGS=""
21409       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21410 /* end confdefs.h.  */
21411 
21412 int
21413 main ()
21414 {
21415 
21416   ;
21417   return 0;
21418 }
21419 _ACEOF
21420 if ac_fn_cxx_try_compile "$LINENO"; then :
21421 
21422 else
21423   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21424          CXXFLAGS="-g"
21425          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21426 /* end confdefs.h.  */
21427 
21428 int
21429 main ()
21430 {
21431 
21432   ;
21433   return 0;
21434 }
21435 _ACEOF
21436 if ac_fn_cxx_try_compile "$LINENO"; then :
21437   ac_cv_prog_cxx_g=yes
21438 fi
21439 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21440 fi
21441 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21442 fi
21443 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21444    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21445 fi
21446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
21447 $as_echo "$ac_cv_prog_cxx_g" >&6; }
21448 if test "$ac_test_CXXFLAGS" = set; then
21449   CXXFLAGS=$ac_save_CXXFLAGS
21450 elif test $ac_cv_prog_cxx_g = yes; then
21451   if test "$GXX" = yes; then
21452     CXXFLAGS="-g -O2"
21453   else
21454     CXXFLAGS="-g"
21455   fi
21456 else
21457   if test "$GXX" = yes; then
21458     CXXFLAGS="-O2"
21459   else
21460     CXXFLAGS=
21461   fi
21462 fi
21463 ac_ext=cpp
21464 ac_cpp='$CXXCPP $CPPFLAGS'
21465 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21466 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21467 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21468 
21469 
21470 ### Locate other tools
21471 
21472 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21473     ac_ext=m
21474 ac_cpp='$OBJCPP $CPPFLAGS'
21475 ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21476 ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21477 ac_compiler_gnu=$ac_cv_objc_compiler_gnu
21478 if test -n "$ac_tool_prefix"; then
21479   for ac_prog in gcc objcc objc cc CC
21480   do
21481     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21482 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21483 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21484 $as_echo_n "checking for $ac_word... " >&6; }
21485 if test "${ac_cv_prog_OBJC+set}" = set; then :
21486   $as_echo_n "(cached) " >&6
21487 else
21488   if test -n "$OBJC"; then
21489   ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
21490 else
21491 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21492 for as_dir in $PATH
21493 do
21494   IFS=$as_save_IFS
21495   test -z "$as_dir" && as_dir=.
21496     for ac_exec_ext in '' $ac_executable_extensions; do
21497   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21498     ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
21499     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21500     break 2
21501   fi
21502 done
21503   done
21504 IFS=$as_save_IFS
21505 
21506 fi
21507 fi
21508 OBJC=$ac_cv_prog_OBJC
21509 if test -n "$OBJC"; then
21510   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
21511 $as_echo "$OBJC" >&6; }
21512 else
21513   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21514 $as_echo "no" >&6; }
21515 fi
21516 
21517 
21518     test -n "$OBJC" && break
21519   done
21520 fi
21521 if test -z "$OBJC"; then
21522   ac_ct_OBJC=$OBJC
21523   for ac_prog in gcc objcc objc cc CC
21524 do
21525   # Extract the first word of "$ac_prog", so it can be a program name with args.
21526 set dummy $ac_prog; ac_word=$2
21527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21528 $as_echo_n "checking for $ac_word... " >&6; }
21529 if test "${ac_cv_prog_ac_ct_OBJC+set}" = set; then :
21530   $as_echo_n "(cached) " >&6
21531 else
21532   if test -n "$ac_ct_OBJC"; then
21533   ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
21534 else
21535 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21536 for as_dir in $PATH
21537 do
21538   IFS=$as_save_IFS
21539   test -z "$as_dir" && as_dir=.
21540     for ac_exec_ext in '' $ac_executable_extensions; do
21541   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21542     ac_cv_prog_ac_ct_OBJC="$ac_prog"
21543     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21544     break 2
21545   fi
21546 done
21547   done
21548 IFS=$as_save_IFS
21549 
21550 fi
21551 fi
21552 ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
21553 if test -n "$ac_ct_OBJC"; then
21554   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
21555 $as_echo "$ac_ct_OBJC" >&6; }
21556 else
21557   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21558 $as_echo "no" >&6; }
21559 fi
21560 
21561 
21562   test -n "$ac_ct_OBJC" && break
21563 done
21564 
21565   if test "x$ac_ct_OBJC" = x; then
21566     OBJC="gcc"
21567   else
21568     case $cross_compiling:$ac_tool_warned in
21569 yes:)
21570 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21571 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21572 ac_tool_warned=yes ;;
21573 esac
21574     OBJC=$ac_ct_OBJC
21575   fi
21576 fi
21577 
21578 # Provide some information about the compiler.
21579 $as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
21580 set X $ac_compile
21581 ac_compiler=$2
21582 for ac_option in --version -v -V -qversion; do
21583   { { ac_try="$ac_compiler $ac_option >&5"
21584 case "(($ac_try" in
21585   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21586   *) ac_try_echo=$ac_try;;
21587 esac
21588 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21589 $as_echo "$ac_try_echo"; } >&5
21590   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21591   ac_status=$?
21592   if test -s conftest.err; then
21593     sed '10a\
21594 ... rest of stderr output deleted ...
21595          10q' conftest.err >conftest.er1
21596     cat conftest.er1 >&5
21597   fi
21598   rm -f conftest.er1 conftest.err
21599   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21600   test $ac_status = 0; }
21601 done
21602 
21603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
21604 $as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
21605 if test "${ac_cv_objc_compiler_gnu+set}" = set; then :
21606   $as_echo_n "(cached) " >&6
21607 else
21608   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21609 /* end confdefs.h.  */
21610 
21611 int
21612 main ()
21613 {
21614 #ifndef __GNUC__
21615        choke me
21616 #endif
21617 
21618   ;
21619   return 0;
21620 }
21621 _ACEOF
21622 if ac_fn_objc_try_compile "$LINENO"; then :
21623   ac_compiler_gnu=yes
21624 else
21625   ac_compiler_gnu=no
21626 fi
21627 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21628 ac_cv_objc_compiler_gnu=$ac_compiler_gnu
21629 
21630 fi
21631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
21632 $as_echo "$ac_cv_objc_compiler_gnu" >&6; }
21633 if test $ac_compiler_gnu = yes; then
21634   GOBJC=yes
21635 else
21636   GOBJC=
21637 fi
21638 ac_test_OBJCFLAGS=${OBJCFLAGS+set}
21639 ac_save_OBJCFLAGS=$OBJCFLAGS
21640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
21641 $as_echo_n "checking whether $OBJC accepts -g... " >&6; }
21642 if test "${ac_cv_prog_objc_g+set}" = set; then :
21643   $as_echo_n "(cached) " >&6
21644 else
21645   ac_save_objc_werror_flag=$ac_objc_werror_flag
21646    ac_objc_werror_flag=yes
21647    ac_cv_prog_objc_g=no
21648    OBJCFLAGS="-g"
21649    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21650 /* end confdefs.h.  */
21651 
21652 int
21653 main ()
21654 {
21655 
21656   ;
21657   return 0;
21658 }
21659 _ACEOF
21660 if ac_fn_objc_try_compile "$LINENO"; then :
21661   ac_cv_prog_objc_g=yes
21662 else
21663   OBJCFLAGS=""
21664       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21665 /* end confdefs.h.  */
21666 
21667 int
21668 main ()
21669 {
21670 
21671   ;
21672   return 0;
21673 }
21674 _ACEOF
21675 if ac_fn_objc_try_compile "$LINENO"; then :
21676 
21677 else
21678   ac_objc_werror_flag=$ac_save_objc_werror_flag
21679          OBJCFLAGS="-g"
21680          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21681 /* end confdefs.h.  */
21682 
21683 int
21684 main ()
21685 {
21686 
21687   ;
21688   return 0;
21689 }
21690 _ACEOF
21691 if ac_fn_objc_try_compile "$LINENO"; then :
21692   ac_cv_prog_objc_g=yes
21693 fi
21694 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21695 fi
21696 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21697 fi
21698 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21699    ac_objc_werror_flag=$ac_save_objc_werror_flag
21700 fi
21701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
21702 $as_echo "$ac_cv_prog_objc_g" >&6; }
21703 if test "$ac_test_OBJCFLAGS" = set; then
21704   OBJCFLAGS=$ac_save_OBJCFLAGS
21705 elif test $ac_cv_prog_objc_g = yes; then
21706   if test "$GOBJC" = yes; then
21707     OBJCFLAGS="-g -O2"
21708   else
21709     OBJCFLAGS="-g"
21710   fi
21711 else
21712   if test "$GOBJC" = yes; then
21713     OBJCFLAGS="-O2"
21714   else
21715     OBJCFLAGS=
21716   fi
21717 fi
21718 ac_ext=cpp
21719 ac_cpp='$CXXCPP $CPPFLAGS'
21720 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21721 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21722 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21723 
21724 
21725   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21726 
21727   # First separate the path from the arguments. This will split at the first
21728   # space.
21729   complete="$OBJC"
21730   path="${complete%% *}"
21731   tmp="$complete EOL"
21732   arguments="${tmp#* }"
21733 
21734   # Input might be given as Windows format, start by converting to
21735   # unix format.
21736   new_path=`$CYGPATH -u "$path"`
21737 
21738   # Now try to locate executable using which
21739   new_path=`$WHICH "$new_path" 2> /dev/null`
21740   # bat and cmd files are not always considered executable in cygwin causing which
21741   # to not find them
21742   if test "x$new_path" = x \
21743            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21744            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21745     new_path=`$CYGPATH -u "$path"`
21746   fi
21747   if test "x$new_path" = x; then
21748     # Oops. Which didn't find the executable.
21749     # The splitting of arguments from the executable at a space might have been incorrect,
21750     # since paths with space are more likely in Windows. Give it another try with the whole
21751     # argument.
21752     path="$complete"
21753     arguments="EOL"
21754     new_path=`$CYGPATH -u "$path"`
21755     new_path=`$WHICH "$new_path" 2> /dev/null`
21756     # bat and cmd files are not always considered executable in cygwin causing which
21757     # to not find them
21758     if test "x$new_path" = x \
21759              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21760              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21761       new_path=`$CYGPATH -u "$path"`
21762     fi
21763     if test "x$new_path" = x; then
21764       # It's still not found. Now this is an unrecoverable error.
21765       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21766 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21767       has_space=`$ECHO "$complete" | $GREP " "`
21768       if test "x$has_space" != x; then
21769         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21770 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21771       fi
21772       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21773     fi
21774   fi
21775 
21776   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21777   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21778   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21779   # "foo.exe" is OK but "foo" is an error.
21780   #
21781   # This test is therefore slightly more accurate than "test -f" to check for file precense.
21782   # It is also a way to make sure we got the proper file name for the real test later on.
21783   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21784   if test "x$test_shortpath" = x; then
21785     # Short path failed, file does not exist as specified.
21786     # Try adding .exe or .cmd
21787     if test -f "${new_path}.exe"; then
21788        input_to_shortpath="${new_path}.exe"
21789     elif test -f "${new_path}.cmd"; then
21790        input_to_shortpath="${new_path}.cmd"
21791     else
21792       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
21793 $as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
21794       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21795 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21796       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21797     fi
21798   else
21799     input_to_shortpath="$new_path"
21800   fi
21801 
21802   # Call helper function which possibly converts this using DOS-style short mode.
21803   # If so, the updated path is stored in $new_path.
21804   new_path="$input_to_shortpath"
21805 
21806   input_path="$input_to_shortpath"
21807   # Check if we need to convert this using DOS-style short mode. If the path
21808   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21809   # take no chances and rewrite it.
21810   # Note: m4 eats our [], so we need to use [ and ] instead.
21811   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21812   if test "x$has_forbidden_chars" != x; then
21813     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21814     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21815     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21816     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21817       # Going to short mode and back again did indeed matter. Since short mode is
21818       # case insensitive, let's make it lowercase to improve readability.
21819       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21820       # Now convert it back to Unix-stile (cygpath)
21821       input_path=`$CYGPATH -u "$shortmode_path"`
21822       new_path="$input_path"
21823     fi
21824   fi
21825 
21826   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21827   if test "x$test_cygdrive_prefix" = x; then
21828     # As a simple fix, exclude /usr/bin since it's not a real path.
21829     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21830       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21831       # a path prefixed by /cygdrive for fixpath to work.
21832       new_path="$CYGWIN_ROOT_PATH$input_path"
21833     fi
21834   fi
21835 
21836   # remove trailing .exe if any
21837   new_path="${new_path/%.exe/}"
21838 
21839   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21840 
21841   # First separate the path from the arguments. This will split at the first
21842   # space.
21843   complete="$OBJC"
21844   path="${complete%% *}"
21845   tmp="$complete EOL"
21846   arguments="${tmp#* }"
21847 
21848   # Input might be given as Windows format, start by converting to
21849   # unix format.
21850   new_path="$path"
21851 
21852   windows_path="$new_path"
21853   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21854     unix_path=`$CYGPATH -u "$windows_path"`
21855     new_path="$unix_path"
21856   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21857     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21858     new_path="$unix_path"
21859   fi
21860 
21861 
21862   # Now try to locate executable using which
21863   new_path=`$WHICH "$new_path" 2> /dev/null`
21864 
21865   if test "x$new_path" = x; then
21866     # Oops. Which didn't find the executable.
21867     # The splitting of arguments from the executable at a space might have been incorrect,
21868     # since paths with space are more likely in Windows. Give it another try with the whole
21869     # argument.
21870     path="$complete"
21871     arguments="EOL"
21872     new_path="$path"
21873 
21874   windows_path="$new_path"
21875   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21876     unix_path=`$CYGPATH -u "$windows_path"`
21877     new_path="$unix_path"
21878   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21879     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21880     new_path="$unix_path"
21881   fi
21882 
21883 
21884     new_path=`$WHICH "$new_path" 2> /dev/null`
21885 
21886     if test "x$new_path" = x; then
21887       # It's still not found. Now this is an unrecoverable error.
21888       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21889 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21890       has_space=`$ECHO "$complete" | $GREP " "`
21891       if test "x$has_space" != x; then
21892         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21893 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21894       fi
21895       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21896     fi
21897   fi
21898 
21899   # Now new_path has a complete unix path to the binary
21900   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21901     # Keep paths in /bin as-is, but remove trailing .exe if any
21902     new_path="${new_path/%.exe/}"
21903     # Do not save /bin paths to all_fixpath_prefixes!
21904   else
21905     # Not in mixed or Windows style, start by that.
21906     new_path=`cmd //c echo $new_path`
21907 
21908   input_path="$new_path"
21909   # Check if we need to convert this using DOS-style short mode. If the path
21910   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21911   # take no chances and rewrite it.
21912   # Note: m4 eats our [], so we need to use [ and ] instead.
21913   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21914   if test "x$has_forbidden_chars" != x; then
21915     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21916     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21917   fi
21918 
21919     # Output is in $new_path
21920 
21921   windows_path="$new_path"
21922   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21923     unix_path=`$CYGPATH -u "$windows_path"`
21924     new_path="$unix_path"
21925   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21926     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21927     new_path="$unix_path"
21928   fi
21929 
21930     # remove trailing .exe if any
21931     new_path="${new_path/%.exe/}"
21932 
21933     # Save the first 10 bytes of this path to the storage, so fixpath can work.
21934     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21935   fi
21936 
21937   else
21938     # We're on a posix platform. Hooray! :)
21939     # First separate the path from the arguments. This will split at the first
21940     # space.
21941     complete="$OBJC"
21942     path="${complete%% *}"
21943     tmp="$complete EOL"
21944     arguments="${tmp#* }"
21945 
21946     # Cannot rely on the command "which" here since it doesn't always work.
21947     is_absolute_path=`$ECHO "$path" | $GREP ^/`
21948     if test -z "$is_absolute_path"; then
21949       # Path to executable is not absolute. Find it.
21950       IFS_save="$IFS"
21951       IFS=:
21952       for p in $PATH; do
21953         if test -f "$p/$path" && test -x "$p/$path"; then
21954           new_path="$p/$path"
21955           break
21956         fi
21957       done
21958       IFS="$IFS_save"
21959     else
21960       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
21961 $as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
21962       new_path="$path"
21963     fi
21964 
21965     if test "x$new_path" = x; then
21966         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21967 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21968         has_space=`$ECHO "$complete" | $GREP " "`
21969         if test "x$has_space" != x; then
21970           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21971 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21972         fi
21973         as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21974       fi
21975   fi
21976 
21977       # Now join together the path and the arguments once again
21978       if test "x$arguments" != xEOL; then
21979         new_complete="$new_path ${arguments% *}"
21980       else
21981         new_complete="$new_path"
21982       fi
21983 
21984   if test "x$complete" != "x$new_complete"; then
21985       OBJC="$new_complete"
21986       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
21987 $as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
21988     fi
21989 
21990 else
21991     OBJC=
21992 fi
21993 
21994 # Restore the flags to the user specified values.
21995 # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
21996 CFLAGS="$ORG_CFLAGS"
21997 CXXFLAGS="$ORG_CXXFLAGS"
21998 OBJCFLAGS="$ORG_OBJCFLAGS"
21999 
22000 LD="$CC"
22001 LDEXE="$CC"
22002 LDCXX="$CXX"
22003 LDEXECXX="$CXX"
22004 
22005 # LDEXE is the linker to use, when creating executables.
22006 
22007 # Linking C++ libraries.
22008 
22009 # Linking C++ executables.
22010 
22011 
22012 if test "x$OPENJDK_TARGET_OS" != xwindows; then
22013     if test -n "$ac_tool_prefix"; then
22014   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
22015 set dummy ${ac_tool_prefix}ar; ac_word=$2
22016 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22017 $as_echo_n "checking for $ac_word... " >&6; }
22018 if test "${ac_cv_prog_AR+set}" = set; then :
22019   $as_echo_n "(cached) " >&6
22020 else
22021   if test -n "$AR"; then
22022   ac_cv_prog_AR="$AR" # Let the user override the test.
22023 else
22024 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22025 for as_dir in $PATH
22026 do
22027   IFS=$as_save_IFS
22028   test -z "$as_dir" && as_dir=.
22029     for ac_exec_ext in '' $ac_executable_extensions; do
22030   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22031     ac_cv_prog_AR="${ac_tool_prefix}ar"
22032     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22033     break 2
22034   fi
22035 done
22036   done
22037 IFS=$as_save_IFS
22038 
22039 fi
22040 fi
22041 AR=$ac_cv_prog_AR
22042 if test -n "$AR"; then
22043   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
22044 $as_echo "$AR" >&6; }
22045 else
22046   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22047 $as_echo "no" >&6; }
22048 fi
22049 
22050 
22051 fi
22052 if test -z "$ac_cv_prog_AR"; then
22053   ac_ct_AR=$AR
22054   # Extract the first word of "ar", so it can be a program name with args.
22055 set dummy ar; ac_word=$2
22056 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22057 $as_echo_n "checking for $ac_word... " >&6; }
22058 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
22059   $as_echo_n "(cached) " >&6
22060 else
22061   if test -n "$ac_ct_AR"; then
22062   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
22063 else
22064 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22065 for as_dir in $PATH
22066 do
22067   IFS=$as_save_IFS
22068   test -z "$as_dir" && as_dir=.
22069     for ac_exec_ext in '' $ac_executable_extensions; do
22070   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22071     ac_cv_prog_ac_ct_AR="ar"
22072     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22073     break 2
22074   fi
22075 done
22076   done
22077 IFS=$as_save_IFS
22078 
22079 fi
22080 fi
22081 ac_ct_AR=$ac_cv_prog_ac_ct_AR
22082 if test -n "$ac_ct_AR"; then
22083   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
22084 $as_echo "$ac_ct_AR" >&6; }
22085 else
22086   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22087 $as_echo "no" >&6; }
22088 fi
22089 
22090   if test "x$ac_ct_AR" = x; then
22091     AR=""
22092   else
22093     case $cross_compiling:$ac_tool_warned in
22094 yes:)
22095 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22096 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22097 ac_tool_warned=yes ;;
22098 esac
22099     AR=$ac_ct_AR
22100   fi
22101 else
22102   AR="$ac_cv_prog_AR"
22103 fi
22104 
22105 
22106   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22107 
22108   # First separate the path from the arguments. This will split at the first
22109   # space.
22110   complete="$AR"
22111   path="${complete%% *}"
22112   tmp="$complete EOL"
22113   arguments="${tmp#* }"
22114 
22115   # Input might be given as Windows format, start by converting to
22116   # unix format.
22117   new_path=`$CYGPATH -u "$path"`
22118 
22119   # Now try to locate executable using which
22120   new_path=`$WHICH "$new_path" 2> /dev/null`
22121   # bat and cmd files are not always considered executable in cygwin causing which
22122   # to not find them
22123   if test "x$new_path" = x \
22124            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22125            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22126     new_path=`$CYGPATH -u "$path"`
22127   fi
22128   if test "x$new_path" = x; then
22129     # Oops. Which didn't find the executable.
22130     # The splitting of arguments from the executable at a space might have been incorrect,
22131     # since paths with space are more likely in Windows. Give it another try with the whole
22132     # argument.
22133     path="$complete"
22134     arguments="EOL"
22135     new_path=`$CYGPATH -u "$path"`
22136     new_path=`$WHICH "$new_path" 2> /dev/null`
22137     # bat and cmd files are not always considered executable in cygwin causing which
22138     # to not find them
22139     if test "x$new_path" = x \
22140              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22141              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22142       new_path=`$CYGPATH -u "$path"`
22143     fi
22144     if test "x$new_path" = x; then
22145       # It's still not found. Now this is an unrecoverable error.
22146       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22147 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22148       has_space=`$ECHO "$complete" | $GREP " "`
22149       if test "x$has_space" != x; then
22150         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22151 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22152       fi
22153       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22154     fi
22155   fi
22156 
22157   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22158   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22159   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22160   # "foo.exe" is OK but "foo" is an error.
22161   #
22162   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22163   # It is also a way to make sure we got the proper file name for the real test later on.
22164   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22165   if test "x$test_shortpath" = x; then
22166     # Short path failed, file does not exist as specified.
22167     # Try adding .exe or .cmd
22168     if test -f "${new_path}.exe"; then
22169        input_to_shortpath="${new_path}.exe"
22170     elif test -f "${new_path}.cmd"; then
22171        input_to_shortpath="${new_path}.cmd"
22172     else
22173       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
22174 $as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
22175       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22176 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22177       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22178     fi
22179   else
22180     input_to_shortpath="$new_path"
22181   fi
22182 
22183   # Call helper function which possibly converts this using DOS-style short mode.
22184   # If so, the updated path is stored in $new_path.
22185   new_path="$input_to_shortpath"
22186 
22187   input_path="$input_to_shortpath"
22188   # Check if we need to convert this using DOS-style short mode. If the path
22189   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22190   # take no chances and rewrite it.
22191   # Note: m4 eats our [], so we need to use [ and ] instead.
22192   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22193   if test "x$has_forbidden_chars" != x; then
22194     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22195     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22196     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22197     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22198       # Going to short mode and back again did indeed matter. Since short mode is
22199       # case insensitive, let's make it lowercase to improve readability.
22200       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22201       # Now convert it back to Unix-stile (cygpath)
22202       input_path=`$CYGPATH -u "$shortmode_path"`
22203       new_path="$input_path"
22204     fi
22205   fi
22206 
22207   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22208   if test "x$test_cygdrive_prefix" = x; then
22209     # As a simple fix, exclude /usr/bin since it's not a real path.
22210     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22211       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22212       # a path prefixed by /cygdrive for fixpath to work.
22213       new_path="$CYGWIN_ROOT_PATH$input_path"
22214     fi
22215   fi
22216 
22217   # remove trailing .exe if any
22218   new_path="${new_path/%.exe/}"
22219 
22220   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22221 
22222   # First separate the path from the arguments. This will split at the first
22223   # space.
22224   complete="$AR"
22225   path="${complete%% *}"
22226   tmp="$complete EOL"
22227   arguments="${tmp#* }"
22228 
22229   # Input might be given as Windows format, start by converting to
22230   # unix format.
22231   new_path="$path"
22232 
22233   windows_path="$new_path"
22234   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22235     unix_path=`$CYGPATH -u "$windows_path"`
22236     new_path="$unix_path"
22237   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22238     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22239     new_path="$unix_path"
22240   fi
22241 
22242 
22243   # Now try to locate executable using which
22244   new_path=`$WHICH "$new_path" 2> /dev/null`
22245 
22246   if test "x$new_path" = x; then
22247     # Oops. Which didn't find the executable.
22248     # The splitting of arguments from the executable at a space might have been incorrect,
22249     # since paths with space are more likely in Windows. Give it another try with the whole
22250     # argument.
22251     path="$complete"
22252     arguments="EOL"
22253     new_path="$path"
22254 
22255   windows_path="$new_path"
22256   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22257     unix_path=`$CYGPATH -u "$windows_path"`
22258     new_path="$unix_path"
22259   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22260     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22261     new_path="$unix_path"
22262   fi
22263 
22264 
22265     new_path=`$WHICH "$new_path" 2> /dev/null`
22266 
22267     if test "x$new_path" = x; then
22268       # It's still not found. Now this is an unrecoverable error.
22269       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22270 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22271       has_space=`$ECHO "$complete" | $GREP " "`
22272       if test "x$has_space" != x; then
22273         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22274 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22275       fi
22276       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22277     fi
22278   fi
22279 
22280   # Now new_path has a complete unix path to the binary
22281   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22282     # Keep paths in /bin as-is, but remove trailing .exe if any
22283     new_path="${new_path/%.exe/}"
22284     # Do not save /bin paths to all_fixpath_prefixes!
22285   else
22286     # Not in mixed or Windows style, start by that.
22287     new_path=`cmd //c echo $new_path`
22288 
22289   input_path="$new_path"
22290   # Check if we need to convert this using DOS-style short mode. If the path
22291   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22292   # take no chances and rewrite it.
22293   # Note: m4 eats our [], so we need to use [ and ] instead.
22294   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22295   if test "x$has_forbidden_chars" != x; then
22296     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22297     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22298   fi
22299 
22300     # Output is in $new_path
22301 
22302   windows_path="$new_path"
22303   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22304     unix_path=`$CYGPATH -u "$windows_path"`
22305     new_path="$unix_path"
22306   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22307     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22308     new_path="$unix_path"
22309   fi
22310 
22311     # remove trailing .exe if any
22312     new_path="${new_path/%.exe/}"
22313 
22314     # Save the first 10 bytes of this path to the storage, so fixpath can work.
22315     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22316   fi
22317 
22318   else
22319     # We're on a posix platform. Hooray! :)
22320     # First separate the path from the arguments. This will split at the first
22321     # space.
22322     complete="$AR"
22323     path="${complete%% *}"
22324     tmp="$complete EOL"
22325     arguments="${tmp#* }"
22326 
22327     # Cannot rely on the command "which" here since it doesn't always work.
22328     is_absolute_path=`$ECHO "$path" | $GREP ^/`
22329     if test -z "$is_absolute_path"; then
22330       # Path to executable is not absolute. Find it.
22331       IFS_save="$IFS"
22332       IFS=:
22333       for p in $PATH; do
22334         if test -f "$p/$path" && test -x "$p/$path"; then
22335           new_path="$p/$path"
22336           break
22337         fi
22338       done
22339       IFS="$IFS_save"
22340     else
22341       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
22342 $as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
22343       new_path="$path"
22344     fi
22345 
22346     if test "x$new_path" = x; then
22347         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22348 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22349         has_space=`$ECHO "$complete" | $GREP " "`
22350         if test "x$has_space" != x; then
22351           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22352 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22353         fi
22354         as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22355       fi
22356   fi
22357 
22358       # Now join together the path and the arguments once again
22359       if test "x$arguments" != xEOL; then
22360         new_complete="$new_path ${arguments% *}"
22361       else
22362         new_complete="$new_path"
22363       fi
22364 
22365   if test "x$complete" != "x$new_complete"; then
22366       AR="$new_complete"
22367       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
22368 $as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
22369     fi
22370 
22371 fi
22372 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
22373     ARFLAGS="-r"
22374 else
22375     ARFLAGS=""
22376 fi
22377 
22378 
22379 # For hotspot, we need these in Windows mixed path; other platforms keep them the same
22380 HOTSPOT_CXX="$CXX"
22381 HOTSPOT_LD="$LD"
22382 
22383 
22384 
22385 COMPILER_NAME=gcc
22386 COMPILER_TYPE=CC
22387 if test "x$OPENJDK_TARGET_OS" = xwindows; then :
22388 
22389     # For now, assume that we are always compiling using cl.exe.
22390     CC_OUT_OPTION=-Fo
22391     EXE_OUT_OPTION=-out:
22392     LD_OUT_OPTION=-out:
22393     AR_OUT_OPTION=-out:
22394     # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
22395     # program for something completely different.
22396     # Extract the first word of "link", so it can be a program name with args.
22397 set dummy link; ac_word=$2
22398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22399 $as_echo_n "checking for $ac_word... " >&6; }
22400 if test "${ac_cv_prog_WINLD+set}" = set; then :
22401   $as_echo_n "(cached) " >&6
22402 else
22403   if test -n "$WINLD"; then
22404   ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
22405 else
22406   ac_prog_rejected=no
22407 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22408 for as_dir in $PATH
22409 do
22410   IFS=$as_save_IFS
22411   test -z "$as_dir" && as_dir=.
22412     for ac_exec_ext in '' $ac_executable_extensions; do
22413   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22414     if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
22415        ac_prog_rejected=yes
22416        continue
22417      fi
22418     ac_cv_prog_WINLD="link"
22419     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22420     break 2
22421   fi
22422 done
22423   done
22424 IFS=$as_save_IFS
22425 
22426 if test $ac_prog_rejected = yes; then
22427   # We found a bogon in the path, so make sure we never use it.
22428   set dummy $ac_cv_prog_WINLD
22429   shift
22430   if test $# != 0; then
22431     # We chose a different compiler from the bogus one.
22432     # However, it has the same basename, so the bogon will be chosen
22433     # first if we set WINLD to just the basename; use the full file name.
22434     shift
22435     ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
22436   fi
22437 fi
22438 fi
22439 fi
22440 WINLD=$ac_cv_prog_WINLD
22441 if test -n "$WINLD"; then
22442   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
22443 $as_echo "$WINLD" >&6; }
22444 else
22445   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22446 $as_echo "no" >&6; }
22447 fi
22448 
22449 
22450     # Since we must ignore the first found link, WINLD will contain
22451     # the full path to the link.exe program.
22452 
22453   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22454 
22455   # First separate the path from the arguments. This will split at the first
22456   # space.
22457   complete="$WINLD"
22458   path="${complete%% *}"
22459   tmp="$complete EOL"
22460   arguments="${tmp#* }"
22461 
22462   # Input might be given as Windows format, start by converting to
22463   # unix format.
22464   new_path=`$CYGPATH -u "$path"`
22465 
22466   # Now try to locate executable using which
22467   new_path=`$WHICH "$new_path" 2> /dev/null`
22468   # bat and cmd files are not always considered executable in cygwin causing which
22469   # to not find them
22470   if test "x$new_path" = x \
22471            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22472            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22473     new_path=`$CYGPATH -u "$path"`
22474   fi
22475   if test "x$new_path" = x; then
22476     # Oops. Which didn't find the executable.
22477     # The splitting of arguments from the executable at a space might have been incorrect,
22478     # since paths with space are more likely in Windows. Give it another try with the whole
22479     # argument.
22480     path="$complete"
22481     arguments="EOL"
22482     new_path=`$CYGPATH -u "$path"`
22483     new_path=`$WHICH "$new_path" 2> /dev/null`
22484     # bat and cmd files are not always considered executable in cygwin causing which
22485     # to not find them
22486     if test "x$new_path" = x \
22487              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22488              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22489       new_path=`$CYGPATH -u "$path"`
22490     fi
22491     if test "x$new_path" = x; then
22492       # It's still not found. Now this is an unrecoverable error.
22493       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22494 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22495       has_space=`$ECHO "$complete" | $GREP " "`
22496       if test "x$has_space" != x; then
22497         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22498 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22499       fi
22500       as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22501     fi
22502   fi
22503 
22504   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22505   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22506   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22507   # "foo.exe" is OK but "foo" is an error.
22508   #
22509   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22510   # It is also a way to make sure we got the proper file name for the real test later on.
22511   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22512   if test "x$test_shortpath" = x; then
22513     # Short path failed, file does not exist as specified.
22514     # Try adding .exe or .cmd
22515     if test -f "${new_path}.exe"; then
22516        input_to_shortpath="${new_path}.exe"
22517     elif test -f "${new_path}.cmd"; then
22518        input_to_shortpath="${new_path}.cmd"
22519     else
22520       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
22521 $as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
22522       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22523 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22524       as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22525     fi
22526   else
22527     input_to_shortpath="$new_path"
22528   fi
22529 
22530   # Call helper function which possibly converts this using DOS-style short mode.
22531   # If so, the updated path is stored in $new_path.
22532   new_path="$input_to_shortpath"
22533 
22534   input_path="$input_to_shortpath"
22535   # Check if we need to convert this using DOS-style short mode. If the path
22536   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22537   # take no chances and rewrite it.
22538   # Note: m4 eats our [], so we need to use [ and ] instead.
22539   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22540   if test "x$has_forbidden_chars" != x; then
22541     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22542     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22543     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22544     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22545       # Going to short mode and back again did indeed matter. Since short mode is
22546       # case insensitive, let's make it lowercase to improve readability.
22547       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22548       # Now convert it back to Unix-stile (cygpath)
22549       input_path=`$CYGPATH -u "$shortmode_path"`
22550       new_path="$input_path"
22551     fi
22552   fi
22553 
22554   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22555   if test "x$test_cygdrive_prefix" = x; then
22556     # As a simple fix, exclude /usr/bin since it's not a real path.
22557     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22558       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22559       # a path prefixed by /cygdrive for fixpath to work.
22560       new_path="$CYGWIN_ROOT_PATH$input_path"
22561     fi
22562   fi
22563 
22564   # remove trailing .exe if any
22565   new_path="${new_path/%.exe/}"
22566 
22567   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22568 
22569   # First separate the path from the arguments. This will split at the first
22570   # space.
22571   complete="$WINLD"
22572   path="${complete%% *}"
22573   tmp="$complete EOL"
22574   arguments="${tmp#* }"
22575 
22576   # Input might be given as Windows format, start by converting to
22577   # unix format.
22578   new_path="$path"
22579 
22580   windows_path="$new_path"
22581   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22582     unix_path=`$CYGPATH -u "$windows_path"`
22583     new_path="$unix_path"
22584   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22585     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22586     new_path="$unix_path"
22587   fi
22588 
22589 
22590   # Now try to locate executable using which
22591   new_path=`$WHICH "$new_path" 2> /dev/null`
22592 
22593   if test "x$new_path" = x; then
22594     # Oops. Which didn't find the executable.
22595     # The splitting of arguments from the executable at a space might have been incorrect,
22596     # since paths with space are more likely in Windows. Give it another try with the whole
22597     # argument.
22598     path="$complete"
22599     arguments="EOL"
22600     new_path="$path"
22601 
22602   windows_path="$new_path"
22603   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22604     unix_path=`$CYGPATH -u "$windows_path"`
22605     new_path="$unix_path"
22606   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22607     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22608     new_path="$unix_path"
22609   fi
22610 
22611 
22612     new_path=`$WHICH "$new_path" 2> /dev/null`
22613 
22614     if test "x$new_path" = x; then
22615       # It's still not found. Now this is an unrecoverable error.
22616       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22617 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22618       has_space=`$ECHO "$complete" | $GREP " "`
22619       if test "x$has_space" != x; then
22620         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22621 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22622       fi
22623       as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22624     fi
22625   fi
22626 
22627   # Now new_path has a complete unix path to the binary
22628   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22629     # Keep paths in /bin as-is, but remove trailing .exe if any
22630     new_path="${new_path/%.exe/}"
22631     # Do not save /bin paths to all_fixpath_prefixes!
22632   else
22633     # Not in mixed or Windows style, start by that.
22634     new_path=`cmd //c echo $new_path`
22635 
22636   input_path="$new_path"
22637   # Check if we need to convert this using DOS-style short mode. If the path
22638   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22639   # take no chances and rewrite it.
22640   # Note: m4 eats our [], so we need to use [ and ] instead.
22641   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22642   if test "x$has_forbidden_chars" != x; then
22643     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22644     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22645   fi
22646 
22647     # Output is in $new_path
22648 
22649   windows_path="$new_path"
22650   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22651     unix_path=`$CYGPATH -u "$windows_path"`
22652     new_path="$unix_path"
22653   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22654     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22655     new_path="$unix_path"
22656   fi
22657 
22658     # remove trailing .exe if any
22659     new_path="${new_path/%.exe/}"
22660 
22661     # Save the first 10 bytes of this path to the storage, so fixpath can work.
22662     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22663   fi
22664 
22665   else
22666     # We're on a posix platform. Hooray! :)
22667     # First separate the path from the arguments. This will split at the first
22668     # space.
22669     complete="$WINLD"
22670     path="${complete%% *}"
22671     tmp="$complete EOL"
22672     arguments="${tmp#* }"
22673 
22674     # Cannot rely on the command "which" here since it doesn't always work.
22675     is_absolute_path=`$ECHO "$path" | $GREP ^/`
22676     if test -z "$is_absolute_path"; then
22677       # Path to executable is not absolute. Find it.
22678       IFS_save="$IFS"
22679       IFS=:
22680       for p in $PATH; do
22681         if test -f "$p/$path" && test -x "$p/$path"; then
22682           new_path="$p/$path"
22683           break
22684         fi
22685       done
22686       IFS="$IFS_save"
22687     else
22688       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
22689 $as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
22690       new_path="$path"
22691     fi
22692 
22693     if test "x$new_path" = x; then
22694         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22695 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22696         has_space=`$ECHO "$complete" | $GREP " "`
22697         if test "x$has_space" != x; then
22698           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22699 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22700         fi
22701         as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22702       fi
22703   fi
22704 
22705       # Now join together the path and the arguments once again
22706       if test "x$arguments" != xEOL; then
22707         new_complete="$new_path ${arguments% *}"
22708       else
22709         new_complete="$new_path"
22710       fi
22711 
22712   if test "x$complete" != "x$new_complete"; then
22713       WINLD="$new_complete"
22714       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
22715 $as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
22716     fi
22717 
22718     printf "Windows linker was found at $WINLD\n"
22719     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
22720 $as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
22721     "$WINLD" --version > /dev/null
22722     if test $? -eq 0 ; then
22723       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22724 $as_echo "no" >&6; }
22725       as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
22726     else
22727       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22728 $as_echo "yes" >&6; }
22729     fi
22730     LD="$WINLD"
22731     LDEXE="$WINLD"
22732     LDCXX="$WINLD"
22733     LDEXECXX="$WINLD"
22734 
22735     # Extract the first word of "mt", so it can be a program name with args.
22736 set dummy mt; ac_word=$2
22737 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22738 $as_echo_n "checking for $ac_word... " >&6; }
22739 if test "${ac_cv_prog_MT+set}" = set; then :
22740   $as_echo_n "(cached) " >&6
22741 else
22742   if test -n "$MT"; then
22743   ac_cv_prog_MT="$MT" # Let the user override the test.
22744 else
22745   ac_prog_rejected=no
22746 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22747 for as_dir in $PATH
22748 do
22749   IFS=$as_save_IFS
22750   test -z "$as_dir" && as_dir=.
22751     for ac_exec_ext in '' $ac_executable_extensions; do
22752   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22753     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
22754        ac_prog_rejected=yes
22755        continue
22756      fi
22757     ac_cv_prog_MT="mt"
22758     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22759     break 2
22760   fi
22761 done
22762   done
22763 IFS=$as_save_IFS
22764 
22765 if test $ac_prog_rejected = yes; then
22766   # We found a bogon in the path, so make sure we never use it.
22767   set dummy $ac_cv_prog_MT
22768   shift
22769   if test $# != 0; then
22770     # We chose a different compiler from the bogus one.
22771     # However, it has the same basename, so the bogon will be chosen
22772     # first if we set MT to just the basename; use the full file name.
22773     shift
22774     ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
22775   fi
22776 fi
22777 fi
22778 fi
22779 MT=$ac_cv_prog_MT
22780 if test -n "$MT"; then
22781   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
22782 $as_echo "$MT" >&6; }
22783 else
22784   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22785 $as_echo "no" >&6; }
22786 fi
22787 
22788 
22789 
22790   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22791 
22792   # First separate the path from the arguments. This will split at the first
22793   # space.
22794   complete="$MT"
22795   path="${complete%% *}"
22796   tmp="$complete EOL"
22797   arguments="${tmp#* }"
22798 
22799   # Input might be given as Windows format, start by converting to
22800   # unix format.
22801   new_path=`$CYGPATH -u "$path"`
22802 
22803   # Now try to locate executable using which
22804   new_path=`$WHICH "$new_path" 2> /dev/null`
22805   # bat and cmd files are not always considered executable in cygwin causing which
22806   # to not find them
22807   if test "x$new_path" = x \
22808            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22809            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22810     new_path=`$CYGPATH -u "$path"`
22811   fi
22812   if test "x$new_path" = x; then
22813     # Oops. Which didn't find the executable.
22814     # The splitting of arguments from the executable at a space might have been incorrect,
22815     # since paths with space are more likely in Windows. Give it another try with the whole
22816     # argument.
22817     path="$complete"
22818     arguments="EOL"
22819     new_path=`$CYGPATH -u "$path"`
22820     new_path=`$WHICH "$new_path" 2> /dev/null`
22821     # bat and cmd files are not always considered executable in cygwin causing which
22822     # to not find them
22823     if test "x$new_path" = x \
22824              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22825              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22826       new_path=`$CYGPATH -u "$path"`
22827     fi
22828     if test "x$new_path" = x; then
22829       # It's still not found. Now this is an unrecoverable error.
22830       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22831 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22832       has_space=`$ECHO "$complete" | $GREP " "`
22833       if test "x$has_space" != x; then
22834         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22835 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22836       fi
22837       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22838     fi
22839   fi
22840 
22841   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22842   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22843   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22844   # "foo.exe" is OK but "foo" is an error.
22845   #
22846   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22847   # It is also a way to make sure we got the proper file name for the real test later on.
22848   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22849   if test "x$test_shortpath" = x; then
22850     # Short path failed, file does not exist as specified.
22851     # Try adding .exe or .cmd
22852     if test -f "${new_path}.exe"; then
22853        input_to_shortpath="${new_path}.exe"
22854     elif test -f "${new_path}.cmd"; then
22855        input_to_shortpath="${new_path}.cmd"
22856     else
22857       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
22858 $as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
22859       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22860 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22861       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22862     fi
22863   else
22864     input_to_shortpath="$new_path"
22865   fi
22866 
22867   # Call helper function which possibly converts this using DOS-style short mode.
22868   # If so, the updated path is stored in $new_path.
22869   new_path="$input_to_shortpath"
22870 
22871   input_path="$input_to_shortpath"
22872   # Check if we need to convert this using DOS-style short mode. If the path
22873   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22874   # take no chances and rewrite it.
22875   # Note: m4 eats our [], so we need to use [ and ] instead.
22876   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22877   if test "x$has_forbidden_chars" != x; then
22878     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22879     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22880     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22881     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22882       # Going to short mode and back again did indeed matter. Since short mode is
22883       # case insensitive, let's make it lowercase to improve readability.
22884       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22885       # Now convert it back to Unix-stile (cygpath)
22886       input_path=`$CYGPATH -u "$shortmode_path"`
22887       new_path="$input_path"
22888     fi
22889   fi
22890 
22891   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22892   if test "x$test_cygdrive_prefix" = x; then
22893     # As a simple fix, exclude /usr/bin since it's not a real path.
22894     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22895       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22896       # a path prefixed by /cygdrive for fixpath to work.
22897       new_path="$CYGWIN_ROOT_PATH$input_path"
22898     fi
22899   fi
22900 
22901   # remove trailing .exe if any
22902   new_path="${new_path/%.exe/}"
22903 
22904   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22905 
22906   # First separate the path from the arguments. This will split at the first
22907   # space.
22908   complete="$MT"
22909   path="${complete%% *}"
22910   tmp="$complete EOL"
22911   arguments="${tmp#* }"
22912 
22913   # Input might be given as Windows format, start by converting to
22914   # unix format.
22915   new_path="$path"
22916 
22917   windows_path="$new_path"
22918   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22919     unix_path=`$CYGPATH -u "$windows_path"`
22920     new_path="$unix_path"
22921   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22922     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22923     new_path="$unix_path"
22924   fi
22925 
22926 
22927   # Now try to locate executable using which
22928   new_path=`$WHICH "$new_path" 2> /dev/null`
22929 
22930   if test "x$new_path" = x; then
22931     # Oops. Which didn't find the executable.
22932     # The splitting of arguments from the executable at a space might have been incorrect,
22933     # since paths with space are more likely in Windows. Give it another try with the whole
22934     # argument.
22935     path="$complete"
22936     arguments="EOL"
22937     new_path="$path"
22938 
22939   windows_path="$new_path"
22940   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22941     unix_path=`$CYGPATH -u "$windows_path"`
22942     new_path="$unix_path"
22943   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22944     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22945     new_path="$unix_path"
22946   fi
22947 
22948 
22949     new_path=`$WHICH "$new_path" 2> /dev/null`
22950 
22951     if test "x$new_path" = x; then
22952       # It's still not found. Now this is an unrecoverable error.
22953       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22954 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22955       has_space=`$ECHO "$complete" | $GREP " "`
22956       if test "x$has_space" != x; then
22957         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22958 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22959       fi
22960       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22961     fi
22962   fi
22963 
22964   # Now new_path has a complete unix path to the binary
22965   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22966     # Keep paths in /bin as-is, but remove trailing .exe if any
22967     new_path="${new_path/%.exe/}"
22968     # Do not save /bin paths to all_fixpath_prefixes!
22969   else
22970     # Not in mixed or Windows style, start by that.
22971     new_path=`cmd //c echo $new_path`
22972 
22973   input_path="$new_path"
22974   # Check if we need to convert this using DOS-style short mode. If the path
22975   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22976   # take no chances and rewrite it.
22977   # Note: m4 eats our [], so we need to use [ and ] instead.
22978   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22979   if test "x$has_forbidden_chars" != x; then
22980     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22981     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22982   fi
22983 
22984     # Output is in $new_path
22985 
22986   windows_path="$new_path"
22987   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22988     unix_path=`$CYGPATH -u "$windows_path"`
22989     new_path="$unix_path"
22990   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22991     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22992     new_path="$unix_path"
22993   fi
22994 
22995     # remove trailing .exe if any
22996     new_path="${new_path/%.exe/}"
22997 
22998     # Save the first 10 bytes of this path to the storage, so fixpath can work.
22999     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23000   fi
23001 
23002   else
23003     # We're on a posix platform. Hooray! :)
23004     # First separate the path from the arguments. This will split at the first
23005     # space.
23006     complete="$MT"
23007     path="${complete%% *}"
23008     tmp="$complete EOL"
23009     arguments="${tmp#* }"
23010 
23011     # Cannot rely on the command "which" here since it doesn't always work.
23012     is_absolute_path=`$ECHO "$path" | $GREP ^/`
23013     if test -z "$is_absolute_path"; then
23014       # Path to executable is not absolute. Find it.
23015       IFS_save="$IFS"
23016       IFS=:
23017       for p in $PATH; do
23018         if test -f "$p/$path" && test -x "$p/$path"; then
23019           new_path="$p/$path"
23020           break
23021         fi
23022       done
23023       IFS="$IFS_save"
23024     else
23025       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
23026 $as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
23027       new_path="$path"
23028     fi
23029 
23030     if test "x$new_path" = x; then
23031         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23032 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23033         has_space=`$ECHO "$complete" | $GREP " "`
23034         if test "x$has_space" != x; then
23035           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23036 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23037         fi
23038         as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23039       fi
23040   fi
23041 
23042       # Now join together the path and the arguments once again
23043       if test "x$arguments" != xEOL; then
23044         new_complete="$new_path ${arguments% *}"
23045       else
23046         new_complete="$new_path"
23047       fi
23048 
23049   if test "x$complete" != "x$new_complete"; then
23050       MT="$new_complete"
23051       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
23052 $as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
23053     fi
23054 
23055     # The resource compiler
23056     # Extract the first word of "rc", so it can be a program name with args.
23057 set dummy rc; ac_word=$2
23058 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23059 $as_echo_n "checking for $ac_word... " >&6; }
23060 if test "${ac_cv_prog_RC+set}" = set; then :
23061   $as_echo_n "(cached) " >&6
23062 else
23063   if test -n "$RC"; then
23064   ac_cv_prog_RC="$RC" # Let the user override the test.
23065 else
23066   ac_prog_rejected=no
23067 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23068 for as_dir in $PATH
23069 do
23070   IFS=$as_save_IFS
23071   test -z "$as_dir" && as_dir=.
23072     for ac_exec_ext in '' $ac_executable_extensions; do
23073   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23074     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
23075        ac_prog_rejected=yes
23076        continue
23077      fi
23078     ac_cv_prog_RC="rc"
23079     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23080     break 2
23081   fi
23082 done
23083   done
23084 IFS=$as_save_IFS
23085 
23086 if test $ac_prog_rejected = yes; then
23087   # We found a bogon in the path, so make sure we never use it.
23088   set dummy $ac_cv_prog_RC
23089   shift
23090   if test $# != 0; then
23091     # We chose a different compiler from the bogus one.
23092     # However, it has the same basename, so the bogon will be chosen
23093     # first if we set RC to just the basename; use the full file name.
23094     shift
23095     ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
23096   fi
23097 fi
23098 fi
23099 fi
23100 RC=$ac_cv_prog_RC
23101 if test -n "$RC"; then
23102   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
23103 $as_echo "$RC" >&6; }
23104 else
23105   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23106 $as_echo "no" >&6; }
23107 fi
23108 
23109 
23110 
23111   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23112 
23113   # First separate the path from the arguments. This will split at the first
23114   # space.
23115   complete="$RC"
23116   path="${complete%% *}"
23117   tmp="$complete EOL"
23118   arguments="${tmp#* }"
23119 
23120   # Input might be given as Windows format, start by converting to
23121   # unix format.
23122   new_path=`$CYGPATH -u "$path"`
23123 
23124   # Now try to locate executable using which
23125   new_path=`$WHICH "$new_path" 2> /dev/null`
23126   # bat and cmd files are not always considered executable in cygwin causing which
23127   # to not find them
23128   if test "x$new_path" = x \
23129            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23130            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23131     new_path=`$CYGPATH -u "$path"`
23132   fi
23133   if test "x$new_path" = x; then
23134     # Oops. Which didn't find the executable.
23135     # The splitting of arguments from the executable at a space might have been incorrect,
23136     # since paths with space are more likely in Windows. Give it another try with the whole
23137     # argument.
23138     path="$complete"
23139     arguments="EOL"
23140     new_path=`$CYGPATH -u "$path"`
23141     new_path=`$WHICH "$new_path" 2> /dev/null`
23142     # bat and cmd files are not always considered executable in cygwin causing which
23143     # to not find them
23144     if test "x$new_path" = x \
23145              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23146              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23147       new_path=`$CYGPATH -u "$path"`
23148     fi
23149     if test "x$new_path" = x; then
23150       # It's still not found. Now this is an unrecoverable error.
23151       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23152 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23153       has_space=`$ECHO "$complete" | $GREP " "`
23154       if test "x$has_space" != x; then
23155         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23156 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23157       fi
23158       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23159     fi
23160   fi
23161 
23162   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23163   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23164   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23165   # "foo.exe" is OK but "foo" is an error.
23166   #
23167   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23168   # It is also a way to make sure we got the proper file name for the real test later on.
23169   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23170   if test "x$test_shortpath" = x; then
23171     # Short path failed, file does not exist as specified.
23172     # Try adding .exe or .cmd
23173     if test -f "${new_path}.exe"; then
23174        input_to_shortpath="${new_path}.exe"
23175     elif test -f "${new_path}.cmd"; then
23176        input_to_shortpath="${new_path}.cmd"
23177     else
23178       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
23179 $as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
23180       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23181 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23182       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23183     fi
23184   else
23185     input_to_shortpath="$new_path"
23186   fi
23187 
23188   # Call helper function which possibly converts this using DOS-style short mode.
23189   # If so, the updated path is stored in $new_path.
23190   new_path="$input_to_shortpath"
23191 
23192   input_path="$input_to_shortpath"
23193   # Check if we need to convert this using DOS-style short mode. If the path
23194   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23195   # take no chances and rewrite it.
23196   # Note: m4 eats our [], so we need to use [ and ] instead.
23197   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23198   if test "x$has_forbidden_chars" != x; then
23199     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23200     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23201     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23202     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23203       # Going to short mode and back again did indeed matter. Since short mode is
23204       # case insensitive, let's make it lowercase to improve readability.
23205       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23206       # Now convert it back to Unix-stile (cygpath)
23207       input_path=`$CYGPATH -u "$shortmode_path"`
23208       new_path="$input_path"
23209     fi
23210   fi
23211 
23212   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23213   if test "x$test_cygdrive_prefix" = x; then
23214     # As a simple fix, exclude /usr/bin since it's not a real path.
23215     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23216       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23217       # a path prefixed by /cygdrive for fixpath to work.
23218       new_path="$CYGWIN_ROOT_PATH$input_path"
23219     fi
23220   fi
23221 
23222   # remove trailing .exe if any
23223   new_path="${new_path/%.exe/}"
23224 
23225   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23226 
23227   # First separate the path from the arguments. This will split at the first
23228   # space.
23229   complete="$RC"
23230   path="${complete%% *}"
23231   tmp="$complete EOL"
23232   arguments="${tmp#* }"
23233 
23234   # Input might be given as Windows format, start by converting to
23235   # unix format.
23236   new_path="$path"
23237 
23238   windows_path="$new_path"
23239   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23240     unix_path=`$CYGPATH -u "$windows_path"`
23241     new_path="$unix_path"
23242   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23243     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23244     new_path="$unix_path"
23245   fi
23246 
23247 
23248   # Now try to locate executable using which
23249   new_path=`$WHICH "$new_path" 2> /dev/null`
23250 
23251   if test "x$new_path" = x; then
23252     # Oops. Which didn't find the executable.
23253     # The splitting of arguments from the executable at a space might have been incorrect,
23254     # since paths with space are more likely in Windows. Give it another try with the whole
23255     # argument.
23256     path="$complete"
23257     arguments="EOL"
23258     new_path="$path"
23259 
23260   windows_path="$new_path"
23261   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23262     unix_path=`$CYGPATH -u "$windows_path"`
23263     new_path="$unix_path"
23264   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23265     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23266     new_path="$unix_path"
23267   fi
23268 
23269 
23270     new_path=`$WHICH "$new_path" 2> /dev/null`
23271 
23272     if test "x$new_path" = x; then
23273       # It's still not found. Now this is an unrecoverable error.
23274       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23275 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23276       has_space=`$ECHO "$complete" | $GREP " "`
23277       if test "x$has_space" != x; then
23278         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23279 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23280       fi
23281       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23282     fi
23283   fi
23284 
23285   # Now new_path has a complete unix path to the binary
23286   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23287     # Keep paths in /bin as-is, but remove trailing .exe if any
23288     new_path="${new_path/%.exe/}"
23289     # Do not save /bin paths to all_fixpath_prefixes!
23290   else
23291     # Not in mixed or Windows style, start by that.
23292     new_path=`cmd //c echo $new_path`
23293 
23294   input_path="$new_path"
23295   # Check if we need to convert this using DOS-style short mode. If the path
23296   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23297   # take no chances and rewrite it.
23298   # Note: m4 eats our [], so we need to use [ and ] instead.
23299   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23300   if test "x$has_forbidden_chars" != x; then
23301     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23302     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23303   fi
23304 
23305     # Output is in $new_path
23306 
23307   windows_path="$new_path"
23308   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23309     unix_path=`$CYGPATH -u "$windows_path"`
23310     new_path="$unix_path"
23311   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23312     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23313     new_path="$unix_path"
23314   fi
23315 
23316     # remove trailing .exe if any
23317     new_path="${new_path/%.exe/}"
23318 
23319     # Save the first 10 bytes of this path to the storage, so fixpath can work.
23320     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23321   fi
23322 
23323   else
23324     # We're on a posix platform. Hooray! :)
23325     # First separate the path from the arguments. This will split at the first
23326     # space.
23327     complete="$RC"
23328     path="${complete%% *}"
23329     tmp="$complete EOL"
23330     arguments="${tmp#* }"
23331 
23332     # Cannot rely on the command "which" here since it doesn't always work.
23333     is_absolute_path=`$ECHO "$path" | $GREP ^/`
23334     if test -z "$is_absolute_path"; then
23335       # Path to executable is not absolute. Find it.
23336       IFS_save="$IFS"
23337       IFS=:
23338       for p in $PATH; do
23339         if test -f "$p/$path" && test -x "$p/$path"; then
23340           new_path="$p/$path"
23341           break
23342         fi
23343       done
23344       IFS="$IFS_save"
23345     else
23346       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
23347 $as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
23348       new_path="$path"
23349     fi
23350 
23351     if test "x$new_path" = x; then
23352         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23353 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23354         has_space=`$ECHO "$complete" | $GREP " "`
23355         if test "x$has_space" != x; then
23356           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23357 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23358         fi
23359         as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23360       fi
23361   fi
23362 
23363       # Now join together the path and the arguments once again
23364       if test "x$arguments" != xEOL; then
23365         new_complete="$new_path ${arguments% *}"
23366       else
23367         new_complete="$new_path"
23368       fi
23369 
23370   if test "x$complete" != "x$new_complete"; then
23371       RC="$new_complete"
23372       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
23373 $as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
23374     fi
23375 
23376 
23377     # For hotspot, we need these in Windows mixed path,
23378     # so rewrite them all. Need added .exe suffix.
23379     HOTSPOT_CXX="$CXX.exe"
23380     HOTSPOT_LD="$LD.exe"
23381     HOTSPOT_MT="$MT.exe"
23382     HOTSPOT_RC="$RC.exe"
23383 
23384   unix_path="$HOTSPOT_CXX"
23385   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23386     windows_path=`$CYGPATH -m "$unix_path"`
23387     HOTSPOT_CXX="$windows_path"
23388   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23389     windows_path=`cmd //c echo $unix_path`
23390     HOTSPOT_CXX="$windows_path"
23391   fi
23392 
23393 
23394   unix_path="$HOTSPOT_LD"
23395   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23396     windows_path=`$CYGPATH -m "$unix_path"`
23397     HOTSPOT_LD="$windows_path"
23398   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23399     windows_path=`cmd //c echo $unix_path`
23400     HOTSPOT_LD="$windows_path"
23401   fi
23402 
23403 
23404   unix_path="$HOTSPOT_MT"
23405   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23406     windows_path=`$CYGPATH -m "$unix_path"`
23407     HOTSPOT_MT="$windows_path"
23408   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23409     windows_path=`cmd //c echo $unix_path`
23410     HOTSPOT_MT="$windows_path"
23411   fi
23412 
23413 
23414   unix_path="$HOTSPOT_RC"
23415   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23416     windows_path=`$CYGPATH -m "$unix_path"`
23417     HOTSPOT_RC="$windows_path"
23418   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23419     windows_path=`cmd //c echo $unix_path`
23420     HOTSPOT_RC="$windows_path"
23421   fi
23422 
23423 
23424 
23425 
23426     RC_FLAGS="-nologo -l 0x409 -r"
23427     if test "x$VARIANT" = xOPT; then :
23428 
23429         RC_FLAGS="$RC_FLAGS -d NDEBUG"
23430 
23431 fi
23432     JDK_UPDATE_VERSION_NOTNULL=$JDK_UPDATE_VERSION
23433     if test "x$JDK_UPDATE_VERSION" = x; then :
23434 
23435         JDK_UPDATE_VERSION_NOTNULL=0
23436 
23437 fi
23438     RC_FLAGS="$RC_FLAGS -d \"JDK_BUILD_ID=$FULL_VERSION\""
23439     RC_FLAGS="$RC_FLAGS -d \"JDK_COMPANY=$COMPANY_NAME\""
23440     RC_FLAGS="$RC_FLAGS -d \"JDK_COMPONENT=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME binary\""
23441     RC_FLAGS="$RC_FLAGS -d \"JDK_VER=$JDK_MINOR_VERSION.$JDK_MICRO_VERSION.$JDK_UPDATE_VERSION_NOTNULL.$COOKED_BUILD_NUMBER\""
23442     RC_FLAGS="$RC_FLAGS -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\""
23443     RC_FLAGS="$RC_FLAGS -d \"JDK_NAME=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME $JDK_MINOR_VERSION $JDK_UPDATE_META_TAG\""
23444     RC_FLAGS="$RC_FLAGS -d \"JDK_FVER=$JDK_MINOR_VERSION,$JDK_MICRO_VERSION,$JDK_UPDATE_VERSION_NOTNULL,$COOKED_BUILD_NUMBER\""
23445 
23446     # lib.exe is used to create static libraries.
23447     # Extract the first word of "lib", so it can be a program name with args.
23448 set dummy lib; ac_word=$2
23449 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23450 $as_echo_n "checking for $ac_word... " >&6; }
23451 if test "${ac_cv_prog_WINAR+set}" = set; then :
23452   $as_echo_n "(cached) " >&6
23453 else
23454   if test -n "$WINAR"; then
23455   ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
23456 else
23457 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23458 for as_dir in $PATH
23459 do
23460   IFS=$as_save_IFS
23461   test -z "$as_dir" && as_dir=.
23462     for ac_exec_ext in '' $ac_executable_extensions; do
23463   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23464     ac_cv_prog_WINAR="lib"
23465     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23466     break 2
23467   fi
23468 done
23469   done
23470 IFS=$as_save_IFS
23471 
23472 fi
23473 fi
23474 WINAR=$ac_cv_prog_WINAR
23475 if test -n "$WINAR"; then
23476   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
23477 $as_echo "$WINAR" >&6; }
23478 else
23479   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23480 $as_echo "no" >&6; }
23481 fi
23482 
23483 
23484 
23485   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23486 
23487   # First separate the path from the arguments. This will split at the first
23488   # space.
23489   complete="$WINAR"
23490   path="${complete%% *}"
23491   tmp="$complete EOL"
23492   arguments="${tmp#* }"
23493 
23494   # Input might be given as Windows format, start by converting to
23495   # unix format.
23496   new_path=`$CYGPATH -u "$path"`
23497 
23498   # Now try to locate executable using which
23499   new_path=`$WHICH "$new_path" 2> /dev/null`
23500   # bat and cmd files are not always considered executable in cygwin causing which
23501   # to not find them
23502   if test "x$new_path" = x \
23503            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23504            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23505     new_path=`$CYGPATH -u "$path"`
23506   fi
23507   if test "x$new_path" = x; then
23508     # Oops. Which didn't find the executable.
23509     # The splitting of arguments from the executable at a space might have been incorrect,
23510     # since paths with space are more likely in Windows. Give it another try with the whole
23511     # argument.
23512     path="$complete"
23513     arguments="EOL"
23514     new_path=`$CYGPATH -u "$path"`
23515     new_path=`$WHICH "$new_path" 2> /dev/null`
23516     # bat and cmd files are not always considered executable in cygwin causing which
23517     # to not find them
23518     if test "x$new_path" = x \
23519              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23520              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23521       new_path=`$CYGPATH -u "$path"`
23522     fi
23523     if test "x$new_path" = x; then
23524       # It's still not found. Now this is an unrecoverable error.
23525       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23526 $as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23527       has_space=`$ECHO "$complete" | $GREP " "`
23528       if test "x$has_space" != x; then
23529         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23530 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23531       fi
23532       as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23533     fi
23534   fi
23535 
23536   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23537   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23538   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23539   # "foo.exe" is OK but "foo" is an error.
23540   #
23541   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23542   # It is also a way to make sure we got the proper file name for the real test later on.
23543   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23544   if test "x$test_shortpath" = x; then
23545     # Short path failed, file does not exist as specified.
23546     # Try adding .exe or .cmd
23547     if test -f "${new_path}.exe"; then
23548        input_to_shortpath="${new_path}.exe"
23549     elif test -f "${new_path}.cmd"; then
23550        input_to_shortpath="${new_path}.cmd"
23551     else
23552       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
23553 $as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
23554       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23555 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23556       as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23557     fi
23558   else
23559     input_to_shortpath="$new_path"
23560   fi
23561 
23562   # Call helper function which possibly converts this using DOS-style short mode.
23563   # If so, the updated path is stored in $new_path.
23564   new_path="$input_to_shortpath"
23565 
23566   input_path="$input_to_shortpath"
23567   # Check if we need to convert this using DOS-style short mode. If the path
23568   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23569   # take no chances and rewrite it.
23570   # Note: m4 eats our [], so we need to use [ and ] instead.
23571   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23572   if test "x$has_forbidden_chars" != x; then
23573     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23574     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23575     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23576     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23577       # Going to short mode and back again did indeed matter. Since short mode is
23578       # case insensitive, let's make it lowercase to improve readability.
23579       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23580       # Now convert it back to Unix-stile (cygpath)
23581       input_path=`$CYGPATH -u "$shortmode_path"`
23582       new_path="$input_path"
23583     fi
23584   fi
23585 
23586   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23587   if test "x$test_cygdrive_prefix" = x; then
23588     # As a simple fix, exclude /usr/bin since it's not a real path.
23589     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23590       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23591       # a path prefixed by /cygdrive for fixpath to work.
23592       new_path="$CYGWIN_ROOT_PATH$input_path"
23593     fi
23594   fi
23595 
23596   # remove trailing .exe if any
23597   new_path="${new_path/%.exe/}"
23598 
23599   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23600 
23601   # First separate the path from the arguments. This will split at the first
23602   # space.
23603   complete="$WINAR"
23604   path="${complete%% *}"
23605   tmp="$complete EOL"
23606   arguments="${tmp#* }"
23607 
23608   # Input might be given as Windows format, start by converting to
23609   # unix format.
23610   new_path="$path"
23611 
23612   windows_path="$new_path"
23613   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23614     unix_path=`$CYGPATH -u "$windows_path"`
23615     new_path="$unix_path"
23616   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23617     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23618     new_path="$unix_path"
23619   fi
23620 
23621 
23622   # Now try to locate executable using which
23623   new_path=`$WHICH "$new_path" 2> /dev/null`
23624 
23625   if test "x$new_path" = x; then
23626     # Oops. Which didn't find the executable.
23627     # The splitting of arguments from the executable at a space might have been incorrect,
23628     # since paths with space are more likely in Windows. Give it another try with the whole
23629     # argument.
23630     path="$complete"
23631     arguments="EOL"
23632     new_path="$path"
23633 
23634   windows_path="$new_path"
23635   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23636     unix_path=`$CYGPATH -u "$windows_path"`
23637     new_path="$unix_path"
23638   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23639     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23640     new_path="$unix_path"
23641   fi
23642 
23643 
23644     new_path=`$WHICH "$new_path" 2> /dev/null`
23645 
23646     if test "x$new_path" = x; then
23647       # It's still not found. Now this is an unrecoverable error.
23648       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23649 $as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23650       has_space=`$ECHO "$complete" | $GREP " "`
23651       if test "x$has_space" != x; then
23652         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23653 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23654       fi
23655       as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23656     fi
23657   fi
23658 
23659   # Now new_path has a complete unix path to the binary
23660   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23661     # Keep paths in /bin as-is, but remove trailing .exe if any
23662     new_path="${new_path/%.exe/}"
23663     # Do not save /bin paths to all_fixpath_prefixes!
23664   else
23665     # Not in mixed or Windows style, start by that.
23666     new_path=`cmd //c echo $new_path`
23667 
23668   input_path="$new_path"
23669   # Check if we need to convert this using DOS-style short mode. If the path
23670   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23671   # take no chances and rewrite it.
23672   # Note: m4 eats our [], so we need to use [ and ] instead.
23673   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23674   if test "x$has_forbidden_chars" != x; then
23675     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23676     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23677   fi
23678 
23679     # Output is in $new_path
23680 
23681   windows_path="$new_path"
23682   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23683     unix_path=`$CYGPATH -u "$windows_path"`
23684     new_path="$unix_path"
23685   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23686     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23687     new_path="$unix_path"
23688   fi
23689 
23690     # remove trailing .exe if any
23691     new_path="${new_path/%.exe/}"
23692 
23693     # Save the first 10 bytes of this path to the storage, so fixpath can work.
23694     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23695   fi
23696 
23697   else
23698     # We're on a posix platform. Hooray! :)
23699     # First separate the path from the arguments. This will split at the first
23700     # space.
23701     complete="$WINAR"
23702     path="${complete%% *}"
23703     tmp="$complete EOL"
23704     arguments="${tmp#* }"
23705 
23706     # Cannot rely on the command "which" here since it doesn't always work.
23707     is_absolute_path=`$ECHO "$path" | $GREP ^/`
23708     if test -z "$is_absolute_path"; then
23709       # Path to executable is not absolute. Find it.
23710       IFS_save="$IFS"
23711       IFS=:
23712       for p in $PATH; do
23713         if test -f "$p/$path" && test -x "$p/$path"; then
23714           new_path="$p/$path"
23715           break
23716         fi
23717       done
23718       IFS="$IFS_save"
23719     else
23720       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
23721 $as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
23722       new_path="$path"
23723     fi
23724 
23725     if test "x$new_path" = x; then
23726         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23727 $as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23728         has_space=`$ECHO "$complete" | $GREP " "`
23729         if test "x$has_space" != x; then
23730           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23731 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23732         fi
23733         as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23734       fi
23735   fi
23736 
23737       # Now join together the path and the arguments once again
23738       if test "x$arguments" != xEOL; then
23739         new_complete="$new_path ${arguments% *}"
23740       else
23741         new_complete="$new_path"
23742       fi
23743 
23744   if test "x$complete" != "x$new_complete"; then
23745       WINAR="$new_complete"
23746       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
23747 $as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
23748     fi
23749 
23750     AR="$WINAR"
23751     ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
23752 
23753     # Extract the first word of "dumpbin", so it can be a program name with args.
23754 set dummy dumpbin; ac_word=$2
23755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23756 $as_echo_n "checking for $ac_word... " >&6; }
23757 if test "${ac_cv_prog_DUMPBIN+set}" = set; then :
23758   $as_echo_n "(cached) " >&6
23759 else
23760   if test -n "$DUMPBIN"; then
23761   ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
23762 else
23763 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23764 for as_dir in $PATH
23765 do
23766   IFS=$as_save_IFS
23767   test -z "$as_dir" && as_dir=.
23768     for ac_exec_ext in '' $ac_executable_extensions; do
23769   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23770     ac_cv_prog_DUMPBIN="dumpbin"
23771     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23772     break 2
23773   fi
23774 done
23775   done
23776 IFS=$as_save_IFS
23777 
23778 fi
23779 fi
23780 DUMPBIN=$ac_cv_prog_DUMPBIN
23781 if test -n "$DUMPBIN"; then
23782   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
23783 $as_echo "$DUMPBIN" >&6; }
23784 else
23785   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23786 $as_echo "no" >&6; }
23787 fi
23788 
23789 
23790 
23791   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23792 
23793   # First separate the path from the arguments. This will split at the first
23794   # space.
23795   complete="$DUMPBIN"
23796   path="${complete%% *}"
23797   tmp="$complete EOL"
23798   arguments="${tmp#* }"
23799 
23800   # Input might be given as Windows format, start by converting to
23801   # unix format.
23802   new_path=`$CYGPATH -u "$path"`
23803 
23804   # Now try to locate executable using which
23805   new_path=`$WHICH "$new_path" 2> /dev/null`
23806   # bat and cmd files are not always considered executable in cygwin causing which
23807   # to not find them
23808   if test "x$new_path" = x \
23809            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23810            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23811     new_path=`$CYGPATH -u "$path"`
23812   fi
23813   if test "x$new_path" = x; then
23814     # Oops. Which didn't find the executable.
23815     # The splitting of arguments from the executable at a space might have been incorrect,
23816     # since paths with space are more likely in Windows. Give it another try with the whole
23817     # argument.
23818     path="$complete"
23819     arguments="EOL"
23820     new_path=`$CYGPATH -u "$path"`
23821     new_path=`$WHICH "$new_path" 2> /dev/null`
23822     # bat and cmd files are not always considered executable in cygwin causing which
23823     # to not find them
23824     if test "x$new_path" = x \
23825              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23826              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23827       new_path=`$CYGPATH -u "$path"`
23828     fi
23829     if test "x$new_path" = x; then
23830       # It's still not found. Now this is an unrecoverable error.
23831       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23832 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23833       has_space=`$ECHO "$complete" | $GREP " "`
23834       if test "x$has_space" != x; then
23835         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23836 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23837       fi
23838       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23839     fi
23840   fi
23841 
23842   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23843   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23844   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23845   # "foo.exe" is OK but "foo" is an error.
23846   #
23847   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23848   # It is also a way to make sure we got the proper file name for the real test later on.
23849   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23850   if test "x$test_shortpath" = x; then
23851     # Short path failed, file does not exist as specified.
23852     # Try adding .exe or .cmd
23853     if test -f "${new_path}.exe"; then
23854        input_to_shortpath="${new_path}.exe"
23855     elif test -f "${new_path}.cmd"; then
23856        input_to_shortpath="${new_path}.cmd"
23857     else
23858       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
23859 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
23860       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23861 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23862       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23863     fi
23864   else
23865     input_to_shortpath="$new_path"
23866   fi
23867 
23868   # Call helper function which possibly converts this using DOS-style short mode.
23869   # If so, the updated path is stored in $new_path.
23870   new_path="$input_to_shortpath"
23871 
23872   input_path="$input_to_shortpath"
23873   # Check if we need to convert this using DOS-style short mode. If the path
23874   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23875   # take no chances and rewrite it.
23876   # Note: m4 eats our [], so we need to use [ and ] instead.
23877   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23878   if test "x$has_forbidden_chars" != x; then
23879     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23880     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23881     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23882     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23883       # Going to short mode and back again did indeed matter. Since short mode is
23884       # case insensitive, let's make it lowercase to improve readability.
23885       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23886       # Now convert it back to Unix-stile (cygpath)
23887       input_path=`$CYGPATH -u "$shortmode_path"`
23888       new_path="$input_path"
23889     fi
23890   fi
23891 
23892   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23893   if test "x$test_cygdrive_prefix" = x; then
23894     # As a simple fix, exclude /usr/bin since it's not a real path.
23895     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23896       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23897       # a path prefixed by /cygdrive for fixpath to work.
23898       new_path="$CYGWIN_ROOT_PATH$input_path"
23899     fi
23900   fi
23901 
23902   # remove trailing .exe if any
23903   new_path="${new_path/%.exe/}"
23904 
23905   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23906 
23907   # First separate the path from the arguments. This will split at the first
23908   # space.
23909   complete="$DUMPBIN"
23910   path="${complete%% *}"
23911   tmp="$complete EOL"
23912   arguments="${tmp#* }"
23913 
23914   # Input might be given as Windows format, start by converting to
23915   # unix format.
23916   new_path="$path"
23917 
23918   windows_path="$new_path"
23919   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23920     unix_path=`$CYGPATH -u "$windows_path"`
23921     new_path="$unix_path"
23922   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23923     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23924     new_path="$unix_path"
23925   fi
23926 
23927 
23928   # Now try to locate executable using which
23929   new_path=`$WHICH "$new_path" 2> /dev/null`
23930 
23931   if test "x$new_path" = x; then
23932     # Oops. Which didn't find the executable.
23933     # The splitting of arguments from the executable at a space might have been incorrect,
23934     # since paths with space are more likely in Windows. Give it another try with the whole
23935     # argument.
23936     path="$complete"
23937     arguments="EOL"
23938     new_path="$path"
23939 
23940   windows_path="$new_path"
23941   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23942     unix_path=`$CYGPATH -u "$windows_path"`
23943     new_path="$unix_path"
23944   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23945     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23946     new_path="$unix_path"
23947   fi
23948 
23949 
23950     new_path=`$WHICH "$new_path" 2> /dev/null`
23951 
23952     if test "x$new_path" = x; then
23953       # It's still not found. Now this is an unrecoverable error.
23954       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23955 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23956       has_space=`$ECHO "$complete" | $GREP " "`
23957       if test "x$has_space" != x; then
23958         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23959 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23960       fi
23961       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23962     fi
23963   fi
23964 
23965   # Now new_path has a complete unix path to the binary
23966   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23967     # Keep paths in /bin as-is, but remove trailing .exe if any
23968     new_path="${new_path/%.exe/}"
23969     # Do not save /bin paths to all_fixpath_prefixes!
23970   else
23971     # Not in mixed or Windows style, start by that.
23972     new_path=`cmd //c echo $new_path`
23973 
23974   input_path="$new_path"
23975   # Check if we need to convert this using DOS-style short mode. If the path
23976   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23977   # take no chances and rewrite it.
23978   # Note: m4 eats our [], so we need to use [ and ] instead.
23979   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23980   if test "x$has_forbidden_chars" != x; then
23981     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23982     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23983   fi
23984 
23985     # Output is in $new_path
23986 
23987   windows_path="$new_path"
23988   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23989     unix_path=`$CYGPATH -u "$windows_path"`
23990     new_path="$unix_path"
23991   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23992     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23993     new_path="$unix_path"
23994   fi
23995 
23996     # remove trailing .exe if any
23997     new_path="${new_path/%.exe/}"
23998 
23999     # Save the first 10 bytes of this path to the storage, so fixpath can work.
24000     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24001   fi
24002 
24003   else
24004     # We're on a posix platform. Hooray! :)
24005     # First separate the path from the arguments. This will split at the first
24006     # space.
24007     complete="$DUMPBIN"
24008     path="${complete%% *}"
24009     tmp="$complete EOL"
24010     arguments="${tmp#* }"
24011 
24012     # Cannot rely on the command "which" here since it doesn't always work.
24013     is_absolute_path=`$ECHO "$path" | $GREP ^/`
24014     if test -z "$is_absolute_path"; then
24015       # Path to executable is not absolute. Find it.
24016       IFS_save="$IFS"
24017       IFS=:
24018       for p in $PATH; do
24019         if test -f "$p/$path" && test -x "$p/$path"; then
24020           new_path="$p/$path"
24021           break
24022         fi
24023       done
24024       IFS="$IFS_save"
24025     else
24026       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5
24027 $as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;}
24028       new_path="$path"
24029     fi
24030 
24031     if test "x$new_path" = x; then
24032         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24033 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24034         has_space=`$ECHO "$complete" | $GREP " "`
24035         if test "x$has_space" != x; then
24036           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24037 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24038         fi
24039         as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24040       fi
24041   fi
24042 
24043       # Now join together the path and the arguments once again
24044       if test "x$arguments" != xEOL; then
24045         new_complete="$new_path ${arguments% *}"
24046       else
24047         new_complete="$new_path"
24048       fi
24049 
24050   if test "x$complete" != "x$new_complete"; then
24051       DUMPBIN="$new_complete"
24052       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
24053 $as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
24054     fi
24055 
24056 
24057     COMPILER_TYPE=CL
24058     CCXXFLAGS="$CCXXFLAGS -nologo"
24059 
24060 fi
24061 
24062 
24063 
24064 ac_ext=c
24065 ac_cpp='$CPP $CPPFLAGS'
24066 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24067 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24068 ac_compiler_gnu=$ac_cv_c_compiler_gnu
24069 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
24070 $as_echo_n "checking how to run the C preprocessor... " >&6; }
24071 # On Suns, sometimes $CPP names a directory.
24072 if test -n "$CPP" && test -d "$CPP"; then
24073   CPP=
24074 fi
24075 if test -z "$CPP"; then
24076   if test "${ac_cv_prog_CPP+set}" = set; then :
24077   $as_echo_n "(cached) " >&6
24078 else
24079       # Double quotes because CPP needs to be expanded
24080     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
24081     do
24082       ac_preproc_ok=false
24083 for ac_c_preproc_warn_flag in '' yes
24084 do
24085   # Use a header file that comes with gcc, so configuring glibc
24086   # with a fresh cross-compiler works.
24087   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24088   # <limits.h> exists even on freestanding compilers.
24089   # On the NeXT, cc -E runs the code through the compiler's parser,
24090   # not just through cpp. "Syntax error" is here to catch this case.
24091   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24092 /* end confdefs.h.  */
24093 #ifdef __STDC__
24094 # include <limits.h>
24095 #else
24096 # include <assert.h>
24097 #endif
24098                      Syntax error
24099 _ACEOF
24100 if ac_fn_c_try_cpp "$LINENO"; then :
24101 
24102 else
24103   # Broken: fails on valid input.
24104 continue
24105 fi
24106 rm -f conftest.err conftest.i conftest.$ac_ext
24107 
24108   # OK, works on sane cases.  Now check whether nonexistent headers
24109   # can be detected and how.
24110   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24111 /* end confdefs.h.  */
24112 #include <ac_nonexistent.h>
24113 _ACEOF
24114 if ac_fn_c_try_cpp "$LINENO"; then :
24115   # Broken: success on invalid input.
24116 continue
24117 else
24118   # Passes both tests.
24119 ac_preproc_ok=:
24120 break
24121 fi
24122 rm -f conftest.err conftest.i conftest.$ac_ext
24123 
24124 done
24125 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24126 rm -f conftest.i conftest.err conftest.$ac_ext
24127 if $ac_preproc_ok; then :
24128   break
24129 fi
24130 
24131     done
24132     ac_cv_prog_CPP=$CPP
24133 
24134 fi
24135   CPP=$ac_cv_prog_CPP
24136 else
24137   ac_cv_prog_CPP=$CPP
24138 fi
24139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
24140 $as_echo "$CPP" >&6; }
24141 ac_preproc_ok=false
24142 for ac_c_preproc_warn_flag in '' yes
24143 do
24144   # Use a header file that comes with gcc, so configuring glibc
24145   # with a fresh cross-compiler works.
24146   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24147   # <limits.h> exists even on freestanding compilers.
24148   # On the NeXT, cc -E runs the code through the compiler's parser,
24149   # not just through cpp. "Syntax error" is here to catch this case.
24150   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24151 /* end confdefs.h.  */
24152 #ifdef __STDC__
24153 # include <limits.h>
24154 #else
24155 # include <assert.h>
24156 #endif
24157                      Syntax error
24158 _ACEOF
24159 if ac_fn_c_try_cpp "$LINENO"; then :
24160 
24161 else
24162   # Broken: fails on valid input.
24163 continue
24164 fi
24165 rm -f conftest.err conftest.i conftest.$ac_ext
24166 
24167   # OK, works on sane cases.  Now check whether nonexistent headers
24168   # can be detected and how.
24169   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24170 /* end confdefs.h.  */
24171 #include <ac_nonexistent.h>
24172 _ACEOF
24173 if ac_fn_c_try_cpp "$LINENO"; then :
24174   # Broken: success on invalid input.
24175 continue
24176 else
24177   # Passes both tests.
24178 ac_preproc_ok=:
24179 break
24180 fi
24181 rm -f conftest.err conftest.i conftest.$ac_ext
24182 
24183 done
24184 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24185 rm -f conftest.i conftest.err conftest.$ac_ext
24186 if $ac_preproc_ok; then :
24187 
24188 else
24189   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24190 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24191 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
24192 See \`config.log' for more details" "$LINENO" 5 ; }
24193 fi
24194 
24195 ac_ext=cpp
24196 ac_cpp='$CXXCPP $CPPFLAGS'
24197 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24198 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24199 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24200 
24201 
24202   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24203 
24204   # First separate the path from the arguments. This will split at the first
24205   # space.
24206   complete="$CPP"
24207   path="${complete%% *}"
24208   tmp="$complete EOL"
24209   arguments="${tmp#* }"
24210 
24211   # Input might be given as Windows format, start by converting to
24212   # unix format.
24213   new_path=`$CYGPATH -u "$path"`
24214 
24215   # Now try to locate executable using which
24216   new_path=`$WHICH "$new_path" 2> /dev/null`
24217   # bat and cmd files are not always considered executable in cygwin causing which
24218   # to not find them
24219   if test "x$new_path" = x \
24220            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24221            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24222     new_path=`$CYGPATH -u "$path"`
24223   fi
24224   if test "x$new_path" = x; then
24225     # Oops. Which didn't find the executable.
24226     # The splitting of arguments from the executable at a space might have been incorrect,
24227     # since paths with space are more likely in Windows. Give it another try with the whole
24228     # argument.
24229     path="$complete"
24230     arguments="EOL"
24231     new_path=`$CYGPATH -u "$path"`
24232     new_path=`$WHICH "$new_path" 2> /dev/null`
24233     # bat and cmd files are not always considered executable in cygwin causing which
24234     # to not find them
24235     if test "x$new_path" = x \
24236              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24237              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24238       new_path=`$CYGPATH -u "$path"`
24239     fi
24240     if test "x$new_path" = x; then
24241       # It's still not found. Now this is an unrecoverable error.
24242       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24243 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24244       has_space=`$ECHO "$complete" | $GREP " "`
24245       if test "x$has_space" != x; then
24246         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24247 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24248       fi
24249       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24250     fi
24251   fi
24252 
24253   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24254   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24255   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24256   # "foo.exe" is OK but "foo" is an error.
24257   #
24258   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24259   # It is also a way to make sure we got the proper file name for the real test later on.
24260   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24261   if test "x$test_shortpath" = x; then
24262     # Short path failed, file does not exist as specified.
24263     # Try adding .exe or .cmd
24264     if test -f "${new_path}.exe"; then
24265        input_to_shortpath="${new_path}.exe"
24266     elif test -f "${new_path}.cmd"; then
24267        input_to_shortpath="${new_path}.cmd"
24268     else
24269       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
24270 $as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
24271       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24272 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24273       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24274     fi
24275   else
24276     input_to_shortpath="$new_path"
24277   fi
24278 
24279   # Call helper function which possibly converts this using DOS-style short mode.
24280   # If so, the updated path is stored in $new_path.
24281   new_path="$input_to_shortpath"
24282 
24283   input_path="$input_to_shortpath"
24284   # Check if we need to convert this using DOS-style short mode. If the path
24285   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24286   # take no chances and rewrite it.
24287   # Note: m4 eats our [], so we need to use [ and ] instead.
24288   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24289   if test "x$has_forbidden_chars" != x; then
24290     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24291     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24292     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24293     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24294       # Going to short mode and back again did indeed matter. Since short mode is
24295       # case insensitive, let's make it lowercase to improve readability.
24296       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24297       # Now convert it back to Unix-stile (cygpath)
24298       input_path=`$CYGPATH -u "$shortmode_path"`
24299       new_path="$input_path"
24300     fi
24301   fi
24302 
24303   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24304   if test "x$test_cygdrive_prefix" = x; then
24305     # As a simple fix, exclude /usr/bin since it's not a real path.
24306     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24307       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24308       # a path prefixed by /cygdrive for fixpath to work.
24309       new_path="$CYGWIN_ROOT_PATH$input_path"
24310     fi
24311   fi
24312 
24313   # remove trailing .exe if any
24314   new_path="${new_path/%.exe/}"
24315 
24316   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24317 
24318   # First separate the path from the arguments. This will split at the first
24319   # space.
24320   complete="$CPP"
24321   path="${complete%% *}"
24322   tmp="$complete EOL"
24323   arguments="${tmp#* }"
24324 
24325   # Input might be given as Windows format, start by converting to
24326   # unix format.
24327   new_path="$path"
24328 
24329   windows_path="$new_path"
24330   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24331     unix_path=`$CYGPATH -u "$windows_path"`
24332     new_path="$unix_path"
24333   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24334     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24335     new_path="$unix_path"
24336   fi
24337 
24338 
24339   # Now try to locate executable using which
24340   new_path=`$WHICH "$new_path" 2> /dev/null`
24341 
24342   if test "x$new_path" = x; then
24343     # Oops. Which didn't find the executable.
24344     # The splitting of arguments from the executable at a space might have been incorrect,
24345     # since paths with space are more likely in Windows. Give it another try with the whole
24346     # argument.
24347     path="$complete"
24348     arguments="EOL"
24349     new_path="$path"
24350 
24351   windows_path="$new_path"
24352   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24353     unix_path=`$CYGPATH -u "$windows_path"`
24354     new_path="$unix_path"
24355   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24356     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24357     new_path="$unix_path"
24358   fi
24359 
24360 
24361     new_path=`$WHICH "$new_path" 2> /dev/null`
24362 
24363     if test "x$new_path" = x; then
24364       # It's still not found. Now this is an unrecoverable error.
24365       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24366 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24367       has_space=`$ECHO "$complete" | $GREP " "`
24368       if test "x$has_space" != x; then
24369         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24370 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24371       fi
24372       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24373     fi
24374   fi
24375 
24376   # Now new_path has a complete unix path to the binary
24377   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24378     # Keep paths in /bin as-is, but remove trailing .exe if any
24379     new_path="${new_path/%.exe/}"
24380     # Do not save /bin paths to all_fixpath_prefixes!
24381   else
24382     # Not in mixed or Windows style, start by that.
24383     new_path=`cmd //c echo $new_path`
24384 
24385   input_path="$new_path"
24386   # Check if we need to convert this using DOS-style short mode. If the path
24387   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24388   # take no chances and rewrite it.
24389   # Note: m4 eats our [], so we need to use [ and ] instead.
24390   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24391   if test "x$has_forbidden_chars" != x; then
24392     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24393     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24394   fi
24395 
24396     # Output is in $new_path
24397 
24398   windows_path="$new_path"
24399   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24400     unix_path=`$CYGPATH -u "$windows_path"`
24401     new_path="$unix_path"
24402   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24403     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24404     new_path="$unix_path"
24405   fi
24406 
24407     # remove trailing .exe if any
24408     new_path="${new_path/%.exe/}"
24409 
24410     # Save the first 10 bytes of this path to the storage, so fixpath can work.
24411     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24412   fi
24413 
24414   else
24415     # We're on a posix platform. Hooray! :)
24416     # First separate the path from the arguments. This will split at the first
24417     # space.
24418     complete="$CPP"
24419     path="${complete%% *}"
24420     tmp="$complete EOL"
24421     arguments="${tmp#* }"
24422 
24423     # Cannot rely on the command "which" here since it doesn't always work.
24424     is_absolute_path=`$ECHO "$path" | $GREP ^/`
24425     if test -z "$is_absolute_path"; then
24426       # Path to executable is not absolute. Find it.
24427       IFS_save="$IFS"
24428       IFS=:
24429       for p in $PATH; do
24430         if test -f "$p/$path" && test -x "$p/$path"; then
24431           new_path="$p/$path"
24432           break
24433         fi
24434       done
24435       IFS="$IFS_save"
24436     else
24437       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5
24438 $as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;}
24439       new_path="$path"
24440     fi
24441 
24442     if test "x$new_path" = x; then
24443         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24444 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24445         has_space=`$ECHO "$complete" | $GREP " "`
24446         if test "x$has_space" != x; then
24447           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24448 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24449         fi
24450         as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24451       fi
24452   fi
24453 
24454       # Now join together the path and the arguments once again
24455       if test "x$arguments" != xEOL; then
24456         new_complete="$new_path ${arguments% *}"
24457       else
24458         new_complete="$new_path"
24459       fi
24460 
24461   if test "x$complete" != "x$new_complete"; then
24462       CPP="$new_complete"
24463       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
24464 $as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
24465     fi
24466 
24467 
24468 ac_ext=cpp
24469 ac_cpp='$CXXCPP $CPPFLAGS'
24470 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24471 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24472 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
24474 $as_echo_n "checking how to run the C++ preprocessor... " >&6; }
24475 if test -z "$CXXCPP"; then
24476   if test "${ac_cv_prog_CXXCPP+set}" = set; then :
24477   $as_echo_n "(cached) " >&6
24478 else
24479       # Double quotes because CXXCPP needs to be expanded
24480     for CXXCPP in "$CXX -E" "/lib/cpp"
24481     do
24482       ac_preproc_ok=false
24483 for ac_cxx_preproc_warn_flag in '' yes
24484 do
24485   # Use a header file that comes with gcc, so configuring glibc
24486   # with a fresh cross-compiler works.
24487   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24488   # <limits.h> exists even on freestanding compilers.
24489   # On the NeXT, cc -E runs the code through the compiler's parser,
24490   # not just through cpp. "Syntax error" is here to catch this case.
24491   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24492 /* end confdefs.h.  */
24493 #ifdef __STDC__
24494 # include <limits.h>
24495 #else
24496 # include <assert.h>
24497 #endif
24498                      Syntax error
24499 _ACEOF
24500 if ac_fn_cxx_try_cpp "$LINENO"; then :
24501 
24502 else
24503   # Broken: fails on valid input.
24504 continue
24505 fi
24506 rm -f conftest.err conftest.i conftest.$ac_ext
24507 
24508   # OK, works on sane cases.  Now check whether nonexistent headers
24509   # can be detected and how.
24510   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24511 /* end confdefs.h.  */
24512 #include <ac_nonexistent.h>
24513 _ACEOF
24514 if ac_fn_cxx_try_cpp "$LINENO"; then :
24515   # Broken: success on invalid input.
24516 continue
24517 else
24518   # Passes both tests.
24519 ac_preproc_ok=:
24520 break
24521 fi
24522 rm -f conftest.err conftest.i conftest.$ac_ext
24523 
24524 done
24525 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24526 rm -f conftest.i conftest.err conftest.$ac_ext
24527 if $ac_preproc_ok; then :
24528   break
24529 fi
24530 
24531     done
24532     ac_cv_prog_CXXCPP=$CXXCPP
24533 
24534 fi
24535   CXXCPP=$ac_cv_prog_CXXCPP
24536 else
24537   ac_cv_prog_CXXCPP=$CXXCPP
24538 fi
24539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
24540 $as_echo "$CXXCPP" >&6; }
24541 ac_preproc_ok=false
24542 for ac_cxx_preproc_warn_flag in '' yes
24543 do
24544   # Use a header file that comes with gcc, so configuring glibc
24545   # with a fresh cross-compiler works.
24546   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24547   # <limits.h> exists even on freestanding compilers.
24548   # On the NeXT, cc -E runs the code through the compiler's parser,
24549   # not just through cpp. "Syntax error" is here to catch this case.
24550   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24551 /* end confdefs.h.  */
24552 #ifdef __STDC__
24553 # include <limits.h>
24554 #else
24555 # include <assert.h>
24556 #endif
24557                      Syntax error
24558 _ACEOF
24559 if ac_fn_cxx_try_cpp "$LINENO"; then :
24560 
24561 else
24562   # Broken: fails on valid input.
24563 continue
24564 fi
24565 rm -f conftest.err conftest.i conftest.$ac_ext
24566 
24567   # OK, works on sane cases.  Now check whether nonexistent headers
24568   # can be detected and how.
24569   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24570 /* end confdefs.h.  */
24571 #include <ac_nonexistent.h>
24572 _ACEOF
24573 if ac_fn_cxx_try_cpp "$LINENO"; then :
24574   # Broken: success on invalid input.
24575 continue
24576 else
24577   # Passes both tests.
24578 ac_preproc_ok=:
24579 break
24580 fi
24581 rm -f conftest.err conftest.i conftest.$ac_ext
24582 
24583 done
24584 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24585 rm -f conftest.i conftest.err conftest.$ac_ext
24586 if $ac_preproc_ok; then :
24587 
24588 else
24589   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24590 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24591 as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
24592 See \`config.log' for more details" "$LINENO" 5 ; }
24593 fi
24594 
24595 ac_ext=cpp
24596 ac_cpp='$CXXCPP $CPPFLAGS'
24597 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24598 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24599 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24600 
24601 
24602   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24603 
24604   # First separate the path from the arguments. This will split at the first
24605   # space.
24606   complete="$CXXCPP"
24607   path="${complete%% *}"
24608   tmp="$complete EOL"
24609   arguments="${tmp#* }"
24610 
24611   # Input might be given as Windows format, start by converting to
24612   # unix format.
24613   new_path=`$CYGPATH -u "$path"`
24614 
24615   # Now try to locate executable using which
24616   new_path=`$WHICH "$new_path" 2> /dev/null`
24617   # bat and cmd files are not always considered executable in cygwin causing which
24618   # to not find them
24619   if test "x$new_path" = x \
24620            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24621            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24622     new_path=`$CYGPATH -u "$path"`
24623   fi
24624   if test "x$new_path" = x; then
24625     # Oops. Which didn't find the executable.
24626     # The splitting of arguments from the executable at a space might have been incorrect,
24627     # since paths with space are more likely in Windows. Give it another try with the whole
24628     # argument.
24629     path="$complete"
24630     arguments="EOL"
24631     new_path=`$CYGPATH -u "$path"`
24632     new_path=`$WHICH "$new_path" 2> /dev/null`
24633     # bat and cmd files are not always considered executable in cygwin causing which
24634     # to not find them
24635     if test "x$new_path" = x \
24636              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24637              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24638       new_path=`$CYGPATH -u "$path"`
24639     fi
24640     if test "x$new_path" = x; then
24641       # It's still not found. Now this is an unrecoverable error.
24642       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24643 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24644       has_space=`$ECHO "$complete" | $GREP " "`
24645       if test "x$has_space" != x; then
24646         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24647 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24648       fi
24649       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24650     fi
24651   fi
24652 
24653   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24654   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24655   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24656   # "foo.exe" is OK but "foo" is an error.
24657   #
24658   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24659   # It is also a way to make sure we got the proper file name for the real test later on.
24660   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24661   if test "x$test_shortpath" = x; then
24662     # Short path failed, file does not exist as specified.
24663     # Try adding .exe or .cmd
24664     if test -f "${new_path}.exe"; then
24665        input_to_shortpath="${new_path}.exe"
24666     elif test -f "${new_path}.cmd"; then
24667        input_to_shortpath="${new_path}.cmd"
24668     else
24669       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
24670 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
24671       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24672 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24673       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24674     fi
24675   else
24676     input_to_shortpath="$new_path"
24677   fi
24678 
24679   # Call helper function which possibly converts this using DOS-style short mode.
24680   # If so, the updated path is stored in $new_path.
24681   new_path="$input_to_shortpath"
24682 
24683   input_path="$input_to_shortpath"
24684   # Check if we need to convert this using DOS-style short mode. If the path
24685   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24686   # take no chances and rewrite it.
24687   # Note: m4 eats our [], so we need to use [ and ] instead.
24688   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24689   if test "x$has_forbidden_chars" != x; then
24690     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24691     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24692     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24693     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24694       # Going to short mode and back again did indeed matter. Since short mode is
24695       # case insensitive, let's make it lowercase to improve readability.
24696       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24697       # Now convert it back to Unix-stile (cygpath)
24698       input_path=`$CYGPATH -u "$shortmode_path"`
24699       new_path="$input_path"
24700     fi
24701   fi
24702 
24703   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24704   if test "x$test_cygdrive_prefix" = x; then
24705     # As a simple fix, exclude /usr/bin since it's not a real path.
24706     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24707       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24708       # a path prefixed by /cygdrive for fixpath to work.
24709       new_path="$CYGWIN_ROOT_PATH$input_path"
24710     fi
24711   fi
24712 
24713   # remove trailing .exe if any
24714   new_path="${new_path/%.exe/}"
24715 
24716   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24717 
24718   # First separate the path from the arguments. This will split at the first
24719   # space.
24720   complete="$CXXCPP"
24721   path="${complete%% *}"
24722   tmp="$complete EOL"
24723   arguments="${tmp#* }"
24724 
24725   # Input might be given as Windows format, start by converting to
24726   # unix format.
24727   new_path="$path"
24728 
24729   windows_path="$new_path"
24730   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24731     unix_path=`$CYGPATH -u "$windows_path"`
24732     new_path="$unix_path"
24733   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24734     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24735     new_path="$unix_path"
24736   fi
24737 
24738 
24739   # Now try to locate executable using which
24740   new_path=`$WHICH "$new_path" 2> /dev/null`
24741 
24742   if test "x$new_path" = x; then
24743     # Oops. Which didn't find the executable.
24744     # The splitting of arguments from the executable at a space might have been incorrect,
24745     # since paths with space are more likely in Windows. Give it another try with the whole
24746     # argument.
24747     path="$complete"
24748     arguments="EOL"
24749     new_path="$path"
24750 
24751   windows_path="$new_path"
24752   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24753     unix_path=`$CYGPATH -u "$windows_path"`
24754     new_path="$unix_path"
24755   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24756     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24757     new_path="$unix_path"
24758   fi
24759 
24760 
24761     new_path=`$WHICH "$new_path" 2> /dev/null`
24762 
24763     if test "x$new_path" = x; then
24764       # It's still not found. Now this is an unrecoverable error.
24765       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24766 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24767       has_space=`$ECHO "$complete" | $GREP " "`
24768       if test "x$has_space" != x; then
24769         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24770 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24771       fi
24772       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24773     fi
24774   fi
24775 
24776   # Now new_path has a complete unix path to the binary
24777   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24778     # Keep paths in /bin as-is, but remove trailing .exe if any
24779     new_path="${new_path/%.exe/}"
24780     # Do not save /bin paths to all_fixpath_prefixes!
24781   else
24782     # Not in mixed or Windows style, start by that.
24783     new_path=`cmd //c echo $new_path`
24784 
24785   input_path="$new_path"
24786   # Check if we need to convert this using DOS-style short mode. If the path
24787   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24788   # take no chances and rewrite it.
24789   # Note: m4 eats our [], so we need to use [ and ] instead.
24790   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24791   if test "x$has_forbidden_chars" != x; then
24792     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24793     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24794   fi
24795 
24796     # Output is in $new_path
24797 
24798   windows_path="$new_path"
24799   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24800     unix_path=`$CYGPATH -u "$windows_path"`
24801     new_path="$unix_path"
24802   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24803     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24804     new_path="$unix_path"
24805   fi
24806 
24807     # remove trailing .exe if any
24808     new_path="${new_path/%.exe/}"
24809 
24810     # Save the first 10 bytes of this path to the storage, so fixpath can work.
24811     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24812   fi
24813 
24814   else
24815     # We're on a posix platform. Hooray! :)
24816     # First separate the path from the arguments. This will split at the first
24817     # space.
24818     complete="$CXXCPP"
24819     path="${complete%% *}"
24820     tmp="$complete EOL"
24821     arguments="${tmp#* }"
24822 
24823     # Cannot rely on the command "which" here since it doesn't always work.
24824     is_absolute_path=`$ECHO "$path" | $GREP ^/`
24825     if test -z "$is_absolute_path"; then
24826       # Path to executable is not absolute. Find it.
24827       IFS_save="$IFS"
24828       IFS=:
24829       for p in $PATH; do
24830         if test -f "$p/$path" && test -x "$p/$path"; then
24831           new_path="$p/$path"
24832           break
24833         fi
24834       done
24835       IFS="$IFS_save"
24836     else
24837       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5
24838 $as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;}
24839       new_path="$path"
24840     fi
24841 
24842     if test "x$new_path" = x; then
24843         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24844 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24845         has_space=`$ECHO "$complete" | $GREP " "`
24846         if test "x$has_space" != x; then
24847           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24848 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24849         fi
24850         as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24851       fi
24852   fi
24853 
24854       # Now join together the path and the arguments once again
24855       if test "x$arguments" != xEOL; then
24856         new_complete="$new_path ${arguments% *}"
24857       else
24858         new_complete="$new_path"
24859       fi
24860 
24861   if test "x$complete" != "x$new_complete"; then
24862       CXXCPP="$new_complete"
24863       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
24864 $as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
24865     fi
24866 
24867 
24868 if test "x$COMPILE_TYPE" != "xcross"; then
24869     # If we are not cross compiling, use the same compilers for
24870     # building the build platform executables. The cross-compilation
24871     # case needed to be done earlier, but this can only be done after
24872     # the native tools have been localized.
24873     BUILD_CC="$CC"
24874     BUILD_CXX="$CXX"
24875     BUILD_LD="$LD"
24876 fi
24877 
24878 # for solaris we really need solaris tools, and not gnu equivalent
24879 #   these seems to normally reside in /usr/ccs/bin so add that to path before
24880 #   starting to probe
24881 #
24882 #   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
24883 #         so that it can be overriden --with-tools-dir
24884 if test "x$OPENJDK_BUILD_OS" = xsolaris; then
24885     PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
24886 fi
24887 
24888 # Find the right assembler.
24889 if test "x$OPENJDK_TARGET_OS" = xsolaris; then
24890     # Extract the first word of "as", so it can be a program name with args.
24891 set dummy as; ac_word=$2
24892 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24893 $as_echo_n "checking for $ac_word... " >&6; }
24894 if test "${ac_cv_path_AS+set}" = set; then :
24895   $as_echo_n "(cached) " >&6
24896 else
24897   case $AS in
24898   [\\/]* | ?:[\\/]*)
24899   ac_cv_path_AS="$AS" # Let the user override the test with a path.
24900   ;;
24901   *)
24902   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24903 for as_dir in $PATH
24904 do
24905   IFS=$as_save_IFS
24906   test -z "$as_dir" && as_dir=.
24907     for ac_exec_ext in '' $ac_executable_extensions; do
24908   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24909     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
24910     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24911     break 2
24912   fi
24913 done
24914   done
24915 IFS=$as_save_IFS
24916 
24917   ;;
24918 esac
24919 fi
24920 AS=$ac_cv_path_AS
24921 if test -n "$AS"; then
24922   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
24923 $as_echo "$AS" >&6; }
24924 else
24925   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24926 $as_echo "no" >&6; }
24927 fi
24928 
24929 
24930 
24931   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24932 
24933   # First separate the path from the arguments. This will split at the first
24934   # space.
24935   complete="$AS"
24936   path="${complete%% *}"
24937   tmp="$complete EOL"
24938   arguments="${tmp#* }"
24939 
24940   # Input might be given as Windows format, start by converting to
24941   # unix format.
24942   new_path=`$CYGPATH -u "$path"`
24943 
24944   # Now try to locate executable using which
24945   new_path=`$WHICH "$new_path" 2> /dev/null`
24946   # bat and cmd files are not always considered executable in cygwin causing which
24947   # to not find them
24948   if test "x$new_path" = x \
24949            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24950            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24951     new_path=`$CYGPATH -u "$path"`
24952   fi
24953   if test "x$new_path" = x; then
24954     # Oops. Which didn't find the executable.
24955     # The splitting of arguments from the executable at a space might have been incorrect,
24956     # since paths with space are more likely in Windows. Give it another try with the whole
24957     # argument.
24958     path="$complete"
24959     arguments="EOL"
24960     new_path=`$CYGPATH -u "$path"`
24961     new_path=`$WHICH "$new_path" 2> /dev/null`
24962     # bat and cmd files are not always considered executable in cygwin causing which
24963     # to not find them
24964     if test "x$new_path" = x \
24965              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24966              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24967       new_path=`$CYGPATH -u "$path"`
24968     fi
24969     if test "x$new_path" = x; then
24970       # It's still not found. Now this is an unrecoverable error.
24971       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
24972 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24973       has_space=`$ECHO "$complete" | $GREP " "`
24974       if test "x$has_space" != x; then
24975         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24976 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24977       fi
24978       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24979     fi
24980   fi
24981 
24982   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24983   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24984   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24985   # "foo.exe" is OK but "foo" is an error.
24986   #
24987   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24988   # It is also a way to make sure we got the proper file name for the real test later on.
24989   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24990   if test "x$test_shortpath" = x; then
24991     # Short path failed, file does not exist as specified.
24992     # Try adding .exe or .cmd
24993     if test -f "${new_path}.exe"; then
24994        input_to_shortpath="${new_path}.exe"
24995     elif test -f "${new_path}.cmd"; then
24996        input_to_shortpath="${new_path}.cmd"
24997     else
24998       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
24999 $as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
25000       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25001 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25002       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25003     fi
25004   else
25005     input_to_shortpath="$new_path"
25006   fi
25007 
25008   # Call helper function which possibly converts this using DOS-style short mode.
25009   # If so, the updated path is stored in $new_path.
25010   new_path="$input_to_shortpath"
25011 
25012   input_path="$input_to_shortpath"
25013   # Check if we need to convert this using DOS-style short mode. If the path
25014   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25015   # take no chances and rewrite it.
25016   # Note: m4 eats our [], so we need to use [ and ] instead.
25017   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25018   if test "x$has_forbidden_chars" != x; then
25019     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25020     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25021     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25022     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25023       # Going to short mode and back again did indeed matter. Since short mode is
25024       # case insensitive, let's make it lowercase to improve readability.
25025       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25026       # Now convert it back to Unix-stile (cygpath)
25027       input_path=`$CYGPATH -u "$shortmode_path"`
25028       new_path="$input_path"
25029     fi
25030   fi
25031 
25032   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25033   if test "x$test_cygdrive_prefix" = x; then
25034     # As a simple fix, exclude /usr/bin since it's not a real path.
25035     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25036       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25037       # a path prefixed by /cygdrive for fixpath to work.
25038       new_path="$CYGWIN_ROOT_PATH$input_path"
25039     fi
25040   fi
25041 
25042   # remove trailing .exe if any
25043   new_path="${new_path/%.exe/}"
25044 
25045   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25046 
25047   # First separate the path from the arguments. This will split at the first
25048   # space.
25049   complete="$AS"
25050   path="${complete%% *}"
25051   tmp="$complete EOL"
25052   arguments="${tmp#* }"
25053 
25054   # Input might be given as Windows format, start by converting to
25055   # unix format.
25056   new_path="$path"
25057 
25058   windows_path="$new_path"
25059   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25060     unix_path=`$CYGPATH -u "$windows_path"`
25061     new_path="$unix_path"
25062   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25063     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25064     new_path="$unix_path"
25065   fi
25066 
25067 
25068   # Now try to locate executable using which
25069   new_path=`$WHICH "$new_path" 2> /dev/null`
25070 
25071   if test "x$new_path" = x; then
25072     # Oops. Which didn't find the executable.
25073     # The splitting of arguments from the executable at a space might have been incorrect,
25074     # since paths with space are more likely in Windows. Give it another try with the whole
25075     # argument.
25076     path="$complete"
25077     arguments="EOL"
25078     new_path="$path"
25079 
25080   windows_path="$new_path"
25081   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25082     unix_path=`$CYGPATH -u "$windows_path"`
25083     new_path="$unix_path"
25084   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25085     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25086     new_path="$unix_path"
25087   fi
25088 
25089 
25090     new_path=`$WHICH "$new_path" 2> /dev/null`
25091 
25092     if test "x$new_path" = x; then
25093       # It's still not found. Now this is an unrecoverable error.
25094       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25095 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25096       has_space=`$ECHO "$complete" | $GREP " "`
25097       if test "x$has_space" != x; then
25098         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25099 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25100       fi
25101       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25102     fi
25103   fi
25104 
25105   # Now new_path has a complete unix path to the binary
25106   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25107     # Keep paths in /bin as-is, but remove trailing .exe if any
25108     new_path="${new_path/%.exe/}"
25109     # Do not save /bin paths to all_fixpath_prefixes!
25110   else
25111     # Not in mixed or Windows style, start by that.
25112     new_path=`cmd //c echo $new_path`
25113 
25114   input_path="$new_path"
25115   # Check if we need to convert this using DOS-style short mode. If the path
25116   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25117   # take no chances and rewrite it.
25118   # Note: m4 eats our [], so we need to use [ and ] instead.
25119   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25120   if test "x$has_forbidden_chars" != x; then
25121     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25122     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25123   fi
25124 
25125     # Output is in $new_path
25126 
25127   windows_path="$new_path"
25128   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25129     unix_path=`$CYGPATH -u "$windows_path"`
25130     new_path="$unix_path"
25131   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25132     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25133     new_path="$unix_path"
25134   fi
25135 
25136     # remove trailing .exe if any
25137     new_path="${new_path/%.exe/}"
25138 
25139     # Save the first 10 bytes of this path to the storage, so fixpath can work.
25140     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25141   fi
25142 
25143   else
25144     # We're on a posix platform. Hooray! :)
25145     # First separate the path from the arguments. This will split at the first
25146     # space.
25147     complete="$AS"
25148     path="${complete%% *}"
25149     tmp="$complete EOL"
25150     arguments="${tmp#* }"
25151 
25152     # Cannot rely on the command "which" here since it doesn't always work.
25153     is_absolute_path=`$ECHO "$path" | $GREP ^/`
25154     if test -z "$is_absolute_path"; then
25155       # Path to executable is not absolute. Find it.
25156       IFS_save="$IFS"
25157       IFS=:
25158       for p in $PATH; do
25159         if test -f "$p/$path" && test -x "$p/$path"; then
25160           new_path="$p/$path"
25161           break
25162         fi
25163       done
25164       IFS="$IFS_save"
25165     else
25166       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5
25167 $as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;}
25168       new_path="$path"
25169     fi
25170 
25171     if test "x$new_path" = x; then
25172         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25173 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25174         has_space=`$ECHO "$complete" | $GREP " "`
25175         if test "x$has_space" != x; then
25176           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25177 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25178         fi
25179         as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25180       fi
25181   fi
25182 
25183       # Now join together the path and the arguments once again
25184       if test "x$arguments" != xEOL; then
25185         new_complete="$new_path ${arguments% *}"
25186       else
25187         new_complete="$new_path"
25188       fi
25189 
25190   if test "x$complete" != "x$new_complete"; then
25191       AS="$new_complete"
25192       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
25193 $as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
25194     fi
25195 
25196 else
25197     AS="$CC -c"
25198 fi
25199 
25200 
25201 if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25202     # Extract the first word of "nm", so it can be a program name with args.
25203 set dummy nm; ac_word=$2
25204 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25205 $as_echo_n "checking for $ac_word... " >&6; }
25206 if test "${ac_cv_path_NM+set}" = set; then :
25207   $as_echo_n "(cached) " >&6
25208 else
25209   case $NM in
25210   [\\/]* | ?:[\\/]*)
25211   ac_cv_path_NM="$NM" # Let the user override the test with a path.
25212   ;;
25213   *)
25214   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25215 for as_dir in $PATH
25216 do
25217   IFS=$as_save_IFS
25218   test -z "$as_dir" && as_dir=.
25219     for ac_exec_ext in '' $ac_executable_extensions; do
25220   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25221     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
25222     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25223     break 2
25224   fi
25225 done
25226   done
25227 IFS=$as_save_IFS
25228 
25229   ;;
25230 esac
25231 fi
25232 NM=$ac_cv_path_NM
25233 if test -n "$NM"; then
25234   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
25235 $as_echo "$NM" >&6; }
25236 else
25237   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25238 $as_echo "no" >&6; }
25239 fi
25240 
25241 
25242 
25243   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25244 
25245   # First separate the path from the arguments. This will split at the first
25246   # space.
25247   complete="$NM"
25248   path="${complete%% *}"
25249   tmp="$complete EOL"
25250   arguments="${tmp#* }"
25251 
25252   # Input might be given as Windows format, start by converting to
25253   # unix format.
25254   new_path=`$CYGPATH -u "$path"`
25255 
25256   # Now try to locate executable using which
25257   new_path=`$WHICH "$new_path" 2> /dev/null`
25258   # bat and cmd files are not always considered executable in cygwin causing which
25259   # to not find them
25260   if test "x$new_path" = x \
25261            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25262            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25263     new_path=`$CYGPATH -u "$path"`
25264   fi
25265   if test "x$new_path" = x; then
25266     # Oops. Which didn't find the executable.
25267     # The splitting of arguments from the executable at a space might have been incorrect,
25268     # since paths with space are more likely in Windows. Give it another try with the whole
25269     # argument.
25270     path="$complete"
25271     arguments="EOL"
25272     new_path=`$CYGPATH -u "$path"`
25273     new_path=`$WHICH "$new_path" 2> /dev/null`
25274     # bat and cmd files are not always considered executable in cygwin causing which
25275     # to not find them
25276     if test "x$new_path" = x \
25277              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25278              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25279       new_path=`$CYGPATH -u "$path"`
25280     fi
25281     if test "x$new_path" = x; then
25282       # It's still not found. Now this is an unrecoverable error.
25283       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25284 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25285       has_space=`$ECHO "$complete" | $GREP " "`
25286       if test "x$has_space" != x; then
25287         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25288 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25289       fi
25290       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25291     fi
25292   fi
25293 
25294   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25295   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25296   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25297   # "foo.exe" is OK but "foo" is an error.
25298   #
25299   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25300   # It is also a way to make sure we got the proper file name for the real test later on.
25301   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25302   if test "x$test_shortpath" = x; then
25303     # Short path failed, file does not exist as specified.
25304     # Try adding .exe or .cmd
25305     if test -f "${new_path}.exe"; then
25306        input_to_shortpath="${new_path}.exe"
25307     elif test -f "${new_path}.cmd"; then
25308        input_to_shortpath="${new_path}.cmd"
25309     else
25310       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
25311 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
25312       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25313 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25314       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25315     fi
25316   else
25317     input_to_shortpath="$new_path"
25318   fi
25319 
25320   # Call helper function which possibly converts this using DOS-style short mode.
25321   # If so, the updated path is stored in $new_path.
25322   new_path="$input_to_shortpath"
25323 
25324   input_path="$input_to_shortpath"
25325   # Check if we need to convert this using DOS-style short mode. If the path
25326   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25327   # take no chances and rewrite it.
25328   # Note: m4 eats our [], so we need to use [ and ] instead.
25329   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25330   if test "x$has_forbidden_chars" != x; then
25331     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25332     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25333     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25334     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25335       # Going to short mode and back again did indeed matter. Since short mode is
25336       # case insensitive, let's make it lowercase to improve readability.
25337       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25338       # Now convert it back to Unix-stile (cygpath)
25339       input_path=`$CYGPATH -u "$shortmode_path"`
25340       new_path="$input_path"
25341     fi
25342   fi
25343 
25344   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25345   if test "x$test_cygdrive_prefix" = x; then
25346     # As a simple fix, exclude /usr/bin since it's not a real path.
25347     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25348       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25349       # a path prefixed by /cygdrive for fixpath to work.
25350       new_path="$CYGWIN_ROOT_PATH$input_path"
25351     fi
25352   fi
25353 
25354   # remove trailing .exe if any
25355   new_path="${new_path/%.exe/}"
25356 
25357   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25358 
25359   # First separate the path from the arguments. This will split at the first
25360   # space.
25361   complete="$NM"
25362   path="${complete%% *}"
25363   tmp="$complete EOL"
25364   arguments="${tmp#* }"
25365 
25366   # Input might be given as Windows format, start by converting to
25367   # unix format.
25368   new_path="$path"
25369 
25370   windows_path="$new_path"
25371   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25372     unix_path=`$CYGPATH -u "$windows_path"`
25373     new_path="$unix_path"
25374   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25375     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25376     new_path="$unix_path"
25377   fi
25378 
25379 
25380   # Now try to locate executable using which
25381   new_path=`$WHICH "$new_path" 2> /dev/null`
25382 
25383   if test "x$new_path" = x; then
25384     # Oops. Which didn't find the executable.
25385     # The splitting of arguments from the executable at a space might have been incorrect,
25386     # since paths with space are more likely in Windows. Give it another try with the whole
25387     # argument.
25388     path="$complete"
25389     arguments="EOL"
25390     new_path="$path"
25391 
25392   windows_path="$new_path"
25393   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25394     unix_path=`$CYGPATH -u "$windows_path"`
25395     new_path="$unix_path"
25396   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25397     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25398     new_path="$unix_path"
25399   fi
25400 
25401 
25402     new_path=`$WHICH "$new_path" 2> /dev/null`
25403 
25404     if test "x$new_path" = x; then
25405       # It's still not found. Now this is an unrecoverable error.
25406       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25407 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25408       has_space=`$ECHO "$complete" | $GREP " "`
25409       if test "x$has_space" != x; then
25410         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25411 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25412       fi
25413       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25414     fi
25415   fi
25416 
25417   # Now new_path has a complete unix path to the binary
25418   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25419     # Keep paths in /bin as-is, but remove trailing .exe if any
25420     new_path="${new_path/%.exe/}"
25421     # Do not save /bin paths to all_fixpath_prefixes!
25422   else
25423     # Not in mixed or Windows style, start by that.
25424     new_path=`cmd //c echo $new_path`
25425 
25426   input_path="$new_path"
25427   # Check if we need to convert this using DOS-style short mode. If the path
25428   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25429   # take no chances and rewrite it.
25430   # Note: m4 eats our [], so we need to use [ and ] instead.
25431   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25432   if test "x$has_forbidden_chars" != x; then
25433     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25434     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25435   fi
25436 
25437     # Output is in $new_path
25438 
25439   windows_path="$new_path"
25440   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25441     unix_path=`$CYGPATH -u "$windows_path"`
25442     new_path="$unix_path"
25443   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25444     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25445     new_path="$unix_path"
25446   fi
25447 
25448     # remove trailing .exe if any
25449     new_path="${new_path/%.exe/}"
25450 
25451     # Save the first 10 bytes of this path to the storage, so fixpath can work.
25452     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25453   fi
25454 
25455   else
25456     # We're on a posix platform. Hooray! :)
25457     # First separate the path from the arguments. This will split at the first
25458     # space.
25459     complete="$NM"
25460     path="${complete%% *}"
25461     tmp="$complete EOL"
25462     arguments="${tmp#* }"
25463 
25464     # Cannot rely on the command "which" here since it doesn't always work.
25465     is_absolute_path=`$ECHO "$path" | $GREP ^/`
25466     if test -z "$is_absolute_path"; then
25467       # Path to executable is not absolute. Find it.
25468       IFS_save="$IFS"
25469       IFS=:
25470       for p in $PATH; do
25471         if test -f "$p/$path" && test -x "$p/$path"; then
25472           new_path="$p/$path"
25473           break
25474         fi
25475       done
25476       IFS="$IFS_save"
25477     else
25478       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
25479 $as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
25480       new_path="$path"
25481     fi
25482 
25483     if test "x$new_path" = x; then
25484         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25485 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25486         has_space=`$ECHO "$complete" | $GREP " "`
25487         if test "x$has_space" != x; then
25488           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25489 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25490         fi
25491         as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25492       fi
25493   fi
25494 
25495       # Now join together the path and the arguments once again
25496       if test "x$arguments" != xEOL; then
25497         new_complete="$new_path ${arguments% *}"
25498       else
25499         new_complete="$new_path"
25500       fi
25501 
25502   if test "x$complete" != "x$new_complete"; then
25503       NM="$new_complete"
25504       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
25505 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
25506     fi
25507 
25508     # Extract the first word of "gnm", so it can be a program name with args.
25509 set dummy gnm; ac_word=$2
25510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25511 $as_echo_n "checking for $ac_word... " >&6; }
25512 if test "${ac_cv_path_GNM+set}" = set; then :
25513   $as_echo_n "(cached) " >&6
25514 else
25515   case $GNM in
25516   [\\/]* | ?:[\\/]*)
25517   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
25518   ;;
25519   *)
25520   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25521 for as_dir in $PATH
25522 do
25523   IFS=$as_save_IFS
25524   test -z "$as_dir" && as_dir=.
25525     for ac_exec_ext in '' $ac_executable_extensions; do
25526   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25527     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
25528     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25529     break 2
25530   fi
25531 done
25532   done
25533 IFS=$as_save_IFS
25534 
25535   ;;
25536 esac
25537 fi
25538 GNM=$ac_cv_path_GNM
25539 if test -n "$GNM"; then
25540   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
25541 $as_echo "$GNM" >&6; }
25542 else
25543   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25544 $as_echo "no" >&6; }
25545 fi
25546 
25547 
25548 
25549   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25550 
25551   # First separate the path from the arguments. This will split at the first
25552   # space.
25553   complete="$GNM"
25554   path="${complete%% *}"
25555   tmp="$complete EOL"
25556   arguments="${tmp#* }"
25557 
25558   # Input might be given as Windows format, start by converting to
25559   # unix format.
25560   new_path=`$CYGPATH -u "$path"`
25561 
25562   # Now try to locate executable using which
25563   new_path=`$WHICH "$new_path" 2> /dev/null`
25564   # bat and cmd files are not always considered executable in cygwin causing which
25565   # to not find them
25566   if test "x$new_path" = x \
25567            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25568            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25569     new_path=`$CYGPATH -u "$path"`
25570   fi
25571   if test "x$new_path" = x; then
25572     # Oops. Which didn't find the executable.
25573     # The splitting of arguments from the executable at a space might have been incorrect,
25574     # since paths with space are more likely in Windows. Give it another try with the whole
25575     # argument.
25576     path="$complete"
25577     arguments="EOL"
25578     new_path=`$CYGPATH -u "$path"`
25579     new_path=`$WHICH "$new_path" 2> /dev/null`
25580     # bat and cmd files are not always considered executable in cygwin causing which
25581     # to not find them
25582     if test "x$new_path" = x \
25583              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25584              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25585       new_path=`$CYGPATH -u "$path"`
25586     fi
25587     if test "x$new_path" = x; then
25588       # It's still not found. Now this is an unrecoverable error.
25589       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
25590 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
25591       has_space=`$ECHO "$complete" | $GREP " "`
25592       if test "x$has_space" != x; then
25593         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25594 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25595       fi
25596       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
25597     fi
25598   fi
25599 
25600   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25601   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25602   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25603   # "foo.exe" is OK but "foo" is an error.
25604   #
25605   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25606   # It is also a way to make sure we got the proper file name for the real test later on.
25607   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25608   if test "x$test_shortpath" = x; then
25609     # Short path failed, file does not exist as specified.
25610     # Try adding .exe or .cmd
25611     if test -f "${new_path}.exe"; then
25612        input_to_shortpath="${new_path}.exe"
25613     elif test -f "${new_path}.cmd"; then
25614        input_to_shortpath="${new_path}.cmd"
25615     else
25616       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
25617 $as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
25618       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25619 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25620       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
25621     fi
25622   else
25623     input_to_shortpath="$new_path"
25624   fi
25625 
25626   # Call helper function which possibly converts this using DOS-style short mode.
25627   # If so, the updated path is stored in $new_path.
25628   new_path="$input_to_shortpath"
25629 
25630   input_path="$input_to_shortpath"
25631   # Check if we need to convert this using DOS-style short mode. If the path
25632   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25633   # take no chances and rewrite it.
25634   # Note: m4 eats our [], so we need to use [ and ] instead.
25635   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25636   if test "x$has_forbidden_chars" != x; then
25637     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25638     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25639     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25640     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25641       # Going to short mode and back again did indeed matter. Since short mode is
25642       # case insensitive, let's make it lowercase to improve readability.
25643       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25644       # Now convert it back to Unix-stile (cygpath)
25645       input_path=`$CYGPATH -u "$shortmode_path"`
25646       new_path="$input_path"
25647     fi
25648   fi
25649 
25650   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25651   if test "x$test_cygdrive_prefix" = x; then
25652     # As a simple fix, exclude /usr/bin since it's not a real path.
25653     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25654       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25655       # a path prefixed by /cygdrive for fixpath to work.
25656       new_path="$CYGWIN_ROOT_PATH$input_path"
25657     fi
25658   fi
25659 
25660   # remove trailing .exe if any
25661   new_path="${new_path/%.exe/}"
25662 
25663   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25664 
25665   # First separate the path from the arguments. This will split at the first
25666   # space.
25667   complete="$GNM"
25668   path="${complete%% *}"
25669   tmp="$complete EOL"
25670   arguments="${tmp#* }"
25671 
25672   # Input might be given as Windows format, start by converting to
25673   # unix format.
25674   new_path="$path"
25675 
25676   windows_path="$new_path"
25677   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25678     unix_path=`$CYGPATH -u "$windows_path"`
25679     new_path="$unix_path"
25680   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25681     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25682     new_path="$unix_path"
25683   fi
25684 
25685 
25686   # Now try to locate executable using which
25687   new_path=`$WHICH "$new_path" 2> /dev/null`
25688 
25689   if test "x$new_path" = x; then
25690     # Oops. Which didn't find the executable.
25691     # The splitting of arguments from the executable at a space might have been incorrect,
25692     # since paths with space are more likely in Windows. Give it another try with the whole
25693     # argument.
25694     path="$complete"
25695     arguments="EOL"
25696     new_path="$path"
25697 
25698   windows_path="$new_path"
25699   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25700     unix_path=`$CYGPATH -u "$windows_path"`
25701     new_path="$unix_path"
25702   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25703     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25704     new_path="$unix_path"
25705   fi
25706 
25707 
25708     new_path=`$WHICH "$new_path" 2> /dev/null`
25709 
25710     if test "x$new_path" = x; then
25711       # It's still not found. Now this is an unrecoverable error.
25712       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
25713 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
25714       has_space=`$ECHO "$complete" | $GREP " "`
25715       if test "x$has_space" != x; then
25716         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25717 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25718       fi
25719       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
25720     fi
25721   fi
25722 
25723   # Now new_path has a complete unix path to the binary
25724   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25725     # Keep paths in /bin as-is, but remove trailing .exe if any
25726     new_path="${new_path/%.exe/}"
25727     # Do not save /bin paths to all_fixpath_prefixes!
25728   else
25729     # Not in mixed or Windows style, start by that.
25730     new_path=`cmd //c echo $new_path`
25731 
25732   input_path="$new_path"
25733   # Check if we need to convert this using DOS-style short mode. If the path
25734   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25735   # take no chances and rewrite it.
25736   # Note: m4 eats our [], so we need to use [ and ] instead.
25737   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25738   if test "x$has_forbidden_chars" != x; then
25739     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25740     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25741   fi
25742 
25743     # Output is in $new_path
25744 
25745   windows_path="$new_path"
25746   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25747     unix_path=`$CYGPATH -u "$windows_path"`
25748     new_path="$unix_path"
25749   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25750     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25751     new_path="$unix_path"
25752   fi
25753 
25754     # remove trailing .exe if any
25755     new_path="${new_path/%.exe/}"
25756 
25757     # Save the first 10 bytes of this path to the storage, so fixpath can work.
25758     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25759   fi
25760 
25761   else
25762     # We're on a posix platform. Hooray! :)
25763     # First separate the path from the arguments. This will split at the first
25764     # space.
25765     complete="$GNM"
25766     path="${complete%% *}"
25767     tmp="$complete EOL"
25768     arguments="${tmp#* }"
25769 
25770     # Cannot rely on the command "which" here since it doesn't always work.
25771     is_absolute_path=`$ECHO "$path" | $GREP ^/`
25772     if test -z "$is_absolute_path"; then
25773       # Path to executable is not absolute. Find it.
25774       IFS_save="$IFS"
25775       IFS=:
25776       for p in $PATH; do
25777         if test -f "$p/$path" && test -x "$p/$path"; then
25778           new_path="$p/$path"
25779           break
25780         fi
25781       done
25782       IFS="$IFS_save"
25783     else
25784       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving GNM (as $path) failed, using $path directly." >&5
25785 $as_echo "$as_me: Resolving GNM (as $path) failed, using $path directly." >&6;}
25786       new_path="$path"
25787     fi
25788 
25789     if test "x$new_path" = x; then
25790         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
25791 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
25792         has_space=`$ECHO "$complete" | $GREP " "`
25793         if test "x$has_space" != x; then
25794           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25795 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25796         fi
25797         as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
25798       fi
25799   fi
25800 
25801       # Now join together the path and the arguments once again
25802       if test "x$arguments" != xEOL; then
25803         new_complete="$new_path ${arguments% *}"
25804       else
25805         new_complete="$new_path"
25806       fi
25807 
25808   if test "x$complete" != "x$new_complete"; then
25809       GNM="$new_complete"
25810       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
25811 $as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
25812     fi
25813 
25814     # Extract the first word of "strip", so it can be a program name with args.
25815 set dummy strip; ac_word=$2
25816 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25817 $as_echo_n "checking for $ac_word... " >&6; }
25818 if test "${ac_cv_path_STRIP+set}" = set; then :
25819   $as_echo_n "(cached) " >&6
25820 else
25821   case $STRIP in
25822   [\\/]* | ?:[\\/]*)
25823   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
25824   ;;
25825   *)
25826   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25827 for as_dir in $PATH
25828 do
25829   IFS=$as_save_IFS
25830   test -z "$as_dir" && as_dir=.
25831     for ac_exec_ext in '' $ac_executable_extensions; do
25832   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25833     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
25834     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25835     break 2
25836   fi
25837 done
25838   done
25839 IFS=$as_save_IFS
25840 
25841   ;;
25842 esac
25843 fi
25844 STRIP=$ac_cv_path_STRIP
25845 if test -n "$STRIP"; then
25846   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
25847 $as_echo "$STRIP" >&6; }
25848 else
25849   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25850 $as_echo "no" >&6; }
25851 fi
25852 
25853 
25854 
25855   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25856 
25857   # First separate the path from the arguments. This will split at the first
25858   # space.
25859   complete="$STRIP"
25860   path="${complete%% *}"
25861   tmp="$complete EOL"
25862   arguments="${tmp#* }"
25863 
25864   # Input might be given as Windows format, start by converting to
25865   # unix format.
25866   new_path=`$CYGPATH -u "$path"`
25867 
25868   # Now try to locate executable using which
25869   new_path=`$WHICH "$new_path" 2> /dev/null`
25870   # bat and cmd files are not always considered executable in cygwin causing which
25871   # to not find them
25872   if test "x$new_path" = x \
25873            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25874            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25875     new_path=`$CYGPATH -u "$path"`
25876   fi
25877   if test "x$new_path" = x; then
25878     # Oops. Which didn't find the executable.
25879     # The splitting of arguments from the executable at a space might have been incorrect,
25880     # since paths with space are more likely in Windows. Give it another try with the whole
25881     # argument.
25882     path="$complete"
25883     arguments="EOL"
25884     new_path=`$CYGPATH -u "$path"`
25885     new_path=`$WHICH "$new_path" 2> /dev/null`
25886     # bat and cmd files are not always considered executable in cygwin causing which
25887     # to not find them
25888     if test "x$new_path" = x \
25889              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25890              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25891       new_path=`$CYGPATH -u "$path"`
25892     fi
25893     if test "x$new_path" = x; then
25894       # It's still not found. Now this is an unrecoverable error.
25895       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25896 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25897       has_space=`$ECHO "$complete" | $GREP " "`
25898       if test "x$has_space" != x; then
25899         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25900 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25901       fi
25902       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25903     fi
25904   fi
25905 
25906   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25907   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25908   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25909   # "foo.exe" is OK but "foo" is an error.
25910   #
25911   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25912   # It is also a way to make sure we got the proper file name for the real test later on.
25913   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25914   if test "x$test_shortpath" = x; then
25915     # Short path failed, file does not exist as specified.
25916     # Try adding .exe or .cmd
25917     if test -f "${new_path}.exe"; then
25918        input_to_shortpath="${new_path}.exe"
25919     elif test -f "${new_path}.cmd"; then
25920        input_to_shortpath="${new_path}.cmd"
25921     else
25922       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
25923 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
25924       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25925 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25926       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25927     fi
25928   else
25929     input_to_shortpath="$new_path"
25930   fi
25931 
25932   # Call helper function which possibly converts this using DOS-style short mode.
25933   # If so, the updated path is stored in $new_path.
25934   new_path="$input_to_shortpath"
25935 
25936   input_path="$input_to_shortpath"
25937   # Check if we need to convert this using DOS-style short mode. If the path
25938   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25939   # take no chances and rewrite it.
25940   # Note: m4 eats our [], so we need to use [ and ] instead.
25941   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25942   if test "x$has_forbidden_chars" != x; then
25943     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25944     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25945     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25946     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25947       # Going to short mode and back again did indeed matter. Since short mode is
25948       # case insensitive, let's make it lowercase to improve readability.
25949       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25950       # Now convert it back to Unix-stile (cygpath)
25951       input_path=`$CYGPATH -u "$shortmode_path"`
25952       new_path="$input_path"
25953     fi
25954   fi
25955 
25956   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25957   if test "x$test_cygdrive_prefix" = x; then
25958     # As a simple fix, exclude /usr/bin since it's not a real path.
25959     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25960       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25961       # a path prefixed by /cygdrive for fixpath to work.
25962       new_path="$CYGWIN_ROOT_PATH$input_path"
25963     fi
25964   fi
25965 
25966   # remove trailing .exe if any
25967   new_path="${new_path/%.exe/}"
25968 
25969   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25970 
25971   # First separate the path from the arguments. This will split at the first
25972   # space.
25973   complete="$STRIP"
25974   path="${complete%% *}"
25975   tmp="$complete EOL"
25976   arguments="${tmp#* }"
25977 
25978   # Input might be given as Windows format, start by converting to
25979   # unix format.
25980   new_path="$path"
25981 
25982   windows_path="$new_path"
25983   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25984     unix_path=`$CYGPATH -u "$windows_path"`
25985     new_path="$unix_path"
25986   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25987     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25988     new_path="$unix_path"
25989   fi
25990 
25991 
25992   # Now try to locate executable using which
25993   new_path=`$WHICH "$new_path" 2> /dev/null`
25994 
25995   if test "x$new_path" = x; then
25996     # Oops. Which didn't find the executable.
25997     # The splitting of arguments from the executable at a space might have been incorrect,
25998     # since paths with space are more likely in Windows. Give it another try with the whole
25999     # argument.
26000     path="$complete"
26001     arguments="EOL"
26002     new_path="$path"
26003 
26004   windows_path="$new_path"
26005   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26006     unix_path=`$CYGPATH -u "$windows_path"`
26007     new_path="$unix_path"
26008   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26009     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26010     new_path="$unix_path"
26011   fi
26012 
26013 
26014     new_path=`$WHICH "$new_path" 2> /dev/null`
26015 
26016     if test "x$new_path" = x; then
26017       # It's still not found. Now this is an unrecoverable error.
26018       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26019 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26020       has_space=`$ECHO "$complete" | $GREP " "`
26021       if test "x$has_space" != x; then
26022         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26023 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26024       fi
26025       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26026     fi
26027   fi
26028 
26029   # Now new_path has a complete unix path to the binary
26030   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26031     # Keep paths in /bin as-is, but remove trailing .exe if any
26032     new_path="${new_path/%.exe/}"
26033     # Do not save /bin paths to all_fixpath_prefixes!
26034   else
26035     # Not in mixed or Windows style, start by that.
26036     new_path=`cmd //c echo $new_path`
26037 
26038   input_path="$new_path"
26039   # Check if we need to convert this using DOS-style short mode. If the path
26040   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26041   # take no chances and rewrite it.
26042   # Note: m4 eats our [], so we need to use [ and ] instead.
26043   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26044   if test "x$has_forbidden_chars" != x; then
26045     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26046     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26047   fi
26048 
26049     # Output is in $new_path
26050 
26051   windows_path="$new_path"
26052   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26053     unix_path=`$CYGPATH -u "$windows_path"`
26054     new_path="$unix_path"
26055   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26056     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26057     new_path="$unix_path"
26058   fi
26059 
26060     # remove trailing .exe if any
26061     new_path="${new_path/%.exe/}"
26062 
26063     # Save the first 10 bytes of this path to the storage, so fixpath can work.
26064     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26065   fi
26066 
26067   else
26068     # We're on a posix platform. Hooray! :)
26069     # First separate the path from the arguments. This will split at the first
26070     # space.
26071     complete="$STRIP"
26072     path="${complete%% *}"
26073     tmp="$complete EOL"
26074     arguments="${tmp#* }"
26075 
26076     # Cannot rely on the command "which" here since it doesn't always work.
26077     is_absolute_path=`$ECHO "$path" | $GREP ^/`
26078     if test -z "$is_absolute_path"; then
26079       # Path to executable is not absolute. Find it.
26080       IFS_save="$IFS"
26081       IFS=:
26082       for p in $PATH; do
26083         if test -f "$p/$path" && test -x "$p/$path"; then
26084           new_path="$p/$path"
26085           break
26086         fi
26087       done
26088       IFS="$IFS_save"
26089     else
26090       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
26091 $as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
26092       new_path="$path"
26093     fi
26094 
26095     if test "x$new_path" = x; then
26096         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26097 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26098         has_space=`$ECHO "$complete" | $GREP " "`
26099         if test "x$has_space" != x; then
26100           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26101 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26102         fi
26103         as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26104       fi
26105   fi
26106 
26107       # Now join together the path and the arguments once again
26108       if test "x$arguments" != xEOL; then
26109         new_complete="$new_path ${arguments% *}"
26110       else
26111         new_complete="$new_path"
26112       fi
26113 
26114   if test "x$complete" != "x$new_complete"; then
26115       STRIP="$new_complete"
26116       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
26117 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
26118     fi
26119 
26120     # Extract the first word of "mcs", so it can be a program name with args.
26121 set dummy mcs; ac_word=$2
26122 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26123 $as_echo_n "checking for $ac_word... " >&6; }
26124 if test "${ac_cv_path_MCS+set}" = set; then :
26125   $as_echo_n "(cached) " >&6
26126 else
26127   case $MCS in
26128   [\\/]* | ?:[\\/]*)
26129   ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
26130   ;;
26131   *)
26132   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26133 for as_dir in $PATH
26134 do
26135   IFS=$as_save_IFS
26136   test -z "$as_dir" && as_dir=.
26137     for ac_exec_ext in '' $ac_executable_extensions; do
26138   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26139     ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
26140     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26141     break 2
26142   fi
26143 done
26144   done
26145 IFS=$as_save_IFS
26146 
26147   ;;
26148 esac
26149 fi
26150 MCS=$ac_cv_path_MCS
26151 if test -n "$MCS"; then
26152   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
26153 $as_echo "$MCS" >&6; }
26154 else
26155   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26156 $as_echo "no" >&6; }
26157 fi
26158 
26159 
26160 
26161   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26162 
26163   # First separate the path from the arguments. This will split at the first
26164   # space.
26165   complete="$MCS"
26166   path="${complete%% *}"
26167   tmp="$complete EOL"
26168   arguments="${tmp#* }"
26169 
26170   # Input might be given as Windows format, start by converting to
26171   # unix format.
26172   new_path=`$CYGPATH -u "$path"`
26173 
26174   # Now try to locate executable using which
26175   new_path=`$WHICH "$new_path" 2> /dev/null`
26176   # bat and cmd files are not always considered executable in cygwin causing which
26177   # to not find them
26178   if test "x$new_path" = x \
26179            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26180            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26181     new_path=`$CYGPATH -u "$path"`
26182   fi
26183   if test "x$new_path" = x; then
26184     # Oops. Which didn't find the executable.
26185     # The splitting of arguments from the executable at a space might have been incorrect,
26186     # since paths with space are more likely in Windows. Give it another try with the whole
26187     # argument.
26188     path="$complete"
26189     arguments="EOL"
26190     new_path=`$CYGPATH -u "$path"`
26191     new_path=`$WHICH "$new_path" 2> /dev/null`
26192     # bat and cmd files are not always considered executable in cygwin causing which
26193     # to not find them
26194     if test "x$new_path" = x \
26195              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26196              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26197       new_path=`$CYGPATH -u "$path"`
26198     fi
26199     if test "x$new_path" = x; then
26200       # It's still not found. Now this is an unrecoverable error.
26201       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26202 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26203       has_space=`$ECHO "$complete" | $GREP " "`
26204       if test "x$has_space" != x; then
26205         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26206 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26207       fi
26208       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26209     fi
26210   fi
26211 
26212   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26213   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26214   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26215   # "foo.exe" is OK but "foo" is an error.
26216   #
26217   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26218   # It is also a way to make sure we got the proper file name for the real test later on.
26219   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26220   if test "x$test_shortpath" = x; then
26221     # Short path failed, file does not exist as specified.
26222     # Try adding .exe or .cmd
26223     if test -f "${new_path}.exe"; then
26224        input_to_shortpath="${new_path}.exe"
26225     elif test -f "${new_path}.cmd"; then
26226        input_to_shortpath="${new_path}.cmd"
26227     else
26228       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
26229 $as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
26230       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26231 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26232       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26233     fi
26234   else
26235     input_to_shortpath="$new_path"
26236   fi
26237 
26238   # Call helper function which possibly converts this using DOS-style short mode.
26239   # If so, the updated path is stored in $new_path.
26240   new_path="$input_to_shortpath"
26241 
26242   input_path="$input_to_shortpath"
26243   # Check if we need to convert this using DOS-style short mode. If the path
26244   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26245   # take no chances and rewrite it.
26246   # Note: m4 eats our [], so we need to use [ and ] instead.
26247   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26248   if test "x$has_forbidden_chars" != x; then
26249     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26250     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26251     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26252     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26253       # Going to short mode and back again did indeed matter. Since short mode is
26254       # case insensitive, let's make it lowercase to improve readability.
26255       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26256       # Now convert it back to Unix-stile (cygpath)
26257       input_path=`$CYGPATH -u "$shortmode_path"`
26258       new_path="$input_path"
26259     fi
26260   fi
26261 
26262   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26263   if test "x$test_cygdrive_prefix" = x; then
26264     # As a simple fix, exclude /usr/bin since it's not a real path.
26265     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26266       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26267       # a path prefixed by /cygdrive for fixpath to work.
26268       new_path="$CYGWIN_ROOT_PATH$input_path"
26269     fi
26270   fi
26271 
26272   # remove trailing .exe if any
26273   new_path="${new_path/%.exe/}"
26274 
26275   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26276 
26277   # First separate the path from the arguments. This will split at the first
26278   # space.
26279   complete="$MCS"
26280   path="${complete%% *}"
26281   tmp="$complete EOL"
26282   arguments="${tmp#* }"
26283 
26284   # Input might be given as Windows format, start by converting to
26285   # unix format.
26286   new_path="$path"
26287 
26288   windows_path="$new_path"
26289   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26290     unix_path=`$CYGPATH -u "$windows_path"`
26291     new_path="$unix_path"
26292   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26293     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26294     new_path="$unix_path"
26295   fi
26296 
26297 
26298   # Now try to locate executable using which
26299   new_path=`$WHICH "$new_path" 2> /dev/null`
26300 
26301   if test "x$new_path" = x; then
26302     # Oops. Which didn't find the executable.
26303     # The splitting of arguments from the executable at a space might have been incorrect,
26304     # since paths with space are more likely in Windows. Give it another try with the whole
26305     # argument.
26306     path="$complete"
26307     arguments="EOL"
26308     new_path="$path"
26309 
26310   windows_path="$new_path"
26311   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26312     unix_path=`$CYGPATH -u "$windows_path"`
26313     new_path="$unix_path"
26314   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26315     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26316     new_path="$unix_path"
26317   fi
26318 
26319 
26320     new_path=`$WHICH "$new_path" 2> /dev/null`
26321 
26322     if test "x$new_path" = x; then
26323       # It's still not found. Now this is an unrecoverable error.
26324       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26325 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26326       has_space=`$ECHO "$complete" | $GREP " "`
26327       if test "x$has_space" != x; then
26328         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26329 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26330       fi
26331       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26332     fi
26333   fi
26334 
26335   # Now new_path has a complete unix path to the binary
26336   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26337     # Keep paths in /bin as-is, but remove trailing .exe if any
26338     new_path="${new_path/%.exe/}"
26339     # Do not save /bin paths to all_fixpath_prefixes!
26340   else
26341     # Not in mixed or Windows style, start by that.
26342     new_path=`cmd //c echo $new_path`
26343 
26344   input_path="$new_path"
26345   # Check if we need to convert this using DOS-style short mode. If the path
26346   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26347   # take no chances and rewrite it.
26348   # Note: m4 eats our [], so we need to use [ and ] instead.
26349   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26350   if test "x$has_forbidden_chars" != x; then
26351     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26352     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26353   fi
26354 
26355     # Output is in $new_path
26356 
26357   windows_path="$new_path"
26358   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26359     unix_path=`$CYGPATH -u "$windows_path"`
26360     new_path="$unix_path"
26361   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26362     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26363     new_path="$unix_path"
26364   fi
26365 
26366     # remove trailing .exe if any
26367     new_path="${new_path/%.exe/}"
26368 
26369     # Save the first 10 bytes of this path to the storage, so fixpath can work.
26370     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26371   fi
26372 
26373   else
26374     # We're on a posix platform. Hooray! :)
26375     # First separate the path from the arguments. This will split at the first
26376     # space.
26377     complete="$MCS"
26378     path="${complete%% *}"
26379     tmp="$complete EOL"
26380     arguments="${tmp#* }"
26381 
26382     # Cannot rely on the command "which" here since it doesn't always work.
26383     is_absolute_path=`$ECHO "$path" | $GREP ^/`
26384     if test -z "$is_absolute_path"; then
26385       # Path to executable is not absolute. Find it.
26386       IFS_save="$IFS"
26387       IFS=:
26388       for p in $PATH; do
26389         if test -f "$p/$path" && test -x "$p/$path"; then
26390           new_path="$p/$path"
26391           break
26392         fi
26393       done
26394       IFS="$IFS_save"
26395     else
26396       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5
26397 $as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;}
26398       new_path="$path"
26399     fi
26400 
26401     if test "x$new_path" = x; then
26402         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26403 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26404         has_space=`$ECHO "$complete" | $GREP " "`
26405         if test "x$has_space" != x; then
26406           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26407 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26408         fi
26409         as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26410       fi
26411   fi
26412 
26413       # Now join together the path and the arguments once again
26414       if test "x$arguments" != xEOL; then
26415         new_complete="$new_path ${arguments% *}"
26416       else
26417         new_complete="$new_path"
26418       fi
26419 
26420   if test "x$complete" != "x$new_complete"; then
26421       MCS="$new_complete"
26422       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
26423 $as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
26424     fi
26425 
26426 elif test "x$OPENJDK_TARGET_OS" != xwindows; then
26427     if test -n "$ac_tool_prefix"; then
26428   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
26429 set dummy ${ac_tool_prefix}nm; ac_word=$2
26430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26431 $as_echo_n "checking for $ac_word... " >&6; }
26432 if test "${ac_cv_prog_NM+set}" = set; then :
26433   $as_echo_n "(cached) " >&6
26434 else
26435   if test -n "$NM"; then
26436   ac_cv_prog_NM="$NM" # Let the user override the test.
26437 else
26438 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26439 for as_dir in $PATH
26440 do
26441   IFS=$as_save_IFS
26442   test -z "$as_dir" && as_dir=.
26443     for ac_exec_ext in '' $ac_executable_extensions; do
26444   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26445     ac_cv_prog_NM="${ac_tool_prefix}nm"
26446     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26447     break 2
26448   fi
26449 done
26450   done
26451 IFS=$as_save_IFS
26452 
26453 fi
26454 fi
26455 NM=$ac_cv_prog_NM
26456 if test -n "$NM"; then
26457   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
26458 $as_echo "$NM" >&6; }
26459 else
26460   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26461 $as_echo "no" >&6; }
26462 fi
26463 
26464 
26465 fi
26466 if test -z "$ac_cv_prog_NM"; then
26467   ac_ct_NM=$NM
26468   # Extract the first word of "nm", so it can be a program name with args.
26469 set dummy nm; ac_word=$2
26470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26471 $as_echo_n "checking for $ac_word... " >&6; }
26472 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then :
26473   $as_echo_n "(cached) " >&6
26474 else
26475   if test -n "$ac_ct_NM"; then
26476   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
26477 else
26478 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26479 for as_dir in $PATH
26480 do
26481   IFS=$as_save_IFS
26482   test -z "$as_dir" && as_dir=.
26483     for ac_exec_ext in '' $ac_executable_extensions; do
26484   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26485     ac_cv_prog_ac_ct_NM="nm"
26486     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26487     break 2
26488   fi
26489 done
26490   done
26491 IFS=$as_save_IFS
26492 
26493 fi
26494 fi
26495 ac_ct_NM=$ac_cv_prog_ac_ct_NM
26496 if test -n "$ac_ct_NM"; then
26497   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
26498 $as_echo "$ac_ct_NM" >&6; }
26499 else
26500   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26501 $as_echo "no" >&6; }
26502 fi
26503 
26504   if test "x$ac_ct_NM" = x; then
26505     NM=""
26506   else
26507     case $cross_compiling:$ac_tool_warned in
26508 yes:)
26509 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26510 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26511 ac_tool_warned=yes ;;
26512 esac
26513     NM=$ac_ct_NM
26514   fi
26515 else
26516   NM="$ac_cv_prog_NM"
26517 fi
26518 
26519 
26520   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26521 
26522   # First separate the path from the arguments. This will split at the first
26523   # space.
26524   complete="$NM"
26525   path="${complete%% *}"
26526   tmp="$complete EOL"
26527   arguments="${tmp#* }"
26528 
26529   # Input might be given as Windows format, start by converting to
26530   # unix format.
26531   new_path=`$CYGPATH -u "$path"`
26532 
26533   # Now try to locate executable using which
26534   new_path=`$WHICH "$new_path" 2> /dev/null`
26535   # bat and cmd files are not always considered executable in cygwin causing which
26536   # to not find them
26537   if test "x$new_path" = x \
26538            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26539            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26540     new_path=`$CYGPATH -u "$path"`
26541   fi
26542   if test "x$new_path" = x; then
26543     # Oops. Which didn't find the executable.
26544     # The splitting of arguments from the executable at a space might have been incorrect,
26545     # since paths with space are more likely in Windows. Give it another try with the whole
26546     # argument.
26547     path="$complete"
26548     arguments="EOL"
26549     new_path=`$CYGPATH -u "$path"`
26550     new_path=`$WHICH "$new_path" 2> /dev/null`
26551     # bat and cmd files are not always considered executable in cygwin causing which
26552     # to not find them
26553     if test "x$new_path" = x \
26554              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26555              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26556       new_path=`$CYGPATH -u "$path"`
26557     fi
26558     if test "x$new_path" = x; then
26559       # It's still not found. Now this is an unrecoverable error.
26560       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26561 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26562       has_space=`$ECHO "$complete" | $GREP " "`
26563       if test "x$has_space" != x; then
26564         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26565 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26566       fi
26567       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26568     fi
26569   fi
26570 
26571   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26572   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26573   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26574   # "foo.exe" is OK but "foo" is an error.
26575   #
26576   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26577   # It is also a way to make sure we got the proper file name for the real test later on.
26578   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26579   if test "x$test_shortpath" = x; then
26580     # Short path failed, file does not exist as specified.
26581     # Try adding .exe or .cmd
26582     if test -f "${new_path}.exe"; then
26583        input_to_shortpath="${new_path}.exe"
26584     elif test -f "${new_path}.cmd"; then
26585        input_to_shortpath="${new_path}.cmd"
26586     else
26587       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
26588 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
26589       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26590 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26591       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26592     fi
26593   else
26594     input_to_shortpath="$new_path"
26595   fi
26596 
26597   # Call helper function which possibly converts this using DOS-style short mode.
26598   # If so, the updated path is stored in $new_path.
26599   new_path="$input_to_shortpath"
26600 
26601   input_path="$input_to_shortpath"
26602   # Check if we need to convert this using DOS-style short mode. If the path
26603   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26604   # take no chances and rewrite it.
26605   # Note: m4 eats our [], so we need to use [ and ] instead.
26606   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26607   if test "x$has_forbidden_chars" != x; then
26608     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26609     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26610     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26611     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26612       # Going to short mode and back again did indeed matter. Since short mode is
26613       # case insensitive, let's make it lowercase to improve readability.
26614       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26615       # Now convert it back to Unix-stile (cygpath)
26616       input_path=`$CYGPATH -u "$shortmode_path"`
26617       new_path="$input_path"
26618     fi
26619   fi
26620 
26621   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26622   if test "x$test_cygdrive_prefix" = x; then
26623     # As a simple fix, exclude /usr/bin since it's not a real path.
26624     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26625       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26626       # a path prefixed by /cygdrive for fixpath to work.
26627       new_path="$CYGWIN_ROOT_PATH$input_path"
26628     fi
26629   fi
26630 
26631   # remove trailing .exe if any
26632   new_path="${new_path/%.exe/}"
26633 
26634   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26635 
26636   # First separate the path from the arguments. This will split at the first
26637   # space.
26638   complete="$NM"
26639   path="${complete%% *}"
26640   tmp="$complete EOL"
26641   arguments="${tmp#* }"
26642 
26643   # Input might be given as Windows format, start by converting to
26644   # unix format.
26645   new_path="$path"
26646 
26647   windows_path="$new_path"
26648   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26649     unix_path=`$CYGPATH -u "$windows_path"`
26650     new_path="$unix_path"
26651   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26652     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26653     new_path="$unix_path"
26654   fi
26655 
26656 
26657   # Now try to locate executable using which
26658   new_path=`$WHICH "$new_path" 2> /dev/null`
26659 
26660   if test "x$new_path" = x; then
26661     # Oops. Which didn't find the executable.
26662     # The splitting of arguments from the executable at a space might have been incorrect,
26663     # since paths with space are more likely in Windows. Give it another try with the whole
26664     # argument.
26665     path="$complete"
26666     arguments="EOL"
26667     new_path="$path"
26668 
26669   windows_path="$new_path"
26670   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26671     unix_path=`$CYGPATH -u "$windows_path"`
26672     new_path="$unix_path"
26673   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26674     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26675     new_path="$unix_path"
26676   fi
26677 
26678 
26679     new_path=`$WHICH "$new_path" 2> /dev/null`
26680 
26681     if test "x$new_path" = x; then
26682       # It's still not found. Now this is an unrecoverable error.
26683       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26684 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26685       has_space=`$ECHO "$complete" | $GREP " "`
26686       if test "x$has_space" != x; then
26687         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26688 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26689       fi
26690       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26691     fi
26692   fi
26693 
26694   # Now new_path has a complete unix path to the binary
26695   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26696     # Keep paths in /bin as-is, but remove trailing .exe if any
26697     new_path="${new_path/%.exe/}"
26698     # Do not save /bin paths to all_fixpath_prefixes!
26699   else
26700     # Not in mixed or Windows style, start by that.
26701     new_path=`cmd //c echo $new_path`
26702 
26703   input_path="$new_path"
26704   # Check if we need to convert this using DOS-style short mode. If the path
26705   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26706   # take no chances and rewrite it.
26707   # Note: m4 eats our [], so we need to use [ and ] instead.
26708   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26709   if test "x$has_forbidden_chars" != x; then
26710     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26711     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26712   fi
26713 
26714     # Output is in $new_path
26715 
26716   windows_path="$new_path"
26717   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26718     unix_path=`$CYGPATH -u "$windows_path"`
26719     new_path="$unix_path"
26720   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26721     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26722     new_path="$unix_path"
26723   fi
26724 
26725     # remove trailing .exe if any
26726     new_path="${new_path/%.exe/}"
26727 
26728     # Save the first 10 bytes of this path to the storage, so fixpath can work.
26729     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26730   fi
26731 
26732   else
26733     # We're on a posix platform. Hooray! :)
26734     # First separate the path from the arguments. This will split at the first
26735     # space.
26736     complete="$NM"
26737     path="${complete%% *}"
26738     tmp="$complete EOL"
26739     arguments="${tmp#* }"
26740 
26741     # Cannot rely on the command "which" here since it doesn't always work.
26742     is_absolute_path=`$ECHO "$path" | $GREP ^/`
26743     if test -z "$is_absolute_path"; then
26744       # Path to executable is not absolute. Find it.
26745       IFS_save="$IFS"
26746       IFS=:
26747       for p in $PATH; do
26748         if test -f "$p/$path" && test -x "$p/$path"; then
26749           new_path="$p/$path"
26750           break
26751         fi
26752       done
26753       IFS="$IFS_save"
26754     else
26755       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
26756 $as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
26757       new_path="$path"
26758     fi
26759 
26760     if test "x$new_path" = x; then
26761         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26762 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26763         has_space=`$ECHO "$complete" | $GREP " "`
26764         if test "x$has_space" != x; then
26765           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26766 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26767         fi
26768         as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26769       fi
26770   fi
26771 
26772       # Now join together the path and the arguments once again
26773       if test "x$arguments" != xEOL; then
26774         new_complete="$new_path ${arguments% *}"
26775       else
26776         new_complete="$new_path"
26777       fi
26778 
26779   if test "x$complete" != "x$new_complete"; then
26780       NM="$new_complete"
26781       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
26782 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
26783     fi
26784 
26785     GNM="$NM"
26786 
26787     if test -n "$ac_tool_prefix"; then
26788   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
26789 set dummy ${ac_tool_prefix}strip; ac_word=$2
26790 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26791 $as_echo_n "checking for $ac_word... " >&6; }
26792 if test "${ac_cv_prog_STRIP+set}" = set; then :
26793   $as_echo_n "(cached) " >&6
26794 else
26795   if test -n "$STRIP"; then
26796   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
26797 else
26798 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26799 for as_dir in $PATH
26800 do
26801   IFS=$as_save_IFS
26802   test -z "$as_dir" && as_dir=.
26803     for ac_exec_ext in '' $ac_executable_extensions; do
26804   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26805     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
26806     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26807     break 2
26808   fi
26809 done
26810   done
26811 IFS=$as_save_IFS
26812 
26813 fi
26814 fi
26815 STRIP=$ac_cv_prog_STRIP
26816 if test -n "$STRIP"; then
26817   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
26818 $as_echo "$STRIP" >&6; }
26819 else
26820   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26821 $as_echo "no" >&6; }
26822 fi
26823 
26824 
26825 fi
26826 if test -z "$ac_cv_prog_STRIP"; then
26827   ac_ct_STRIP=$STRIP
26828   # Extract the first word of "strip", so it can be a program name with args.
26829 set dummy strip; ac_word=$2
26830 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26831 $as_echo_n "checking for $ac_word... " >&6; }
26832 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
26833   $as_echo_n "(cached) " >&6
26834 else
26835   if test -n "$ac_ct_STRIP"; then
26836   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
26837 else
26838 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26839 for as_dir in $PATH
26840 do
26841   IFS=$as_save_IFS
26842   test -z "$as_dir" && as_dir=.
26843     for ac_exec_ext in '' $ac_executable_extensions; do
26844   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26845     ac_cv_prog_ac_ct_STRIP="strip"
26846     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26847     break 2
26848   fi
26849 done
26850   done
26851 IFS=$as_save_IFS
26852 
26853 fi
26854 fi
26855 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
26856 if test -n "$ac_ct_STRIP"; then
26857   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
26858 $as_echo "$ac_ct_STRIP" >&6; }
26859 else
26860   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26861 $as_echo "no" >&6; }
26862 fi
26863 
26864   if test "x$ac_ct_STRIP" = x; then
26865     STRIP=""
26866   else
26867     case $cross_compiling:$ac_tool_warned in
26868 yes:)
26869 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26870 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26871 ac_tool_warned=yes ;;
26872 esac
26873     STRIP=$ac_ct_STRIP
26874   fi
26875 else
26876   STRIP="$ac_cv_prog_STRIP"
26877 fi
26878 
26879 
26880   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26881 
26882   # First separate the path from the arguments. This will split at the first
26883   # space.
26884   complete="$STRIP"
26885   path="${complete%% *}"
26886   tmp="$complete EOL"
26887   arguments="${tmp#* }"
26888 
26889   # Input might be given as Windows format, start by converting to
26890   # unix format.
26891   new_path=`$CYGPATH -u "$path"`
26892 
26893   # Now try to locate executable using which
26894   new_path=`$WHICH "$new_path" 2> /dev/null`
26895   # bat and cmd files are not always considered executable in cygwin causing which
26896   # to not find them
26897   if test "x$new_path" = x \
26898            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26899            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26900     new_path=`$CYGPATH -u "$path"`
26901   fi
26902   if test "x$new_path" = x; then
26903     # Oops. Which didn't find the executable.
26904     # The splitting of arguments from the executable at a space might have been incorrect,
26905     # since paths with space are more likely in Windows. Give it another try with the whole
26906     # argument.
26907     path="$complete"
26908     arguments="EOL"
26909     new_path=`$CYGPATH -u "$path"`
26910     new_path=`$WHICH "$new_path" 2> /dev/null`
26911     # bat and cmd files are not always considered executable in cygwin causing which
26912     # to not find them
26913     if test "x$new_path" = x \
26914              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26915              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26916       new_path=`$CYGPATH -u "$path"`
26917     fi
26918     if test "x$new_path" = x; then
26919       # It's still not found. Now this is an unrecoverable error.
26920       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26921 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26922       has_space=`$ECHO "$complete" | $GREP " "`
26923       if test "x$has_space" != x; then
26924         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26925 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26926       fi
26927       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26928     fi
26929   fi
26930 
26931   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26932   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26933   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26934   # "foo.exe" is OK but "foo" is an error.
26935   #
26936   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26937   # It is also a way to make sure we got the proper file name for the real test later on.
26938   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26939   if test "x$test_shortpath" = x; then
26940     # Short path failed, file does not exist as specified.
26941     # Try adding .exe or .cmd
26942     if test -f "${new_path}.exe"; then
26943        input_to_shortpath="${new_path}.exe"
26944     elif test -f "${new_path}.cmd"; then
26945        input_to_shortpath="${new_path}.cmd"
26946     else
26947       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
26948 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
26949       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26950 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26951       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26952     fi
26953   else
26954     input_to_shortpath="$new_path"
26955   fi
26956 
26957   # Call helper function which possibly converts this using DOS-style short mode.
26958   # If so, the updated path is stored in $new_path.
26959   new_path="$input_to_shortpath"
26960 
26961   input_path="$input_to_shortpath"
26962   # Check if we need to convert this using DOS-style short mode. If the path
26963   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26964   # take no chances and rewrite it.
26965   # Note: m4 eats our [], so we need to use [ and ] instead.
26966   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26967   if test "x$has_forbidden_chars" != x; then
26968     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26969     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26970     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26971     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26972       # Going to short mode and back again did indeed matter. Since short mode is
26973       # case insensitive, let's make it lowercase to improve readability.
26974       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26975       # Now convert it back to Unix-stile (cygpath)
26976       input_path=`$CYGPATH -u "$shortmode_path"`
26977       new_path="$input_path"
26978     fi
26979   fi
26980 
26981   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26982   if test "x$test_cygdrive_prefix" = x; then
26983     # As a simple fix, exclude /usr/bin since it's not a real path.
26984     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26985       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26986       # a path prefixed by /cygdrive for fixpath to work.
26987       new_path="$CYGWIN_ROOT_PATH$input_path"
26988     fi
26989   fi
26990 
26991   # remove trailing .exe if any
26992   new_path="${new_path/%.exe/}"
26993 
26994   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26995 
26996   # First separate the path from the arguments. This will split at the first
26997   # space.
26998   complete="$STRIP"
26999   path="${complete%% *}"
27000   tmp="$complete EOL"
27001   arguments="${tmp#* }"
27002 
27003   # Input might be given as Windows format, start by converting to
27004   # unix format.
27005   new_path="$path"
27006 
27007   windows_path="$new_path"
27008   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27009     unix_path=`$CYGPATH -u "$windows_path"`
27010     new_path="$unix_path"
27011   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27012     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27013     new_path="$unix_path"
27014   fi
27015 
27016 
27017   # Now try to locate executable using which
27018   new_path=`$WHICH "$new_path" 2> /dev/null`
27019 
27020   if test "x$new_path" = x; then
27021     # Oops. Which didn't find the executable.
27022     # The splitting of arguments from the executable at a space might have been incorrect,
27023     # since paths with space are more likely in Windows. Give it another try with the whole
27024     # argument.
27025     path="$complete"
27026     arguments="EOL"
27027     new_path="$path"
27028 
27029   windows_path="$new_path"
27030   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27031     unix_path=`$CYGPATH -u "$windows_path"`
27032     new_path="$unix_path"
27033   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27034     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27035     new_path="$unix_path"
27036   fi
27037 
27038 
27039     new_path=`$WHICH "$new_path" 2> /dev/null`
27040 
27041     if test "x$new_path" = x; then
27042       # It's still not found. Now this is an unrecoverable error.
27043       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27044 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27045       has_space=`$ECHO "$complete" | $GREP " "`
27046       if test "x$has_space" != x; then
27047         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27048 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27049       fi
27050       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27051     fi
27052   fi
27053 
27054   # Now new_path has a complete unix path to the binary
27055   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27056     # Keep paths in /bin as-is, but remove trailing .exe if any
27057     new_path="${new_path/%.exe/}"
27058     # Do not save /bin paths to all_fixpath_prefixes!
27059   else
27060     # Not in mixed or Windows style, start by that.
27061     new_path=`cmd //c echo $new_path`
27062 
27063   input_path="$new_path"
27064   # Check if we need to convert this using DOS-style short mode. If the path
27065   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27066   # take no chances and rewrite it.
27067   # Note: m4 eats our [], so we need to use [ and ] instead.
27068   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27069   if test "x$has_forbidden_chars" != x; then
27070     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27071     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27072   fi
27073 
27074     # Output is in $new_path
27075 
27076   windows_path="$new_path"
27077   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27078     unix_path=`$CYGPATH -u "$windows_path"`
27079     new_path="$unix_path"
27080   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27081     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27082     new_path="$unix_path"
27083   fi
27084 
27085     # remove trailing .exe if any
27086     new_path="${new_path/%.exe/}"
27087 
27088     # Save the first 10 bytes of this path to the storage, so fixpath can work.
27089     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27090   fi
27091 
27092   else
27093     # We're on a posix platform. Hooray! :)
27094     # First separate the path from the arguments. This will split at the first
27095     # space.
27096     complete="$STRIP"
27097     path="${complete%% *}"
27098     tmp="$complete EOL"
27099     arguments="${tmp#* }"
27100 
27101     # Cannot rely on the command "which" here since it doesn't always work.
27102     is_absolute_path=`$ECHO "$path" | $GREP ^/`
27103     if test -z "$is_absolute_path"; then
27104       # Path to executable is not absolute. Find it.
27105       IFS_save="$IFS"
27106       IFS=:
27107       for p in $PATH; do
27108         if test -f "$p/$path" && test -x "$p/$path"; then
27109           new_path="$p/$path"
27110           break
27111         fi
27112       done
27113       IFS="$IFS_save"
27114     else
27115       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
27116 $as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
27117       new_path="$path"
27118     fi
27119 
27120     if test "x$new_path" = x; then
27121         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27122 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27123         has_space=`$ECHO "$complete" | $GREP " "`
27124         if test "x$has_space" != x; then
27125           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27126 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27127         fi
27128         as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27129       fi
27130   fi
27131 
27132       # Now join together the path and the arguments once again
27133       if test "x$arguments" != xEOL; then
27134         new_complete="$new_path ${arguments% *}"
27135       else
27136         new_complete="$new_path"
27137       fi
27138 
27139   if test "x$complete" != "x$new_complete"; then
27140       STRIP="$new_complete"
27141       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
27142 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
27143     fi
27144 
27145 fi
27146 
27147 # objcopy is used for moving debug symbols to separate files when
27148 # full debug symbols are enabled.
27149 if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
27150     if test -n "$ac_tool_prefix"; then
27151   for ac_prog in gobjcopy objcopy
27152   do
27153     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27154 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27156 $as_echo_n "checking for $ac_word... " >&6; }
27157 if test "${ac_cv_prog_OBJCOPY+set}" = set; then :
27158   $as_echo_n "(cached) " >&6
27159 else
27160   if test -n "$OBJCOPY"; then
27161   ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
27162 else
27163 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27164 for as_dir in $PATH
27165 do
27166   IFS=$as_save_IFS
27167   test -z "$as_dir" && as_dir=.
27168     for ac_exec_ext in '' $ac_executable_extensions; do
27169   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27170     ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
27171     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27172     break 2
27173   fi
27174 done
27175   done
27176 IFS=$as_save_IFS
27177 
27178 fi
27179 fi
27180 OBJCOPY=$ac_cv_prog_OBJCOPY
27181 if test -n "$OBJCOPY"; then
27182   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
27183 $as_echo "$OBJCOPY" >&6; }
27184 else
27185   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27186 $as_echo "no" >&6; }
27187 fi
27188 
27189 
27190     test -n "$OBJCOPY" && break
27191   done
27192 fi
27193 if test -z "$OBJCOPY"; then
27194   ac_ct_OBJCOPY=$OBJCOPY
27195   for ac_prog in gobjcopy objcopy
27196 do
27197   # Extract the first word of "$ac_prog", so it can be a program name with args.
27198 set dummy $ac_prog; ac_word=$2
27199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27200 $as_echo_n "checking for $ac_word... " >&6; }
27201 if test "${ac_cv_prog_ac_ct_OBJCOPY+set}" = set; then :
27202   $as_echo_n "(cached) " >&6
27203 else
27204   if test -n "$ac_ct_OBJCOPY"; then
27205   ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
27206 else
27207 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27208 for as_dir in $PATH
27209 do
27210   IFS=$as_save_IFS
27211   test -z "$as_dir" && as_dir=.
27212     for ac_exec_ext in '' $ac_executable_extensions; do
27213   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27214     ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
27215     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27216     break 2
27217   fi
27218 done
27219   done
27220 IFS=$as_save_IFS
27221 
27222 fi
27223 fi
27224 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
27225 if test -n "$ac_ct_OBJCOPY"; then
27226   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
27227 $as_echo "$ac_ct_OBJCOPY" >&6; }
27228 else
27229   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27230 $as_echo "no" >&6; }
27231 fi
27232 
27233 
27234   test -n "$ac_ct_OBJCOPY" && break
27235 done
27236 
27237   if test "x$ac_ct_OBJCOPY" = x; then
27238     OBJCOPY=""
27239   else
27240     case $cross_compiling:$ac_tool_warned in
27241 yes:)
27242 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27243 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27244 ac_tool_warned=yes ;;
27245 esac
27246     OBJCOPY=$ac_ct_OBJCOPY
27247   fi
27248 fi
27249 
27250     # Only call fixup if objcopy was found.
27251     if test -n "$OBJCOPY"; then
27252 
27253   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27254 
27255   # First separate the path from the arguments. This will split at the first
27256   # space.
27257   complete="$OBJCOPY"
27258   path="${complete%% *}"
27259   tmp="$complete EOL"
27260   arguments="${tmp#* }"
27261 
27262   # Input might be given as Windows format, start by converting to
27263   # unix format.
27264   new_path=`$CYGPATH -u "$path"`
27265 
27266   # Now try to locate executable using which
27267   new_path=`$WHICH "$new_path" 2> /dev/null`
27268   # bat and cmd files are not always considered executable in cygwin causing which
27269   # to not find them
27270   if test "x$new_path" = x \
27271            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27272            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27273     new_path=`$CYGPATH -u "$path"`
27274   fi
27275   if test "x$new_path" = x; then
27276     # Oops. Which didn't find the executable.
27277     # The splitting of arguments from the executable at a space might have been incorrect,
27278     # since paths with space are more likely in Windows. Give it another try with the whole
27279     # argument.
27280     path="$complete"
27281     arguments="EOL"
27282     new_path=`$CYGPATH -u "$path"`
27283     new_path=`$WHICH "$new_path" 2> /dev/null`
27284     # bat and cmd files are not always considered executable in cygwin causing which
27285     # to not find them
27286     if test "x$new_path" = x \
27287              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27288              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27289       new_path=`$CYGPATH -u "$path"`
27290     fi
27291     if test "x$new_path" = x; then
27292       # It's still not found. Now this is an unrecoverable error.
27293       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27294 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27295       has_space=`$ECHO "$complete" | $GREP " "`
27296       if test "x$has_space" != x; then
27297         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27298 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27299       fi
27300       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27301     fi
27302   fi
27303 
27304   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27305   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27306   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27307   # "foo.exe" is OK but "foo" is an error.
27308   #
27309   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27310   # It is also a way to make sure we got the proper file name for the real test later on.
27311   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27312   if test "x$test_shortpath" = x; then
27313     # Short path failed, file does not exist as specified.
27314     # Try adding .exe or .cmd
27315     if test -f "${new_path}.exe"; then
27316        input_to_shortpath="${new_path}.exe"
27317     elif test -f "${new_path}.cmd"; then
27318        input_to_shortpath="${new_path}.cmd"
27319     else
27320       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
27321 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
27322       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27323 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27324       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27325     fi
27326   else
27327     input_to_shortpath="$new_path"
27328   fi
27329 
27330   # Call helper function which possibly converts this using DOS-style short mode.
27331   # If so, the updated path is stored in $new_path.
27332   new_path="$input_to_shortpath"
27333 
27334   input_path="$input_to_shortpath"
27335   # Check if we need to convert this using DOS-style short mode. If the path
27336   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27337   # take no chances and rewrite it.
27338   # Note: m4 eats our [], so we need to use [ and ] instead.
27339   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27340   if test "x$has_forbidden_chars" != x; then
27341     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27342     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27343     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27344     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27345       # Going to short mode and back again did indeed matter. Since short mode is
27346       # case insensitive, let's make it lowercase to improve readability.
27347       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27348       # Now convert it back to Unix-stile (cygpath)
27349       input_path=`$CYGPATH -u "$shortmode_path"`
27350       new_path="$input_path"
27351     fi
27352   fi
27353 
27354   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27355   if test "x$test_cygdrive_prefix" = x; then
27356     # As a simple fix, exclude /usr/bin since it's not a real path.
27357     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27358       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27359       # a path prefixed by /cygdrive for fixpath to work.
27360       new_path="$CYGWIN_ROOT_PATH$input_path"
27361     fi
27362   fi
27363 
27364   # remove trailing .exe if any
27365   new_path="${new_path/%.exe/}"
27366 
27367   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27368 
27369   # First separate the path from the arguments. This will split at the first
27370   # space.
27371   complete="$OBJCOPY"
27372   path="${complete%% *}"
27373   tmp="$complete EOL"
27374   arguments="${tmp#* }"
27375 
27376   # Input might be given as Windows format, start by converting to
27377   # unix format.
27378   new_path="$path"
27379 
27380   windows_path="$new_path"
27381   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27382     unix_path=`$CYGPATH -u "$windows_path"`
27383     new_path="$unix_path"
27384   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27385     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27386     new_path="$unix_path"
27387   fi
27388 
27389 
27390   # Now try to locate executable using which
27391   new_path=`$WHICH "$new_path" 2> /dev/null`
27392 
27393   if test "x$new_path" = x; then
27394     # Oops. Which didn't find the executable.
27395     # The splitting of arguments from the executable at a space might have been incorrect,
27396     # since paths with space are more likely in Windows. Give it another try with the whole
27397     # argument.
27398     path="$complete"
27399     arguments="EOL"
27400     new_path="$path"
27401 
27402   windows_path="$new_path"
27403   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27404     unix_path=`$CYGPATH -u "$windows_path"`
27405     new_path="$unix_path"
27406   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27407     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27408     new_path="$unix_path"
27409   fi
27410 
27411 
27412     new_path=`$WHICH "$new_path" 2> /dev/null`
27413 
27414     if test "x$new_path" = x; then
27415       # It's still not found. Now this is an unrecoverable error.
27416       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27417 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27418       has_space=`$ECHO "$complete" | $GREP " "`
27419       if test "x$has_space" != x; then
27420         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27421 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27422       fi
27423       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27424     fi
27425   fi
27426 
27427   # Now new_path has a complete unix path to the binary
27428   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27429     # Keep paths in /bin as-is, but remove trailing .exe if any
27430     new_path="${new_path/%.exe/}"
27431     # Do not save /bin paths to all_fixpath_prefixes!
27432   else
27433     # Not in mixed or Windows style, start by that.
27434     new_path=`cmd //c echo $new_path`
27435 
27436   input_path="$new_path"
27437   # Check if we need to convert this using DOS-style short mode. If the path
27438   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27439   # take no chances and rewrite it.
27440   # Note: m4 eats our [], so we need to use [ and ] instead.
27441   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27442   if test "x$has_forbidden_chars" != x; then
27443     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27444     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27445   fi
27446 
27447     # Output is in $new_path
27448 
27449   windows_path="$new_path"
27450   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27451     unix_path=`$CYGPATH -u "$windows_path"`
27452     new_path="$unix_path"
27453   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27454     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27455     new_path="$unix_path"
27456   fi
27457 
27458     # remove trailing .exe if any
27459     new_path="${new_path/%.exe/}"
27460 
27461     # Save the first 10 bytes of this path to the storage, so fixpath can work.
27462     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27463   fi
27464 
27465   else
27466     # We're on a posix platform. Hooray! :)
27467     # First separate the path from the arguments. This will split at the first
27468     # space.
27469     complete="$OBJCOPY"
27470     path="${complete%% *}"
27471     tmp="$complete EOL"
27472     arguments="${tmp#* }"
27473 
27474     # Cannot rely on the command "which" here since it doesn't always work.
27475     is_absolute_path=`$ECHO "$path" | $GREP ^/`
27476     if test -z "$is_absolute_path"; then
27477       # Path to executable is not absolute. Find it.
27478       IFS_save="$IFS"
27479       IFS=:
27480       for p in $PATH; do
27481         if test -f "$p/$path" && test -x "$p/$path"; then
27482           new_path="$p/$path"
27483           break
27484         fi
27485       done
27486       IFS="$IFS_save"
27487     else
27488       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5
27489 $as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;}
27490       new_path="$path"
27491     fi
27492 
27493     if test "x$new_path" = x; then
27494         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27495 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27496         has_space=`$ECHO "$complete" | $GREP " "`
27497         if test "x$has_space" != x; then
27498           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27499 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27500         fi
27501         as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27502       fi
27503   fi
27504 
27505       # Now join together the path and the arguments once again
27506       if test "x$arguments" != xEOL; then
27507         new_complete="$new_path ${arguments% *}"
27508       else
27509         new_complete="$new_path"
27510       fi
27511 
27512   if test "x$complete" != "x$new_complete"; then
27513       OBJCOPY="$new_complete"
27514       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
27515 $as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
27516     fi
27517 
27518     fi
27519 fi
27520 
27521 if test -n "$ac_tool_prefix"; then
27522   for ac_prog in gobjdump objdump
27523   do
27524     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27525 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27527 $as_echo_n "checking for $ac_word... " >&6; }
27528 if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
27529   $as_echo_n "(cached) " >&6
27530 else
27531   if test -n "$OBJDUMP"; then
27532   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
27533 else
27534 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27535 for as_dir in $PATH
27536 do
27537   IFS=$as_save_IFS
27538   test -z "$as_dir" && as_dir=.
27539     for ac_exec_ext in '' $ac_executable_extensions; do
27540   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27541     ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
27542     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27543     break 2
27544   fi
27545 done
27546   done
27547 IFS=$as_save_IFS
27548 
27549 fi
27550 fi
27551 OBJDUMP=$ac_cv_prog_OBJDUMP
27552 if test -n "$OBJDUMP"; then
27553   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
27554 $as_echo "$OBJDUMP" >&6; }
27555 else
27556   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27557 $as_echo "no" >&6; }
27558 fi
27559 
27560 
27561     test -n "$OBJDUMP" && break
27562   done
27563 fi
27564 if test -z "$OBJDUMP"; then
27565   ac_ct_OBJDUMP=$OBJDUMP
27566   for ac_prog in gobjdump objdump
27567 do
27568   # Extract the first word of "$ac_prog", so it can be a program name with args.
27569 set dummy $ac_prog; ac_word=$2
27570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27571 $as_echo_n "checking for $ac_word... " >&6; }
27572 if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
27573   $as_echo_n "(cached) " >&6
27574 else
27575   if test -n "$ac_ct_OBJDUMP"; then
27576   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
27577 else
27578 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27579 for as_dir in $PATH
27580 do
27581   IFS=$as_save_IFS
27582   test -z "$as_dir" && as_dir=.
27583     for ac_exec_ext in '' $ac_executable_extensions; do
27584   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27585     ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
27586     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27587     break 2
27588   fi
27589 done
27590   done
27591 IFS=$as_save_IFS
27592 
27593 fi
27594 fi
27595 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
27596 if test -n "$ac_ct_OBJDUMP"; then
27597   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
27598 $as_echo "$ac_ct_OBJDUMP" >&6; }
27599 else
27600   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27601 $as_echo "no" >&6; }
27602 fi
27603 
27604 
27605   test -n "$ac_ct_OBJDUMP" && break
27606 done
27607 
27608   if test "x$ac_ct_OBJDUMP" = x; then
27609     OBJDUMP=""
27610   else
27611     case $cross_compiling:$ac_tool_warned in
27612 yes:)
27613 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27614 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27615 ac_tool_warned=yes ;;
27616 esac
27617     OBJDUMP=$ac_ct_OBJDUMP
27618   fi
27619 fi
27620 
27621 if test "x$OBJDUMP" != x; then
27622   # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
27623 
27624   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27625 
27626   # First separate the path from the arguments. This will split at the first
27627   # space.
27628   complete="$OBJDUMP"
27629   path="${complete%% *}"
27630   tmp="$complete EOL"
27631   arguments="${tmp#* }"
27632 
27633   # Input might be given as Windows format, start by converting to
27634   # unix format.
27635   new_path=`$CYGPATH -u "$path"`
27636 
27637   # Now try to locate executable using which
27638   new_path=`$WHICH "$new_path" 2> /dev/null`
27639   # bat and cmd files are not always considered executable in cygwin causing which
27640   # to not find them
27641   if test "x$new_path" = x \
27642            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27643            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27644     new_path=`$CYGPATH -u "$path"`
27645   fi
27646   if test "x$new_path" = x; then
27647     # Oops. Which didn't find the executable.
27648     # The splitting of arguments from the executable at a space might have been incorrect,
27649     # since paths with space are more likely in Windows. Give it another try with the whole
27650     # argument.
27651     path="$complete"
27652     arguments="EOL"
27653     new_path=`$CYGPATH -u "$path"`
27654     new_path=`$WHICH "$new_path" 2> /dev/null`
27655     # bat and cmd files are not always considered executable in cygwin causing which
27656     # to not find them
27657     if test "x$new_path" = x \
27658              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27659              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27660       new_path=`$CYGPATH -u "$path"`
27661     fi
27662     if test "x$new_path" = x; then
27663       # It's still not found. Now this is an unrecoverable error.
27664       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
27665 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
27666       has_space=`$ECHO "$complete" | $GREP " "`
27667       if test "x$has_space" != x; then
27668         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27669 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27670       fi
27671       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27672     fi
27673   fi
27674 
27675   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27676   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27677   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27678   # "foo.exe" is OK but "foo" is an error.
27679   #
27680   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27681   # It is also a way to make sure we got the proper file name for the real test later on.
27682   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27683   if test "x$test_shortpath" = x; then
27684     # Short path failed, file does not exist as specified.
27685     # Try adding .exe or .cmd
27686     if test -f "${new_path}.exe"; then
27687        input_to_shortpath="${new_path}.exe"
27688     elif test -f "${new_path}.cmd"; then
27689        input_to_shortpath="${new_path}.cmd"
27690     else
27691       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
27692 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
27693       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27694 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27695       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27696     fi
27697   else
27698     input_to_shortpath="$new_path"
27699   fi
27700 
27701   # Call helper function which possibly converts this using DOS-style short mode.
27702   # If so, the updated path is stored in $new_path.
27703   new_path="$input_to_shortpath"
27704 
27705   input_path="$input_to_shortpath"
27706   # Check if we need to convert this using DOS-style short mode. If the path
27707   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27708   # take no chances and rewrite it.
27709   # Note: m4 eats our [], so we need to use [ and ] instead.
27710   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27711   if test "x$has_forbidden_chars" != x; then
27712     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27713     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27714     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27715     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27716       # Going to short mode and back again did indeed matter. Since short mode is
27717       # case insensitive, let's make it lowercase to improve readability.
27718       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27719       # Now convert it back to Unix-stile (cygpath)
27720       input_path=`$CYGPATH -u "$shortmode_path"`
27721       new_path="$input_path"
27722     fi
27723   fi
27724 
27725   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27726   if test "x$test_cygdrive_prefix" = x; then
27727     # As a simple fix, exclude /usr/bin since it's not a real path.
27728     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27729       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27730       # a path prefixed by /cygdrive for fixpath to work.
27731       new_path="$CYGWIN_ROOT_PATH$input_path"
27732     fi
27733   fi
27734 
27735   # remove trailing .exe if any
27736   new_path="${new_path/%.exe/}"
27737 
27738   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27739 
27740   # First separate the path from the arguments. This will split at the first
27741   # space.
27742   complete="$OBJDUMP"
27743   path="${complete%% *}"
27744   tmp="$complete EOL"
27745   arguments="${tmp#* }"
27746 
27747   # Input might be given as Windows format, start by converting to
27748   # unix format.
27749   new_path="$path"
27750 
27751   windows_path="$new_path"
27752   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27753     unix_path=`$CYGPATH -u "$windows_path"`
27754     new_path="$unix_path"
27755   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27756     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27757     new_path="$unix_path"
27758   fi
27759 
27760 
27761   # Now try to locate executable using which
27762   new_path=`$WHICH "$new_path" 2> /dev/null`
27763 
27764   if test "x$new_path" = x; then
27765     # Oops. Which didn't find the executable.
27766     # The splitting of arguments from the executable at a space might have been incorrect,
27767     # since paths with space are more likely in Windows. Give it another try with the whole
27768     # argument.
27769     path="$complete"
27770     arguments="EOL"
27771     new_path="$path"
27772 
27773   windows_path="$new_path"
27774   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27775     unix_path=`$CYGPATH -u "$windows_path"`
27776     new_path="$unix_path"
27777   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27778     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27779     new_path="$unix_path"
27780   fi
27781 
27782 
27783     new_path=`$WHICH "$new_path" 2> /dev/null`
27784 
27785     if test "x$new_path" = x; then
27786       # It's still not found. Now this is an unrecoverable error.
27787       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
27788 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
27789       has_space=`$ECHO "$complete" | $GREP " "`
27790       if test "x$has_space" != x; then
27791         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27792 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27793       fi
27794       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27795     fi
27796   fi
27797 
27798   # Now new_path has a complete unix path to the binary
27799   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27800     # Keep paths in /bin as-is, but remove trailing .exe if any
27801     new_path="${new_path/%.exe/}"
27802     # Do not save /bin paths to all_fixpath_prefixes!
27803   else
27804     # Not in mixed or Windows style, start by that.
27805     new_path=`cmd //c echo $new_path`
27806 
27807   input_path="$new_path"
27808   # Check if we need to convert this using DOS-style short mode. If the path
27809   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27810   # take no chances and rewrite it.
27811   # Note: m4 eats our [], so we need to use [ and ] instead.
27812   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27813   if test "x$has_forbidden_chars" != x; then
27814     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27815     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27816   fi
27817 
27818     # Output is in $new_path
27819 
27820   windows_path="$new_path"
27821   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27822     unix_path=`$CYGPATH -u "$windows_path"`
27823     new_path="$unix_path"
27824   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27825     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27826     new_path="$unix_path"
27827   fi
27828 
27829     # remove trailing .exe if any
27830     new_path="${new_path/%.exe/}"
27831 
27832     # Save the first 10 bytes of this path to the storage, so fixpath can work.
27833     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27834   fi
27835 
27836   else
27837     # We're on a posix platform. Hooray! :)
27838     # First separate the path from the arguments. This will split at the first
27839     # space.
27840     complete="$OBJDUMP"
27841     path="${complete%% *}"
27842     tmp="$complete EOL"
27843     arguments="${tmp#* }"
27844 
27845     # Cannot rely on the command "which" here since it doesn't always work.
27846     is_absolute_path=`$ECHO "$path" | $GREP ^/`
27847     if test -z "$is_absolute_path"; then
27848       # Path to executable is not absolute. Find it.
27849       IFS_save="$IFS"
27850       IFS=:
27851       for p in $PATH; do
27852         if test -f "$p/$path" && test -x "$p/$path"; then
27853           new_path="$p/$path"
27854           break
27855         fi
27856       done
27857       IFS="$IFS_save"
27858     else
27859       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5
27860 $as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;}
27861       new_path="$path"
27862     fi
27863 
27864     if test "x$new_path" = x; then
27865         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
27866 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
27867         has_space=`$ECHO "$complete" | $GREP " "`
27868         if test "x$has_space" != x; then
27869           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27870 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27871         fi
27872         as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27873       fi
27874   fi
27875 
27876       # Now join together the path and the arguments once again
27877       if test "x$arguments" != xEOL; then
27878         new_complete="$new_path ${arguments% *}"
27879       else
27880         new_complete="$new_path"
27881       fi
27882 
27883   if test "x$complete" != "x$new_complete"; then
27884       OBJDUMP="$new_complete"
27885       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
27886 $as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
27887     fi
27888 
27889 fi
27890 
27891 if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
27892    # Extract the first word of "lipo", so it can be a program name with args.
27893 set dummy lipo; ac_word=$2
27894 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27895 $as_echo_n "checking for $ac_word... " >&6; }
27896 if test "${ac_cv_path_LIPO+set}" = set; then :
27897   $as_echo_n "(cached) " >&6
27898 else
27899   case $LIPO in
27900   [\\/]* | ?:[\\/]*)
27901   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
27902   ;;
27903   *)
27904   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27905 for as_dir in $PATH
27906 do
27907   IFS=$as_save_IFS
27908   test -z "$as_dir" && as_dir=.
27909     for ac_exec_ext in '' $ac_executable_extensions; do
27910   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27911     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
27912     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27913     break 2
27914   fi
27915 done
27916   done
27917 IFS=$as_save_IFS
27918 
27919   ;;
27920 esac
27921 fi
27922 LIPO=$ac_cv_path_LIPO
27923 if test -n "$LIPO"; then
27924   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
27925 $as_echo "$LIPO" >&6; }
27926 else
27927   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27928 $as_echo "no" >&6; }
27929 fi
27930 
27931 
27932 
27933   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27934 
27935   # First separate the path from the arguments. This will split at the first
27936   # space.
27937   complete="$LIPO"
27938   path="${complete%% *}"
27939   tmp="$complete EOL"
27940   arguments="${tmp#* }"
27941 
27942   # Input might be given as Windows format, start by converting to
27943   # unix format.
27944   new_path=`$CYGPATH -u "$path"`
27945 
27946   # Now try to locate executable using which
27947   new_path=`$WHICH "$new_path" 2> /dev/null`
27948   # bat and cmd files are not always considered executable in cygwin causing which
27949   # to not find them
27950   if test "x$new_path" = x \
27951            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27952            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27953     new_path=`$CYGPATH -u "$path"`
27954   fi
27955   if test "x$new_path" = x; then
27956     # Oops. Which didn't find the executable.
27957     # The splitting of arguments from the executable at a space might have been incorrect,
27958     # since paths with space are more likely in Windows. Give it another try with the whole
27959     # argument.
27960     path="$complete"
27961     arguments="EOL"
27962     new_path=`$CYGPATH -u "$path"`
27963     new_path=`$WHICH "$new_path" 2> /dev/null`
27964     # bat and cmd files are not always considered executable in cygwin causing which
27965     # to not find them
27966     if test "x$new_path" = x \
27967              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27968              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27969       new_path=`$CYGPATH -u "$path"`
27970     fi
27971     if test "x$new_path" = x; then
27972       # It's still not found. Now this is an unrecoverable error.
27973       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27974 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27975       has_space=`$ECHO "$complete" | $GREP " "`
27976       if test "x$has_space" != x; then
27977         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27978 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27979       fi
27980       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27981     fi
27982   fi
27983 
27984   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27985   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27986   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27987   # "foo.exe" is OK but "foo" is an error.
27988   #
27989   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27990   # It is also a way to make sure we got the proper file name for the real test later on.
27991   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27992   if test "x$test_shortpath" = x; then
27993     # Short path failed, file does not exist as specified.
27994     # Try adding .exe or .cmd
27995     if test -f "${new_path}.exe"; then
27996        input_to_shortpath="${new_path}.exe"
27997     elif test -f "${new_path}.cmd"; then
27998        input_to_shortpath="${new_path}.cmd"
27999     else
28000       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
28001 $as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
28002       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28003 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28004       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28005     fi
28006   else
28007     input_to_shortpath="$new_path"
28008   fi
28009 
28010   # Call helper function which possibly converts this using DOS-style short mode.
28011   # If so, the updated path is stored in $new_path.
28012   new_path="$input_to_shortpath"
28013 
28014   input_path="$input_to_shortpath"
28015   # Check if we need to convert this using DOS-style short mode. If the path
28016   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28017   # take no chances and rewrite it.
28018   # Note: m4 eats our [], so we need to use [ and ] instead.
28019   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28020   if test "x$has_forbidden_chars" != x; then
28021     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28022     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28023     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28024     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28025       # Going to short mode and back again did indeed matter. Since short mode is
28026       # case insensitive, let's make it lowercase to improve readability.
28027       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28028       # Now convert it back to Unix-stile (cygpath)
28029       input_path=`$CYGPATH -u "$shortmode_path"`
28030       new_path="$input_path"
28031     fi
28032   fi
28033 
28034   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28035   if test "x$test_cygdrive_prefix" = x; then
28036     # As a simple fix, exclude /usr/bin since it's not a real path.
28037     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28038       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28039       # a path prefixed by /cygdrive for fixpath to work.
28040       new_path="$CYGWIN_ROOT_PATH$input_path"
28041     fi
28042   fi
28043 
28044   # remove trailing .exe if any
28045   new_path="${new_path/%.exe/}"
28046 
28047   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28048 
28049   # First separate the path from the arguments. This will split at the first
28050   # space.
28051   complete="$LIPO"
28052   path="${complete%% *}"
28053   tmp="$complete EOL"
28054   arguments="${tmp#* }"
28055 
28056   # Input might be given as Windows format, start by converting to
28057   # unix format.
28058   new_path="$path"
28059 
28060   windows_path="$new_path"
28061   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28062     unix_path=`$CYGPATH -u "$windows_path"`
28063     new_path="$unix_path"
28064   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28065     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28066     new_path="$unix_path"
28067   fi
28068 
28069 
28070   # Now try to locate executable using which
28071   new_path=`$WHICH "$new_path" 2> /dev/null`
28072 
28073   if test "x$new_path" = x; then
28074     # Oops. Which didn't find the executable.
28075     # The splitting of arguments from the executable at a space might have been incorrect,
28076     # since paths with space are more likely in Windows. Give it another try with the whole
28077     # argument.
28078     path="$complete"
28079     arguments="EOL"
28080     new_path="$path"
28081 
28082   windows_path="$new_path"
28083   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28084     unix_path=`$CYGPATH -u "$windows_path"`
28085     new_path="$unix_path"
28086   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28087     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28088     new_path="$unix_path"
28089   fi
28090 
28091 
28092     new_path=`$WHICH "$new_path" 2> /dev/null`
28093 
28094     if test "x$new_path" = x; then
28095       # It's still not found. Now this is an unrecoverable error.
28096       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28097 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28098       has_space=`$ECHO "$complete" | $GREP " "`
28099       if test "x$has_space" != x; then
28100         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28101 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28102       fi
28103       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28104     fi
28105   fi
28106 
28107   # Now new_path has a complete unix path to the binary
28108   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28109     # Keep paths in /bin as-is, but remove trailing .exe if any
28110     new_path="${new_path/%.exe/}"
28111     # Do not save /bin paths to all_fixpath_prefixes!
28112   else
28113     # Not in mixed or Windows style, start by that.
28114     new_path=`cmd //c echo $new_path`
28115 
28116   input_path="$new_path"
28117   # Check if we need to convert this using DOS-style short mode. If the path
28118   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28119   # take no chances and rewrite it.
28120   # Note: m4 eats our [], so we need to use [ and ] instead.
28121   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28122   if test "x$has_forbidden_chars" != x; then
28123     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28124     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28125   fi
28126 
28127     # Output is in $new_path
28128 
28129   windows_path="$new_path"
28130   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28131     unix_path=`$CYGPATH -u "$windows_path"`
28132     new_path="$unix_path"
28133   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28134     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28135     new_path="$unix_path"
28136   fi
28137 
28138     # remove trailing .exe if any
28139     new_path="${new_path/%.exe/}"
28140 
28141     # Save the first 10 bytes of this path to the storage, so fixpath can work.
28142     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28143   fi
28144 
28145   else
28146     # We're on a posix platform. Hooray! :)
28147     # First separate the path from the arguments. This will split at the first
28148     # space.
28149     complete="$LIPO"
28150     path="${complete%% *}"
28151     tmp="$complete EOL"
28152     arguments="${tmp#* }"
28153 
28154     # Cannot rely on the command "which" here since it doesn't always work.
28155     is_absolute_path=`$ECHO "$path" | $GREP ^/`
28156     if test -z "$is_absolute_path"; then
28157       # Path to executable is not absolute. Find it.
28158       IFS_save="$IFS"
28159       IFS=:
28160       for p in $PATH; do
28161         if test -f "$p/$path" && test -x "$p/$path"; then
28162           new_path="$p/$path"
28163           break
28164         fi
28165       done
28166       IFS="$IFS_save"
28167     else
28168       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5
28169 $as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;}
28170       new_path="$path"
28171     fi
28172 
28173     if test "x$new_path" = x; then
28174         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28175 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28176         has_space=`$ECHO "$complete" | $GREP " "`
28177         if test "x$has_space" != x; then
28178           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28179 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28180         fi
28181         as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28182       fi
28183   fi
28184 
28185       # Now join together the path and the arguments once again
28186       if test "x$arguments" != xEOL; then
28187         new_complete="$new_path ${arguments% *}"
28188       else
28189         new_complete="$new_path"
28190       fi
28191 
28192   if test "x$complete" != "x$new_complete"; then
28193       LIPO="$new_complete"
28194       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
28195 $as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
28196     fi
28197 
28198 fi
28199 
28200 # Restore old path without tools dir
28201 PATH="$OLD_PATH"
28202 
28203 
28204 # FIXME: Currently we must test this after paths but before flags. Fix!
28205 
28206 # And we can test some aspects on the target using configure macros.
28207 
28208 
28209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
28210 $as_echo_n "checking for ANSI C header files... " >&6; }
28211 if test "${ac_cv_header_stdc+set}" = set; then :
28212   $as_echo_n "(cached) " >&6
28213 else
28214   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28215 /* end confdefs.h.  */
28216 #include <stdlib.h>
28217 #include <stdarg.h>
28218 #include <string.h>
28219 #include <float.h>
28220 
28221 int
28222 main ()
28223 {
28224 
28225   ;
28226   return 0;
28227 }
28228 _ACEOF
28229 if ac_fn_cxx_try_compile "$LINENO"; then :
28230   ac_cv_header_stdc=yes
28231 else
28232   ac_cv_header_stdc=no
28233 fi
28234 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28235 
28236 if test $ac_cv_header_stdc = yes; then
28237   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
28238   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28239 /* end confdefs.h.  */
28240 #include <string.h>
28241 
28242 _ACEOF
28243 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28244   $EGREP "memchr" >/dev/null 2>&1; then :
28245 
28246 else
28247   ac_cv_header_stdc=no
28248 fi
28249 rm -f conftest*
28250 
28251 fi
28252 
28253 if test $ac_cv_header_stdc = yes; then
28254   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
28255   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28256 /* end confdefs.h.  */
28257 #include <stdlib.h>
28258 
28259 _ACEOF
28260 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28261   $EGREP "free" >/dev/null 2>&1; then :
28262 
28263 else
28264   ac_cv_header_stdc=no
28265 fi
28266 rm -f conftest*
28267 
28268 fi
28269 
28270 if test $ac_cv_header_stdc = yes; then
28271   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
28272   if test "$cross_compiling" = yes; then :
28273   :
28274 else
28275   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28276 /* end confdefs.h.  */
28277 #include <ctype.h>
28278 #include <stdlib.h>
28279 #if ((' ' & 0x0FF) == 0x020)
28280 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
28281 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
28282 #else
28283 # define ISLOWER(c) \
28284                    (('a' <= (c) && (c) <= 'i') \
28285                      || ('j' <= (c) && (c) <= 'r') \
28286                      || ('s' <= (c) && (c) <= 'z'))
28287 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
28288 #endif
28289 
28290 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
28291 int
28292 main ()
28293 {
28294   int i;
28295   for (i = 0; i < 256; i++)
28296     if (XOR (islower (i), ISLOWER (i))
28297         || toupper (i) != TOUPPER (i))
28298       return 2;
28299   return 0;
28300 }
28301 _ACEOF
28302 if ac_fn_cxx_try_run "$LINENO"; then :
28303 
28304 else
28305   ac_cv_header_stdc=no
28306 fi
28307 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28308   conftest.$ac_objext conftest.beam conftest.$ac_ext
28309 fi
28310 
28311 fi
28312 fi
28313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
28314 $as_echo "$ac_cv_header_stdc" >&6; }
28315 if test $ac_cv_header_stdc = yes; then
28316 
28317 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
28318 
28319 fi
28320 
28321 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
28322 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
28323                   inttypes.h stdint.h unistd.h
28324 do :
28325   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
28326 ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
28327 "
28328 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
28329   cat >>confdefs.h <<_ACEOF
28330 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
28331 _ACEOF
28332 
28333 fi
28334 
28335 done
28336 
28337 
28338 
28339 ###############################################################################
28340 #
28341 # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
28342 # (The JVM can use 32 or 64 bit Java pointers but that decision
28343 # is made at runtime.)
28344 #
28345 
28346 if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28347   # Always specify -m flags on Solaris
28348 
28349   # keep track of c/cxx flags that we added outselves...
28350   #   to prevent emitting warning...
28351   ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28352   ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28353   ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28354 
28355   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
28356   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
28357   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
28358 
28359   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
28360   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
28361   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
28362 
28363 elif test "x$COMPILE_TYPE" = xreduced; then
28364   if test "x$OPENJDK_TARGET_OS" != xwindows; then
28365     # Specify -m if running reduced on other Posix platforms
28366 
28367   # keep track of c/cxx flags that we added outselves...
28368   #   to prevent emitting warning...
28369   ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28370   ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28371   ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28372 
28373   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
28374   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
28375   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
28376 
28377   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
28378   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
28379   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
28380 
28381   fi
28382 fi
28383 
28384 # Make compilation sanity check
28385 for ac_header in stdio.h
28386 do :
28387   ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
28388 if test "x$ac_cv_header_stdio_h" = x""yes; then :
28389   cat >>confdefs.h <<_ACEOF
28390 #define HAVE_STDIO_H 1
28391 _ACEOF
28392 
28393 else
28394 
28395   { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
28396 $as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
28397   if test "x$COMPILE_TYPE" = xreduced; then
28398     { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
28399 $as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
28400   elif test "x$COMPILE_TYPE" = xcross; then
28401     { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
28402 $as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
28403   fi
28404   as_fn_error $? "Cannot continue." "$LINENO" 5
28405 
28406 fi
28407 
28408 done
28409 
28410 
28411 # The cast to long int works around a bug in the HP C Compiler
28412 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
28413 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
28414 # This bug is HP SR number 8606223364.
28415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
28416 $as_echo_n "checking size of int *... " >&6; }
28417 if test "${ac_cv_sizeof_int_p+set}" = set; then :
28418   $as_echo_n "(cached) " >&6
28419 else
28420   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
28421 
28422 else
28423   if test "$ac_cv_type_int_p" = yes; then
28424      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28425 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28426 as_fn_error 77 "cannot compute sizeof (int *)
28427 See \`config.log' for more details" "$LINENO" 5 ; }
28428    else
28429      ac_cv_sizeof_int_p=0
28430    fi
28431 fi
28432 
28433 fi
28434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
28435 $as_echo "$ac_cv_sizeof_int_p" >&6; }
28436 
28437 
28438 
28439 cat >>confdefs.h <<_ACEOF
28440 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
28441 _ACEOF
28442 
28443 
28444 
28445 if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
28446   # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
28447   SIZEOF_INT_P="$ac_cv_sizeof_int_p"
28448 fi
28449 
28450 if test "x$SIZEOF_INT_P" = x; then
28451     # The test failed, lets stick to the assumed value.
28452     { $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
28453 $as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
28454 else
28455     TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
28456 
28457     if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
28458         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
28459     fi
28460 fi
28461 
28462 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
28463 $as_echo_n "checking for target address size... " >&6; }
28464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
28465 $as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
28466 
28467 
28468 ###############################################################################
28469 #
28470 # Is the target little of big endian?
28471 #
28472  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
28473 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
28474 if test "${ac_cv_c_bigendian+set}" = set; then :
28475   $as_echo_n "(cached) " >&6
28476 else
28477   ac_cv_c_bigendian=unknown
28478     # See if we're dealing with a universal compiler.
28479     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28480 /* end confdefs.h.  */
28481 #ifndef __APPLE_CC__
28482                not a universal capable compiler
28483              #endif
28484              typedef int dummy;
28485 
28486 _ACEOF
28487 if ac_fn_cxx_try_compile "$LINENO"; then :
28488 
28489         # Check for potential -arch flags.  It is not universal unless
28490         # there are at least two -arch flags with different values.
28491         ac_arch=
28492         ac_prev=
28493         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
28494          if test -n "$ac_prev"; then
28495            case $ac_word in
28496              i?86 | x86_64 | ppc | ppc64)
28497                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
28498                  ac_arch=$ac_word
28499                else
28500                  ac_cv_c_bigendian=universal
28501                  break
28502                fi
28503                ;;
28504            esac
28505            ac_prev=
28506          elif test "x$ac_word" = "x-arch"; then
28507            ac_prev=arch
28508          fi
28509        done
28510 fi
28511 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28512     if test $ac_cv_c_bigendian = unknown; then
28513       # See if sys/param.h defines the BYTE_ORDER macro.
28514       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28515 /* end confdefs.h.  */
28516 #include <sys/types.h>
28517              #include <sys/param.h>
28518 
28519 int
28520 main ()
28521 {
28522 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
28523                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
28524                      && LITTLE_ENDIAN)
28525               bogus endian macros
28526              #endif
28527 
28528   ;
28529   return 0;
28530 }
28531 _ACEOF
28532 if ac_fn_cxx_try_compile "$LINENO"; then :
28533   # It does; now see whether it defined to BIG_ENDIAN or not.
28534          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28535 /* end confdefs.h.  */
28536 #include <sys/types.h>
28537                 #include <sys/param.h>
28538 
28539 int
28540 main ()
28541 {
28542 #if BYTE_ORDER != BIG_ENDIAN
28543                  not big endian
28544                 #endif
28545 
28546   ;
28547   return 0;
28548 }
28549 _ACEOF
28550 if ac_fn_cxx_try_compile "$LINENO"; then :
28551   ac_cv_c_bigendian=yes
28552 else
28553   ac_cv_c_bigendian=no
28554 fi
28555 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28556 fi
28557 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28558     fi
28559     if test $ac_cv_c_bigendian = unknown; then
28560       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
28561       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28562 /* end confdefs.h.  */
28563 #include <limits.h>
28564 
28565 int
28566 main ()
28567 {
28568 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
28569               bogus endian macros
28570              #endif
28571 
28572   ;
28573   return 0;
28574 }
28575 _ACEOF
28576 if ac_fn_cxx_try_compile "$LINENO"; then :
28577   # It does; now see whether it defined to _BIG_ENDIAN or not.
28578          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28579 /* end confdefs.h.  */
28580 #include <limits.h>
28581 
28582 int
28583 main ()
28584 {
28585 #ifndef _BIG_ENDIAN
28586                  not big endian
28587                 #endif
28588 
28589   ;
28590   return 0;
28591 }
28592 _ACEOF
28593 if ac_fn_cxx_try_compile "$LINENO"; then :
28594   ac_cv_c_bigendian=yes
28595 else
28596   ac_cv_c_bigendian=no
28597 fi
28598 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28599 fi
28600 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28601     fi
28602     if test $ac_cv_c_bigendian = unknown; then
28603       # Compile a test program.
28604       if test "$cross_compiling" = yes; then :
28605   # Try to guess by grepping values from an object file.
28606          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28607 /* end confdefs.h.  */
28608 short int ascii_mm[] =
28609                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
28610                 short int ascii_ii[] =
28611                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
28612                 int use_ascii (int i) {
28613                   return ascii_mm[i] + ascii_ii[i];
28614                 }
28615                 short int ebcdic_ii[] =
28616                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
28617                 short int ebcdic_mm[] =
28618                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
28619                 int use_ebcdic (int i) {
28620                   return ebcdic_mm[i] + ebcdic_ii[i];
28621                 }
28622                 extern int foo;
28623 
28624 int
28625 main ()
28626 {
28627 return use_ascii (foo) == use_ebcdic (foo);
28628   ;
28629   return 0;
28630 }
28631 _ACEOF
28632 if ac_fn_cxx_try_compile "$LINENO"; then :
28633   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
28634               ac_cv_c_bigendian=yes
28635             fi
28636             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
28637               if test "$ac_cv_c_bigendian" = unknown; then
28638                 ac_cv_c_bigendian=no
28639               else
28640                 # finding both strings is unlikely to happen, but who knows?
28641                 ac_cv_c_bigendian=unknown
28642               fi
28643             fi
28644 fi
28645 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28646 else
28647   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28648 /* end confdefs.h.  */
28649 $ac_includes_default
28650 int
28651 main ()
28652 {
28653 
28654              /* Are we little or big endian?  From Harbison&Steele.  */
28655              union
28656              {
28657                long int l;
28658                char c[sizeof (long int)];
28659              } u;
28660              u.l = 1;
28661              return u.c[sizeof (long int) - 1] == 1;
28662 
28663   ;
28664   return 0;
28665 }
28666 _ACEOF
28667 if ac_fn_cxx_try_run "$LINENO"; then :
28668   ac_cv_c_bigendian=no
28669 else
28670   ac_cv_c_bigendian=yes
28671 fi
28672 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28673   conftest.$ac_objext conftest.beam conftest.$ac_ext
28674 fi
28675 
28676     fi
28677 fi
28678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
28679 $as_echo "$ac_cv_c_bigendian" >&6; }
28680  case $ac_cv_c_bigendian in #(
28681    yes)
28682      ENDIAN="big";; #(
28683    no)
28684      ENDIAN="little" ;; #(
28685    universal)
28686      ENDIAN="universal_endianness"
28687      ;; #(
28688    *)
28689      ENDIAN="unknown" ;;
28690  esac
28691 
28692 
28693 if test "x$ENDIAN" = xuniversal_endianness; then
28694     as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
28695 fi
28696 if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
28697     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
28698 fi
28699 
28700 
28701 # Configure flags for the tools
28702 
28703 
28704 ###############################################################################
28705 #
28706 # How to compile shared libraries.
28707 #
28708 
28709 if test "x$GCC" = xyes; then
28710     COMPILER_NAME=gcc
28711     PICFLAG="-fPIC"
28712     LIBRARY_PREFIX=lib
28713     SHARED_LIBRARY='lib$1.so'
28714     STATIC_LIBRARY='lib$1.a'
28715     SHARED_LIBRARY_FLAGS="-shared"
28716     SHARED_LIBRARY_SUFFIX='.so'
28717     STATIC_LIBRARY_SUFFIX='.a'
28718     OBJ_SUFFIX='.o'
28719     EXE_SUFFIX=''
28720     SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
28721     SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
28722     C_FLAG_REORDER=''
28723     CXX_FLAG_REORDER=''
28724     SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
28725     SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
28726     LD="$CC"
28727     LDEXE="$CC"
28728     LDCXX="$CXX"
28729     LDEXECXX="$CXX"
28730     POST_STRIP_CMD="$STRIP -g"
28731 
28732     # Linking is different on MacOSX
28733     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28734         # Might change in the future to clang.
28735         COMPILER_NAME=gcc
28736         SHARED_LIBRARY='lib$1.dylib'
28737         SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
28738         SHARED_LIBRARY_SUFFIX='.dylib'
28739         EXE_SUFFIX=''
28740         SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
28741         SET_SHARED_LIBRARY_MAPFILE=''
28742         SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
28743         SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
28744         POST_STRIP_CMD="$STRIP -S"
28745     fi
28746 else
28747     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28748         # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
28749         COMPILER_NAME=ossc
28750         PICFLAG="-KPIC"
28751         LIBRARY_PREFIX=lib
28752         SHARED_LIBRARY='lib$1.so'
28753         STATIC_LIBRARY='lib$1.a'
28754         SHARED_LIBRARY_FLAGS="-G"
28755         SHARED_LIBRARY_SUFFIX='.so'
28756         STATIC_LIBRARY_SUFFIX='.a'
28757         OBJ_SUFFIX='.o'
28758         EXE_SUFFIX=''
28759         SET_SHARED_LIBRARY_NAME=''
28760         SET_SHARED_LIBRARY_MAPFILE='-M$1'
28761         C_FLAG_REORDER='-xF'
28762         CXX_FLAG_REORDER='-xF'
28763         SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
28764         SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
28765         CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
28766         CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
28767         CFLAGS_JDKLIB_EXTRA='-xstrconst'
28768         POST_STRIP_CMD="$STRIP -x"
28769         POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
28770     fi
28771     if test "x$OPENJDK_TARGET_OS" = xwindows; then
28772         # If it is not gcc, then assume it is the MS Visual Studio compiler
28773         COMPILER_NAME=cl
28774         PICFLAG=""
28775         LIBRARY_PREFIX=
28776         SHARED_LIBRARY='$1.dll'
28777         STATIC_LIBRARY='$1.lib'
28778         SHARED_LIBRARY_FLAGS="-LD"
28779         SHARED_LIBRARY_SUFFIX='.dll'
28780         STATIC_LIBRARY_SUFFIX='.lib'
28781         OBJ_SUFFIX='.obj'
28782         EXE_SUFFIX='.exe'
28783         SET_SHARED_LIBRARY_NAME=''
28784         SET_SHARED_LIBRARY_MAPFILE=''
28785         SET_SHARED_LIBRARY_ORIGIN=''
28786         SET_EXECUTABLE_ORIGIN=''
28787     fi
28788 fi
28789 
28790 
28791 
28792 
28793 
28794 
28795 
28796 
28797 
28798 
28799 
28800 
28801 
28802 
28803 
28804 
28805 
28806 
28807 
28808 # The (cross) compiler is now configured, we can now test capabilities
28809 # of the target platform.
28810 
28811 
28812 
28813 ###############################################################################
28814 #
28815 # Setup the opt flags for different compilers
28816 # and different operating systems.
28817 #
28818 
28819 #
28820 # NOTE: check for -mstackrealign needs to be below potential addition of -m32
28821 #
28822 if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
28823     # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
28824     # While waiting for a better solution, the current workaround is to use -mstackrealign.
28825     CFLAGS="$CFLAGS -mstackrealign"
28826     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
28827 $as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
28828     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28829 /* end confdefs.h.  */
28830 int main() { return 0; }
28831 _ACEOF
28832 if ac_fn_cxx_try_link "$LINENO"; then :
28833 
28834                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28835 $as_echo "yes" >&6; }
28836 
28837 else
28838 
28839                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28840 $as_echo "no" >&6; }
28841                         as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
28842 
28843 fi
28844 rm -f core conftest.err conftest.$ac_objext \
28845     conftest$ac_exeext conftest.$ac_ext
28846 fi
28847 
28848 C_FLAG_DEPS="-MMD -MF"
28849 CXX_FLAG_DEPS="-MMD -MF"
28850 
28851 case $COMPILER_TYPE in
28852   CC )
28853     D_FLAG="-g"
28854     case $COMPILER_NAME in
28855       gcc )
28856         case $OPENJDK_TARGET_OS in
28857           macosx )
28858             # On MacOSX we optimize for size, something
28859             # we should do for all platforms?
28860             C_O_FLAG_HI="-Os"
28861             C_O_FLAG_NORM="-Os"
28862             C_O_FLAG_NONE=""
28863             ;;
28864           *)
28865             C_O_FLAG_HI="-O3"
28866             C_O_FLAG_NORM="-O2"
28867             C_O_FLAG_NONE="-O0"
28868             CFLAGS_DEBUG_SYMBOLS="-g"
28869             CXXFLAGS_DEBUG_SYMBOLS="-g"
28870             if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
28871                CFLAGS_DEBUG_SYMBOLS="-g1"
28872                CXXFLAGS_DEBUG_SYMBOLS="-g1"
28873             fi
28874             ;;
28875         esac
28876         CXX_O_FLAG_HI="$C_O_FLAG_HI"
28877         CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
28878         CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
28879         ;;
28880       ossc )
28881         #
28882         # Forte has different names for this with their C++ compiler...
28883         #
28884         C_FLAG_DEPS="-xMMD -xMF"
28885         CXX_FLAG_DEPS="-xMMD -xMF"
28886 
28887         # Extra options used with HIGHEST
28888         #
28889         # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
28890         #          done with care, there are some assumptions below that need to
28891         #          be understood about the use of pointers, and IEEE behavior.
28892         #
28893         # Use non-standard floating point mode (not IEEE 754)
28894         CC_HIGHEST="$CC_HIGHEST -fns"
28895         # Do some simplification of floating point arithmetic (not IEEE 754)
28896         CC_HIGHEST="$CC_HIGHEST -fsimple"
28897         # Use single precision floating point with 'float'
28898         CC_HIGHEST="$CC_HIGHEST -fsingle"
28899         # Assume memory references via basic pointer types do not alias
28900         #   (Source with excessing pointer casting and data access with mixed
28901         #    pointer types are not recommended)
28902         CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
28903         # Use intrinsic or inline versions for math/std functions
28904         #   (If you expect perfect errno behavior, do not use this)
28905         CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
28906         # Loop data dependency optimizations (need -xO3 or higher)
28907         CC_HIGHEST="$CC_HIGHEST -xdepend"
28908         # Pointer parameters to functions do not overlap
28909         #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
28910         #    If you pass in multiple pointers to the same data, do not use this)
28911         CC_HIGHEST="$CC_HIGHEST -xrestrict"
28912         # Inline some library routines
28913         #   (If you expect perfect errno behavior, do not use this)
28914         CC_HIGHEST="$CC_HIGHEST -xlibmil"
28915         # Use optimized math routines
28916         #   (If you expect perfect errno behavior, do not use this)
28917         #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
28918         #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
28919 
28920         if test "x$OPENJDK_TARGET_CPU" = xsparc; then
28921           CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
28922           CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
28923         fi
28924 
28925         case $OPENJDK_TARGET_CPU_ARCH in
28926           x86)
28927             C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
28928             C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
28929             C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
28930             C_O_FLAG_NONE="-xregs=no%frameptr"
28931             CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
28932             CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
28933             CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
28934             CXX_O_FLAG_NONE="-xregs=no%frameptr"
28935             if test "x$OPENJDK_TARGET_CPU" = xx86; then
28936                C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
28937                CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
28938             fi
28939             ;;
28940           sparc)
28941             CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
28942             CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
28943             C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
28944             C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
28945             C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
28946             C_O_FLAG_NONE=""
28947             CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
28948             CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
28949             CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
28950             CXX_O_FLAG_NONE=""
28951             ;;
28952         esac
28953 
28954     CFLAGS_DEBUG_SYMBOLS="-g -xs"
28955     CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
28956     esac
28957     ;;
28958   CL )
28959     D_FLAG=
28960     C_O_FLAG_HIGHEST="-O2"
28961     C_O_FLAG_HI="-O1"
28962     C_O_FLAG_NORM="-O1"
28963     C_O_FLAG_NONE="-Od"
28964     CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
28965     CXX_O_FLAG_HI="$C_O_FLAG_HI"
28966     CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
28967     CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
28968     ;;
28969 esac
28970 
28971 if test -z "$C_O_FLAG_HIGHEST"; then
28972    C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
28973 fi
28974 
28975 if test -z "$CXX_O_FLAG_HIGHEST"; then
28976    CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
28977 fi
28978 
28979 
28980 
28981 
28982 
28983 
28984 
28985 
28986 
28987 
28988 
28989 
28990 
28991 
28992 if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
28993    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
28994 $as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
28995 fi
28996 
28997 if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
28998    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
28999 $as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
29000 fi
29001 
29002 if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
29003    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
29004 $as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
29005 fi
29006 
29007 
29008 # Check whether --with-extra-cflags was given.
29009 if test "${with_extra_cflags+set}" = set; then :
29010   withval=$with_extra_cflags;
29011 fi
29012 
29013 
29014 
29015 # Check whether --with-extra-cxxflags was given.
29016 if test "${with_extra_cxxflags+set}" = set; then :
29017   withval=$with_extra_cxxflags;
29018 fi
29019 
29020 
29021 
29022 # Check whether --with-extra-ldflags was given.
29023 if test "${with_extra_ldflags+set}" = set; then :
29024   withval=$with_extra_ldflags;
29025 fi
29026 
29027 
29028 CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
29029 CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
29030 LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
29031 
29032 # Hotspot needs these set in their legacy form
29033 LEGACY_EXTRA_CFLAGS=$with_extra_cflags
29034 LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
29035 LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
29036 
29037 
29038 
29039 
29040 
29041 ###############################################################################
29042 #
29043 # Now setup the CFLAGS and LDFLAGS for the JDK build.
29044 # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
29045 #
29046 case $COMPILER_NAME in
29047       gcc )
29048           CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
29049                           -pipe \
29050                           -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
29051           case $OPENJDK_TARGET_CPU_ARCH in
29052           arm )
29053             # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
29054             CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29055           ;;
29056           ppc )
29057             # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
29058           ;;
29059           * )
29060             CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
29061             CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29062           ;;
29063           esac
29064           ;;
29065       ossc )
29066           CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
29067           case $OPENJDK_TARGET_CPU_ARCH in
29068           x86 )
29069             CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
29070             CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
29071           ;;
29072           esac
29073 
29074           CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
29075           CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
29076 
29077           LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
29078           LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
29079           ;;
29080       cl )
29081           CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
29082                -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
29083                -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
29084                -DWIN32 -DIAL"
29085           case $OPENJDK_TARGET_CPU in
29086               x86 )
29087                   CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
29088                   ;;
29089               x86_64 )
29090                   CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
29091                   ;;
29092           esac
29093           ;;
29094 esac
29095 
29096 ###############################################################################
29097 
29098 CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
29099 
29100 # The package path is used only on macosx?
29101 PACKAGE_PATH=/opt/local
29102 
29103 
29104 if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
29105     # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
29106     #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
29107     #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
29108     #   Note: -Dmacro         is the same as    #define macro 1
29109     #         -Dmacro=      is the same as    #define macro
29110     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29111         CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
29112     else
29113         CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
29114     fi
29115 else
29116     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
29117 fi
29118 if test "x$OPENJDK_TARGET_OS" = xlinux; then
29119     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
29120 fi
29121 if test "x$OPENJDK_TARGET_OS" = xwindows; then
29122     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
29123 fi
29124 if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29125     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
29126 fi
29127 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29128     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE"
29129     # Setting these parameters makes it an error to link to macosx APIs that are
29130     # newer than the given OS version and makes the linked binaries compatible even
29131     # if built on a newer version of the OS.
29132     # The expected format is X.Y.Z
29133     MACOSX_VERSION_MIN=10.7.0
29134 
29135     # The macro takes the version with no dots, ex: 1070
29136     # Let the flags variables get resolved in make for easier override on make
29137     # command line.
29138     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29139     LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29140 fi
29141 if test "x$OPENJDK_TARGET_OS" = xbsd; then
29142     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
29143 fi
29144 if test "x$DEBUG_LEVEL" = xrelease; then
29145     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
29146     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29147         CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
29148     fi
29149 else
29150     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
29151 fi
29152 
29153 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
29154 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
29155 
29156 CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
29157         -I${JDK_OUTPUTDIR}/include \
29158         -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
29159         -I${JDK_TOPDIR}/src/share/javavm/export \
29160         -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/javavm/export \
29161         -I${JDK_TOPDIR}/src/share/native/common \
29162         -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
29163 
29164 # The shared libraries are compiled using the picflag.
29165 CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
29166 CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
29167 
29168 # Executable flags
29169 CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
29170 CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
29171 
29172 # Now this is odd. The JDK native libraries have to link against libjvm.so
29173 # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
29174 # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
29175 # is identical for client and server? Yes. Which is picked at runtime (client or server)?
29176 # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
29177 # libraries will link to whatever is in memory. Yuck.
29178 #
29179 # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
29180 if test "x$COMPILER_NAME" = xcl; then
29181     LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
29182     if test "x$OPENJDK_TARGET_CPU" = xx86; then
29183         LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
29184     fi
29185     # TODO: make -debug optional "--disable-full-debug-symbols"
29186     LDFLAGS_JDK="$LDFLAGS_JDK -debug"
29187     LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
29188     LDFLAGS_JDKLIB_SUFFIX=""
29189     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
29190         LDFLAGS_STACK_SIZE=1048576
29191     else
29192         LDFLAGS_STACK_SIZE=327680
29193     fi
29194     LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
29195 else
29196     if test "x$COMPILER_NAME" = xgcc; then
29197         # If this is a --hash-style=gnu system, use --hash-style=both, why?
29198         HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
29199         if test -n "$HAS_GNU_HASH"; then
29200             LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
29201         fi
29202         if test "x$OPENJDK_TARGET_OS" = xlinux; then
29203           # And since we now know that the linker is gnu, then add -z defs, to forbid
29204           # undefined symbols in object files.
29205           LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
29206           if test "x$DEBUG_LEVEL" = "xrelease"; then
29207               # When building release libraries, tell the linker optimize them.
29208               # Should this be supplied to the OSS linker as well?
29209               LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
29210           fi
29211         fi
29212     fi
29213     LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
29214                     -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
29215 
29216     # On some platforms (mac) the linker warns about non existing -L dirs.
29217     # Add server first if available. Linking aginst client does not always produce the same results.
29218     # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
29219     # Default to server for other variants.
29220     if test "x$JVM_VARIANT_SERVER" = xtrue; then
29221         LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29222     elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
29223         LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
29224     elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
29225         LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
29226     else
29227         LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29228     fi
29229 
29230     LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
29231     if test "x$COMPILER_NAME" = xossc; then
29232         LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
29233     fi
29234 
29235     LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
29236     if test "x$OPENJDK_TARGET_OS" = xlinux; then
29237         LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
29238     fi
29239 fi
29240 
29241 # Adjust flags according to debug level.
29242 case $DEBUG_LEVEL in
29243       fastdebug )
29244               CFLAGS="$CFLAGS $D_FLAG"
29245               JAVAC_FLAGS="$JAVAC_FLAGS -g"
29246               ;;
29247       slowdebug )
29248               CFLAGS="$CFLAGS $D_FLAG"
29249               C_O_FLAG_HI="$C_O_FLAG_NONE"
29250               C_O_FLAG_NORM="$C_O_FLAG_NONE"
29251               CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
29252               CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
29253               JAVAC_FLAGS="$JAVAC_FLAGS -g"
29254               ;;
29255 esac
29256 
29257 
29258 
29259 
29260 
29261 
29262 
29263 
29264 
29265 
29266 
29267 
29268 
29269 
29270 
29271 
29272   # Some Zero and Shark settings.
29273   # ZERO_ARCHFLAG tells the compiler which mode to build for
29274   case "${OPENJDK_TARGET_CPU}" in
29275     s390)
29276       ZERO_ARCHFLAG="-m31"
29277       ;;
29278     *)
29279       ZERO_ARCHFLAG="-m${OPENJDK_TARGET_CPU_BITS}"
29280   esac
29281 
29282   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
29283 $as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
29284   supports=yes
29285 
29286   saved_cflags="$CFLAGS"
29287   CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
29288   ac_ext=c
29289 ac_cpp='$CPP $CPPFLAGS'
29290 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29291 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29292 ac_compiler_gnu=$ac_cv_c_compiler_gnu
29293 
29294   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29295 /* end confdefs.h.  */
29296 
29297     int i;
29298 
29299 _ACEOF
29300 if ac_fn_c_try_compile "$LINENO"; then :
29301 
29302 else
29303   supports=no
29304 fi
29305 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29306   ac_ext=cpp
29307 ac_cpp='$CXXCPP $CPPFLAGS'
29308 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29309 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29310 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29311 
29312   CFLAGS="$saved_cflags"
29313 
29314   saved_cxxflags="$CXXFLAGS"
29315   CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
29316   ac_ext=cpp
29317 ac_cpp='$CXXCPP $CPPFLAGS'
29318 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29319 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29320 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29321 
29322   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29323 /* end confdefs.h.  */
29324 
29325     int i;
29326 
29327 _ACEOF
29328 if ac_fn_cxx_try_compile "$LINENO"; then :
29329 
29330 else
29331   supports=no
29332 fi
29333 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29334   ac_ext=cpp
29335 ac_cpp='$CXXCPP $CPPFLAGS'
29336 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29337 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29338 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29339 
29340   CXXFLAGS="$saved_cxxflags"
29341 
29342   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
29343 $as_echo "$supports" >&6; }
29344   if test "x$supports" = "xyes" ; then
29345     :
29346   else
29347     ZERO_ARCHFLAG=""
29348   fi
29349 
29350 
29351 
29352   # Check that the compiler supports -mX flags
29353   # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
29354 
29355   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-m${OPENJDK_TARGET_CPU_BITS}\"" >&5
29356 $as_echo_n "checking if compiler supports \"-m${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
29357   supports=yes
29358 
29359   saved_cflags="$CFLAGS"
29360   CFLAGS="$CFLAGS -m${OPENJDK_TARGET_CPU_BITS}"
29361   ac_ext=c
29362 ac_cpp='$CPP $CPPFLAGS'
29363 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29364 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29365 ac_compiler_gnu=$ac_cv_c_compiler_gnu
29366 
29367   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29368 /* end confdefs.h.  */
29369 
29370     int i;
29371 
29372 _ACEOF
29373 if ac_fn_c_try_compile "$LINENO"; then :
29374 
29375 else
29376   supports=no
29377 fi
29378 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29379   ac_ext=cpp
29380 ac_cpp='$CXXCPP $CPPFLAGS'
29381 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29382 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29383 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29384 
29385   CFLAGS="$saved_cflags"
29386 
29387   saved_cxxflags="$CXXFLAGS"
29388   CXXFLAGS="$CXXFLAG -m${OPENJDK_TARGET_CPU_BITS}"
29389   ac_ext=cpp
29390 ac_cpp='$CXXCPP $CPPFLAGS'
29391 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29392 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29393 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29394 
29395   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29396 /* end confdefs.h.  */
29397 
29398     int i;
29399 
29400 _ACEOF
29401 if ac_fn_cxx_try_compile "$LINENO"; then :
29402 
29403 else
29404   supports=no
29405 fi
29406 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29407   ac_ext=cpp
29408 ac_cpp='$CXXCPP $CPPFLAGS'
29409 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29410 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29411 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29412 
29413   CXXFLAGS="$saved_cxxflags"
29414 
29415   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
29416 $as_echo "$supports" >&6; }
29417   if test "x$supports" = "xyes" ; then
29418     COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
29419   else
29420     COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
29421   fi
29422 
29423 
29424 
29425 
29426 # Setup debug symbols (need objcopy from the toolchain for that)
29427 
29428 #
29429 # ENABLE_DEBUG_SYMBOLS
29430 # This must be done after the toolchain is setup, since we're looking at objcopy.
29431 #
29432 # Check whether --enable-debug-symbols was given.
29433 if test "${enable_debug_symbols+set}" = set; then :
29434   enableval=$enable_debug_symbols;
29435 fi
29436 
29437 
29438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
29439 $as_echo_n "checking if we should generate debug symbols... " >&6; }
29440 
29441 if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
29442    # explicit enabling of enable-debug-symbols and can't find objcopy
29443    #   this is an error
29444    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
29445 fi
29446 
29447 if test "x$enable_debug_symbols" = "xyes"; then
29448   ENABLE_DEBUG_SYMBOLS=true
29449 elif test "x$enable_debug_symbols" = "xno"; then
29450   ENABLE_DEBUG_SYMBOLS=false
29451 else
29452   # default on macosx is false
29453   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29454     ENABLE_DEBUG_SYMBOLS=false
29455   # Default is on if objcopy is found, otherwise off
29456   elif test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
29457     ENABLE_DEBUG_SYMBOLS=true
29458   else
29459     ENABLE_DEBUG_SYMBOLS=false
29460   fi
29461 fi
29462 
29463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
29464 $as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
29465 
29466 #
29467 # ZIP_DEBUGINFO_FILES
29468 #
29469 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
29470 $as_echo_n "checking if we should zip debug-info files... " >&6; }
29471 # Check whether --enable-zip-debug-info was given.
29472 if test "${enable_zip_debug_info+set}" = set; then :
29473   enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
29474 else
29475   enable_zip_debug_info="yes"
29476 fi
29477 
29478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
29479 $as_echo "${enable_zip_debug_info}" >&6; }
29480 
29481 if test "x${enable_zip_debug_info}" = "xno"; then
29482    ZIP_DEBUGINFO_FILES=false
29483 else
29484    ZIP_DEBUGINFO_FILES=true
29485 fi
29486 
29487 
29488 
29489 
29490 
29491 
29492 
29493 ###############################################################################
29494 #
29495 # Check dependencies for external and internal libraries.
29496 #
29497 ###############################################################################
29498 
29499 
29500 
29501 ###############################################################################
29502 #
29503 # OS specific settings that we never will need to probe.
29504 #
29505 if test "x$OPENJDK_TARGET_OS" = xlinux; then
29506     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
29507 $as_echo_n "checking what is not needed on Linux?... " >&6; }
29508     PULSE_NOT_NEEDED=yes
29509     { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
29510 $as_echo "pulse" >&6; }
29511 fi
29512 
29513 if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29514     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
29515 $as_echo_n "checking what is not needed on Solaris?... " >&6; }
29516     ALSA_NOT_NEEDED=yes
29517     PULSE_NOT_NEEDED=yes
29518     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
29519 $as_echo "alsa pulse" >&6; }
29520 fi
29521 
29522 if test "x$OPENJDK_TARGET_OS" = xwindows; then
29523     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
29524 $as_echo_n "checking what is not needed on Windows?... " >&6; }
29525     CUPS_NOT_NEEDED=yes
29526     ALSA_NOT_NEEDED=yes
29527     PULSE_NOT_NEEDED=yes
29528     X11_NOT_NEEDED=yes
29529     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
29530 $as_echo "alsa cups pulse x11" >&6; }
29531 fi
29532 
29533 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29534     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
29535 $as_echo_n "checking what is not needed on MacOSX?... " >&6; }
29536     ALSA_NOT_NEEDED=yes
29537     PULSE_NOT_NEEDED=yes
29538     X11_NOT_NEEDED=yes
29539     FREETYPE2_NOT_NEEDED=yes
29540     # If the java runtime framework is disabled, then we need X11.
29541     # This will be adjusted below.
29542     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
29543 $as_echo "alsa pulse x11" >&6; }
29544 fi
29545 
29546 if test "x$OPENJDK_TARGET_OS" = xbsd; then
29547     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
29548 $as_echo_n "checking what is not needed on bsd?... " >&6; }
29549     ALSA_NOT_NEEDED=yes
29550     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
29551 $as_echo "alsa" >&6; }
29552 fi
29553 
29554 if test "x$OPENJDK" = "xfalse"; then
29555     FREETYPE2_NOT_NEEDED=yes
29556 fi
29557 
29558 if test "x$SUPPORT_HEADFUL" = xno; then
29559     X11_NOT_NEEDED=yes
29560 fi
29561 
29562 ###############################################################################
29563 #
29564 # Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
29565 # that uses this API.
29566 #
29567 # Check whether --enable-macosx-runtime-support was given.
29568 if test "${enable_macosx_runtime_support+set}" = set; then :
29569   enableval=$enable_macosx_runtime_support; MACOSX_RUNTIME_SUPPORT="${enableval}"
29570 else
29571   MACOSX_RUNTIME_SUPPORT="no"
29572 fi
29573 
29574 
29575 USE_MACOSX_RUNTIME_SUPPORT=no
29576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for explicit Java runtime support in the OS" >&5
29577 $as_echo_n "checking for explicit Java runtime support in the OS... " >&6; }
29578 if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
29579     if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
29580         MACOSX_RUNTIME_SUPPORT=yes
29581         USE_MACOSX_RUNTIME_SUPPORT=yes
29582         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, does not need alsa freetype2 pulse and X11" >&5
29583 $as_echo "yes, does not need alsa freetype2 pulse and X11" >&6; }
29584     else
29585         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, but explicitly disabled." >&5
29586 $as_echo "yes, but explicitly disabled." >&6; }
29587     fi
29588 else
29589     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29590 $as_echo "no" >&6; }
29591 fi
29592 
29593 if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
29594     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on an X11 build on MacOSX?" >&5
29595 $as_echo_n "checking what is not needed on an X11 build on MacOSX?... " >&6; }
29596     X11_NOT_NEEDED=
29597     FREETYPE2_NOT_NEEDED=
29598     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
29599 $as_echo "alsa pulse" >&6; }
29600 fi
29601 
29602 
29603 
29604 ###############################################################################
29605 #
29606 # Check for X Windows
29607 #
29608 
29609 # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
29610 # Make a simple check for the libraries at the sysroot, and setup --x-includes and
29611 # --x-libraries for the sysroot, if that seems to be correct.
29612 if test "x$SYS_ROOT" != "x/"; then
29613   if test "x$x_includes" = xNONE; then
29614     if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
29615       x_includes="$SYS_ROOT/usr/X11R6/include"
29616     fi
29617   fi
29618   if test "x$x_libraries" = xNONE; then
29619     if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
29620       x_libraries="$SYS_ROOT/usr/X11R6/lib"
29621     fi
29622   fi
29623 fi
29624 
29625 # Now let autoconf do it's magic
29626 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
29627 $as_echo_n "checking for X... " >&6; }
29628 
29629 
29630 # Check whether --with-x was given.
29631 if test "${with_x+set}" = set; then :
29632   withval=$with_x;
29633 fi
29634 
29635 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
29636 if test "x$with_x" = xno; then
29637   # The user explicitly disabled X.
29638   have_x=disabled
29639 else
29640   case $x_includes,$x_libraries in #(
29641     *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5 ;; #(
29642     *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
29643   $as_echo_n "(cached) " >&6
29644 else
29645   # One or both of the vars are not set, and there is no cached value.
29646 ac_x_includes=no ac_x_libraries=no
29647 rm -f -r conftest.dir
29648 if mkdir conftest.dir; then
29649   cd conftest.dir
29650   cat >Imakefile <<'_ACEOF'
29651 incroot:
29652         @echo incroot='${INCROOT}'
29653 usrlibdir:
29654         @echo usrlibdir='${USRLIBDIR}'
29655 libdir:
29656         @echo libdir='${LIBDIR}'
29657 _ACEOF
29658   if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
29659     # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
29660     for ac_var in incroot usrlibdir libdir; do
29661       eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
29662     done
29663     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
29664     for ac_extension in a so sl dylib la dll; do
29665       if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
29666          test -f "$ac_im_libdir/libX11.$ac_extension"; then
29667         ac_im_usrlibdir=$ac_im_libdir; break
29668       fi
29669     done
29670     # Screen out bogus values from the imake configuration.  They are
29671     # bogus both because they are the default anyway, and because
29672     # using them would break gcc on systems where it needs fixed includes.
29673     case $ac_im_incroot in
29674         /usr/include) ac_x_includes= ;;
29675         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
29676     esac
29677     case $ac_im_usrlibdir in
29678         /usr/lib | /usr/lib64 | /lib | /lib64) ;;
29679         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
29680     esac
29681   fi
29682   cd ..
29683   rm -f -r conftest.dir
29684 fi
29685 
29686 # Standard set of common directories for X headers.
29687 # Check X11 before X11Rn because it is often a symlink to the current release.
29688 ac_x_header_dirs='
29689 /usr/X11/include
29690 /usr/X11R7/include
29691 /usr/X11R6/include
29692 /usr/X11R5/include
29693 /usr/X11R4/include
29694 
29695 /usr/include/X11
29696 /usr/include/X11R7
29697 /usr/include/X11R6
29698 /usr/include/X11R5
29699 /usr/include/X11R4
29700 
29701 /usr/local/X11/include
29702 /usr/local/X11R7/include
29703 /usr/local/X11R6/include
29704 /usr/local/X11R5/include
29705 /usr/local/X11R4/include
29706 
29707 /usr/local/include/X11
29708 /usr/local/include/X11R7
29709 /usr/local/include/X11R6
29710 /usr/local/include/X11R5
29711 /usr/local/include/X11R4
29712 
29713 /usr/X386/include
29714 /usr/x386/include
29715 /usr/XFree86/include/X11
29716 
29717 /usr/include
29718 /usr/local/include
29719 /usr/unsupported/include
29720 /usr/athena/include
29721 /usr/local/x11r5/include
29722 /usr/lpp/Xamples/include
29723 
29724 /usr/openwin/include
29725 /usr/openwin/share/include'
29726 
29727 if test "$ac_x_includes" = no; then
29728   # Guess where to find include files, by looking for Xlib.h.
29729   # First, try using that file with no special directory specified.
29730   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29731 /* end confdefs.h.  */
29732 #include <X11/Xlib.h>
29733 _ACEOF
29734 if ac_fn_cxx_try_cpp "$LINENO"; then :
29735   # We can compile using X headers with no special include directory.
29736 ac_x_includes=
29737 else
29738   for ac_dir in $ac_x_header_dirs; do
29739   if test -r "$ac_dir/X11/Xlib.h"; then
29740     ac_x_includes=$ac_dir
29741     break
29742   fi
29743 done
29744 fi
29745 rm -f conftest.err conftest.i conftest.$ac_ext
29746 fi # $ac_x_includes = no
29747 
29748 if test "$ac_x_libraries" = no; then
29749   # Check for the libraries.
29750   # See if we find them without any special options.
29751   # Don't add to $LIBS permanently.
29752   ac_save_LIBS=$LIBS
29753   LIBS="-lX11 $LIBS"
29754   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29755 /* end confdefs.h.  */
29756 #include <X11/Xlib.h>
29757 int
29758 main ()
29759 {
29760 XrmInitialize ()
29761   ;
29762   return 0;
29763 }
29764 _ACEOF
29765 if ac_fn_cxx_try_link "$LINENO"; then :
29766   LIBS=$ac_save_LIBS
29767 # We can link X programs with no special library path.
29768 ac_x_libraries=
29769 else
29770   LIBS=$ac_save_LIBS
29771 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
29772 do
29773   # Don't even attempt the hair of trying to link an X program!
29774   for ac_extension in a so sl dylib la dll; do
29775     if test -r "$ac_dir/libX11.$ac_extension"; then
29776       ac_x_libraries=$ac_dir
29777       break 2
29778     fi
29779   done
29780 done
29781 fi
29782 rm -f core conftest.err conftest.$ac_objext \
29783     conftest$ac_exeext conftest.$ac_ext
29784 fi # $ac_x_libraries = no
29785 
29786 case $ac_x_includes,$ac_x_libraries in #(
29787   no,* | *,no | *\'*)
29788     # Didn't find X, or a directory has "'" in its name.
29789     ac_cv_have_x="have_x=no";; #(
29790   *)
29791     # Record where we found X for the cache.
29792     ac_cv_have_x="have_x=yes\
29793         ac_x_includes='$ac_x_includes'\
29794         ac_x_libraries='$ac_x_libraries'"
29795 esac
29796 fi
29797 ;; #(
29798     *) have_x=yes;;
29799   esac
29800   eval "$ac_cv_have_x"
29801 fi # $with_x != no
29802 
29803 if test "$have_x" != yes; then
29804   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
29805 $as_echo "$have_x" >&6; }
29806   no_x=yes
29807 else
29808   # If each of the values was on the command line, it overrides each guess.
29809   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
29810   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
29811   # Update the cache value to reflect the command line values.
29812   ac_cv_have_x="have_x=yes\
29813         ac_x_includes='$x_includes'\
29814         ac_x_libraries='$x_libraries'"
29815   { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
29816 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
29817 fi
29818 
29819 if test "$no_x" = yes; then
29820   # Not all programs may use this symbol, but it does not hurt to define it.
29821 
29822 $as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
29823 
29824   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
29825 else
29826   if test -n "$x_includes"; then
29827     X_CFLAGS="$X_CFLAGS -I$x_includes"
29828   fi
29829 
29830   # It would also be nice to do this for all -L options, not just this one.
29831   if test -n "$x_libraries"; then
29832     X_LIBS="$X_LIBS -L$x_libraries"
29833     # For Solaris; some versions of Sun CC require a space after -R and
29834     # others require no space.  Words are not sufficient . . . .
29835     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
29836 $as_echo_n "checking whether -R must be followed by a space... " >&6; }
29837     ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
29838     ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
29839     ac_cxx_werror_flag=yes
29840     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29841 /* end confdefs.h.  */
29842 
29843 int
29844 main ()
29845 {
29846 
29847   ;
29848   return 0;
29849 }
29850 _ACEOF
29851 if ac_fn_cxx_try_link "$LINENO"; then :
29852   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29853 $as_echo "no" >&6; }
29854        X_LIBS="$X_LIBS -R$x_libraries"
29855 else
29856   LIBS="$ac_xsave_LIBS -R $x_libraries"
29857        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29858 /* end confdefs.h.  */
29859 
29860 int
29861 main ()
29862 {
29863 
29864   ;
29865   return 0;
29866 }
29867 _ACEOF
29868 if ac_fn_cxx_try_link "$LINENO"; then :
29869   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29870 $as_echo "yes" >&6; }
29871           X_LIBS="$X_LIBS -R $x_libraries"
29872 else
29873   { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
29874 $as_echo "neither works" >&6; }
29875 fi
29876 rm -f core conftest.err conftest.$ac_objext \
29877     conftest$ac_exeext conftest.$ac_ext
29878 fi
29879 rm -f core conftest.err conftest.$ac_objext \
29880     conftest$ac_exeext conftest.$ac_ext
29881     ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
29882     LIBS=$ac_xsave_LIBS
29883   fi
29884 
29885   # Check for system-dependent libraries X programs must link with.
29886   # Do this before checking for the system-independent R6 libraries
29887   # (-lICE), since we may need -lsocket or whatever for X linking.
29888 
29889   if test "$ISC" = yes; then
29890     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
29891   else
29892     # Martyn Johnson says this is needed for Ultrix, if the X
29893     # libraries were built with DECnet support.  And Karl Berry says
29894     # the Alpha needs dnet_stub (dnet does not exist).
29895     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
29896     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29897 /* end confdefs.h.  */
29898 
29899 /* Override any GCC internal prototype to avoid an error.
29900    Use char because int might match the return type of a GCC
29901    builtin and then its argument prototype would still apply.  */
29902 #ifdef __cplusplus
29903 extern "C"
29904 #endif
29905 char XOpenDisplay ();
29906 int
29907 main ()
29908 {
29909 return XOpenDisplay ();
29910   ;
29911   return 0;
29912 }
29913 _ACEOF
29914 if ac_fn_cxx_try_link "$LINENO"; then :
29915 
29916 else
29917   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
29918 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
29919 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then :
29920   $as_echo_n "(cached) " >&6
29921 else
29922   ac_check_lib_save_LIBS=$LIBS
29923 LIBS="-ldnet  $LIBS"
29924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29925 /* end confdefs.h.  */
29926 
29927 /* Override any GCC internal prototype to avoid an error.
29928    Use char because int might match the return type of a GCC
29929    builtin and then its argument prototype would still apply.  */
29930 #ifdef __cplusplus
29931 extern "C"
29932 #endif
29933 char dnet_ntoa ();
29934 int
29935 main ()
29936 {
29937 return dnet_ntoa ();
29938   ;
29939   return 0;
29940 }
29941 _ACEOF
29942 if ac_fn_cxx_try_link "$LINENO"; then :
29943   ac_cv_lib_dnet_dnet_ntoa=yes
29944 else
29945   ac_cv_lib_dnet_dnet_ntoa=no
29946 fi
29947 rm -f core conftest.err conftest.$ac_objext \
29948     conftest$ac_exeext conftest.$ac_ext
29949 LIBS=$ac_check_lib_save_LIBS
29950 fi
29951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
29952 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
29953 if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then :
29954   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
29955 fi
29956 
29957     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
29958       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
29959 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
29960 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then :
29961   $as_echo_n "(cached) " >&6
29962 else
29963   ac_check_lib_save_LIBS=$LIBS
29964 LIBS="-ldnet_stub  $LIBS"
29965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29966 /* end confdefs.h.  */
29967 
29968 /* Override any GCC internal prototype to avoid an error.
29969    Use char because int might match the return type of a GCC
29970    builtin and then its argument prototype would still apply.  */
29971 #ifdef __cplusplus
29972 extern "C"
29973 #endif
29974 char dnet_ntoa ();
29975 int
29976 main ()
29977 {
29978 return dnet_ntoa ();
29979   ;
29980   return 0;
29981 }
29982 _ACEOF
29983 if ac_fn_cxx_try_link "$LINENO"; then :
29984   ac_cv_lib_dnet_stub_dnet_ntoa=yes
29985 else
29986   ac_cv_lib_dnet_stub_dnet_ntoa=no
29987 fi
29988 rm -f core conftest.err conftest.$ac_objext \
29989     conftest$ac_exeext conftest.$ac_ext
29990 LIBS=$ac_check_lib_save_LIBS
29991 fi
29992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
29993 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
29994 if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then :
29995   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
29996 fi
29997 
29998     fi
29999 fi
30000 rm -f core conftest.err conftest.$ac_objext \
30001     conftest$ac_exeext conftest.$ac_ext
30002     LIBS="$ac_xsave_LIBS"
30003 
30004     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
30005     # to get the SysV transport functions.
30006     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
30007     # needs -lnsl.
30008     # The nsl library prevents programs from opening the X display
30009     # on Irix 5.2, according to T.E. Dickey.
30010     # The functions gethostbyname, getservbyname, and inet_addr are
30011     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
30012     ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
30013 if test "x$ac_cv_func_gethostbyname" = x""yes; then :
30014 
30015 fi
30016 
30017     if test $ac_cv_func_gethostbyname = no; then
30018       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
30019 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
30020 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then :
30021   $as_echo_n "(cached) " >&6
30022 else
30023   ac_check_lib_save_LIBS=$LIBS
30024 LIBS="-lnsl  $LIBS"
30025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30026 /* end confdefs.h.  */
30027 
30028 /* Override any GCC internal prototype to avoid an error.
30029    Use char because int might match the return type of a GCC
30030    builtin and then its argument prototype would still apply.  */
30031 #ifdef __cplusplus
30032 extern "C"
30033 #endif
30034 char gethostbyname ();
30035 int
30036 main ()
30037 {
30038 return gethostbyname ();
30039   ;
30040   return 0;
30041 }
30042 _ACEOF
30043 if ac_fn_cxx_try_link "$LINENO"; then :
30044   ac_cv_lib_nsl_gethostbyname=yes
30045 else
30046   ac_cv_lib_nsl_gethostbyname=no
30047 fi
30048 rm -f core conftest.err conftest.$ac_objext \
30049     conftest$ac_exeext conftest.$ac_ext
30050 LIBS=$ac_check_lib_save_LIBS
30051 fi
30052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
30053 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
30054 if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then :
30055   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
30056 fi
30057 
30058       if test $ac_cv_lib_nsl_gethostbyname = no; then
30059         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
30060 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
30061 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then :
30062   $as_echo_n "(cached) " >&6
30063 else
30064   ac_check_lib_save_LIBS=$LIBS
30065 LIBS="-lbsd  $LIBS"
30066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30067 /* end confdefs.h.  */
30068 
30069 /* Override any GCC internal prototype to avoid an error.
30070    Use char because int might match the return type of a GCC
30071    builtin and then its argument prototype would still apply.  */
30072 #ifdef __cplusplus
30073 extern "C"
30074 #endif
30075 char gethostbyname ();
30076 int
30077 main ()
30078 {
30079 return gethostbyname ();
30080   ;
30081   return 0;
30082 }
30083 _ACEOF
30084 if ac_fn_cxx_try_link "$LINENO"; then :
30085   ac_cv_lib_bsd_gethostbyname=yes
30086 else
30087   ac_cv_lib_bsd_gethostbyname=no
30088 fi
30089 rm -f core conftest.err conftest.$ac_objext \
30090     conftest$ac_exeext conftest.$ac_ext
30091 LIBS=$ac_check_lib_save_LIBS
30092 fi
30093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
30094 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
30095 if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then :
30096   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
30097 fi
30098 
30099       fi
30100     fi
30101 
30102     # lieder@skyler.mavd.honeywell.com says without -lsocket,
30103     # socket/setsockopt and other routines are undefined under SCO ODT
30104     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
30105     # on later versions), says Simon Leinen: it contains gethostby*
30106     # variants that don't use the name server (or something).  -lsocket
30107     # must be given before -lnsl if both are needed.  We assume that
30108     # if connect needs -lnsl, so does gethostbyname.
30109     ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
30110 if test "x$ac_cv_func_connect" = x""yes; then :
30111 
30112 fi
30113 
30114     if test $ac_cv_func_connect = no; then
30115       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
30116 $as_echo_n "checking for connect in -lsocket... " >&6; }
30117 if test "${ac_cv_lib_socket_connect+set}" = set; then :
30118   $as_echo_n "(cached) " >&6
30119 else
30120   ac_check_lib_save_LIBS=$LIBS
30121 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
30122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30123 /* end confdefs.h.  */
30124 
30125 /* Override any GCC internal prototype to avoid an error.
30126    Use char because int might match the return type of a GCC
30127    builtin and then its argument prototype would still apply.  */
30128 #ifdef __cplusplus
30129 extern "C"
30130 #endif
30131 char connect ();
30132 int
30133 main ()
30134 {
30135 return connect ();
30136   ;
30137   return 0;
30138 }
30139 _ACEOF
30140 if ac_fn_cxx_try_link "$LINENO"; then :
30141   ac_cv_lib_socket_connect=yes
30142 else
30143   ac_cv_lib_socket_connect=no
30144 fi
30145 rm -f core conftest.err conftest.$ac_objext \
30146     conftest$ac_exeext conftest.$ac_ext
30147 LIBS=$ac_check_lib_save_LIBS
30148 fi
30149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
30150 $as_echo "$ac_cv_lib_socket_connect" >&6; }
30151 if test "x$ac_cv_lib_socket_connect" = x""yes; then :
30152   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
30153 fi
30154 
30155     fi
30156 
30157     # Guillermo Gomez says -lposix is necessary on A/UX.
30158     ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
30159 if test "x$ac_cv_func_remove" = x""yes; then :
30160 
30161 fi
30162 
30163     if test $ac_cv_func_remove = no; then
30164       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
30165 $as_echo_n "checking for remove in -lposix... " >&6; }
30166 if test "${ac_cv_lib_posix_remove+set}" = set; then :
30167   $as_echo_n "(cached) " >&6
30168 else
30169   ac_check_lib_save_LIBS=$LIBS
30170 LIBS="-lposix  $LIBS"
30171 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30172 /* end confdefs.h.  */
30173 
30174 /* Override any GCC internal prototype to avoid an error.
30175    Use char because int might match the return type of a GCC
30176    builtin and then its argument prototype would still apply.  */
30177 #ifdef __cplusplus
30178 extern "C"
30179 #endif
30180 char remove ();
30181 int
30182 main ()
30183 {
30184 return remove ();
30185   ;
30186   return 0;
30187 }
30188 _ACEOF
30189 if ac_fn_cxx_try_link "$LINENO"; then :
30190   ac_cv_lib_posix_remove=yes
30191 else
30192   ac_cv_lib_posix_remove=no
30193 fi
30194 rm -f core conftest.err conftest.$ac_objext \
30195     conftest$ac_exeext conftest.$ac_ext
30196 LIBS=$ac_check_lib_save_LIBS
30197 fi
30198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
30199 $as_echo "$ac_cv_lib_posix_remove" >&6; }
30200 if test "x$ac_cv_lib_posix_remove" = x""yes; then :
30201   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
30202 fi
30203 
30204     fi
30205 
30206     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
30207     ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
30208 if test "x$ac_cv_func_shmat" = x""yes; then :
30209 
30210 fi
30211 
30212     if test $ac_cv_func_shmat = no; then
30213       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
30214 $as_echo_n "checking for shmat in -lipc... " >&6; }
30215 if test "${ac_cv_lib_ipc_shmat+set}" = set; then :
30216   $as_echo_n "(cached) " >&6
30217 else
30218   ac_check_lib_save_LIBS=$LIBS
30219 LIBS="-lipc  $LIBS"
30220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30221 /* end confdefs.h.  */
30222 
30223 /* Override any GCC internal prototype to avoid an error.
30224    Use char because int might match the return type of a GCC
30225    builtin and then its argument prototype would still apply.  */
30226 #ifdef __cplusplus
30227 extern "C"
30228 #endif
30229 char shmat ();
30230 int
30231 main ()
30232 {
30233 return shmat ();
30234   ;
30235   return 0;
30236 }
30237 _ACEOF
30238 if ac_fn_cxx_try_link "$LINENO"; then :
30239   ac_cv_lib_ipc_shmat=yes
30240 else
30241   ac_cv_lib_ipc_shmat=no
30242 fi
30243 rm -f core conftest.err conftest.$ac_objext \
30244     conftest$ac_exeext conftest.$ac_ext
30245 LIBS=$ac_check_lib_save_LIBS
30246 fi
30247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
30248 $as_echo "$ac_cv_lib_ipc_shmat" >&6; }
30249 if test "x$ac_cv_lib_ipc_shmat" = x""yes; then :
30250   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
30251 fi
30252 
30253     fi
30254   fi
30255 
30256   # Check for libraries that X11R6 Xt/Xaw programs need.
30257   ac_save_LDFLAGS=$LDFLAGS
30258   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
30259   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
30260   # check for ICE first), but we must link in the order -lSM -lICE or
30261   # we get undefined symbols.  So assume we have SM if we have ICE.
30262   # These have to be linked with before -lX11, unlike the other
30263   # libraries we check for below, so use a different variable.
30264   # John Interrante, Karl Berry
30265   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
30266 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
30267 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then :
30268   $as_echo_n "(cached) " >&6
30269 else
30270   ac_check_lib_save_LIBS=$LIBS
30271 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
30272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30273 /* end confdefs.h.  */
30274 
30275 /* Override any GCC internal prototype to avoid an error.
30276    Use char because int might match the return type of a GCC
30277    builtin and then its argument prototype would still apply.  */
30278 #ifdef __cplusplus
30279 extern "C"
30280 #endif
30281 char IceConnectionNumber ();
30282 int
30283 main ()
30284 {
30285 return IceConnectionNumber ();
30286   ;
30287   return 0;
30288 }
30289 _ACEOF
30290 if ac_fn_cxx_try_link "$LINENO"; then :
30291   ac_cv_lib_ICE_IceConnectionNumber=yes
30292 else
30293   ac_cv_lib_ICE_IceConnectionNumber=no
30294 fi
30295 rm -f core conftest.err conftest.$ac_objext \
30296     conftest$ac_exeext conftest.$ac_ext
30297 LIBS=$ac_check_lib_save_LIBS
30298 fi
30299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
30300 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
30301 if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then :
30302   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
30303 fi
30304 
30305   LDFLAGS=$ac_save_LDFLAGS
30306 
30307 fi
30308 
30309 
30310 # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
30311 # this doesn't make sense so we remove it.
30312 if test "x$COMPILE_TYPE" = xcross; then
30313   X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
30314 fi
30315 
30316 if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
30317 
30318     # Print a helpful message on how to acquire the necessary build dependency.
30319     # x11 is the help tag: freetyp2, cups, pulse, alsa etc
30320     MISSING_DEPENDENCY=x11
30321     PKGHANDLER_COMMAND=
30322 
30323     case $PKGHANDLER in
30324         apt-get)
30325                 apt_help     $MISSING_DEPENDENCY ;;
30326     yum)
30327                 yum_help     $MISSING_DEPENDENCY ;;
30328         port)
30329                 port_help    $MISSING_DEPENDENCY ;;
30330         pkgutil)
30331                 pkgutil_help $MISSING_DEPENDENCY ;;
30332         pkgadd)
30333                 pkgadd_help  $MISSING_DEPENDENCY ;;
30334     * )
30335       break ;;
30336     esac
30337 
30338     if test "x$PKGHANDLER_COMMAND" != x; then
30339         HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30340     fi
30341 
30342     as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
30343 fi
30344 
30345 # Some of the old makefiles require a setting of OPENWIN_HOME
30346 # Since the X11R6 directory has disappeared on later Linuxes,
30347 # we need to probe for it.
30348 if test "x$OPENJDK_TARGET_OS" = xlinux; then
30349     if test -d "$SYS_ROOT/usr/X11R6"; then
30350         OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
30351     fi
30352     if test -d "$SYS_ROOT/usr/include/X11"; then
30353         OPENWIN_HOME="$SYS_ROOT/usr"
30354     fi
30355 fi
30356 if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30357     OPENWIN_HOME="/usr/openwin"
30358 fi
30359 
30360 
30361 
30362 #
30363 # Weird Sol10 something check...TODO change to try compile
30364 #
30365 if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
30366   if test "`uname -r`" = "5.10"; then
30367      if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
30368         X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
30369      fi
30370   fi
30371 fi
30372 
30373 ac_ext=c
30374 ac_cpp='$CPP $CPPFLAGS'
30375 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30376 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30377 ac_compiler_gnu=$ac_cv_c_compiler_gnu
30378 
30379 OLD_CFLAGS="$CFLAGS"
30380 CFLAGS="$CFLAGS $X_CFLAGS"
30381 
30382 # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
30383 for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h
30384 do :
30385   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
30386 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " # include <X11/Xlib.h>
30387                    # include <X11/Xutil.h>
30388 
30389 "
30390 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
30391   cat >>confdefs.h <<_ACEOF
30392 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
30393 _ACEOF
30394  X11_A_OK=yes
30395 else
30396   X11_A_OK=no; break
30397 fi
30398 
30399 done
30400 
30401 
30402 CFLAGS="$OLD_CFLAGS"
30403 ac_ext=cpp
30404 ac_cpp='$CXXCPP $CPPFLAGS'
30405 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30406 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30407 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30408 
30409 
30410 if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
30411 
30412     # Print a helpful message on how to acquire the necessary build dependency.
30413     # x11 is the help tag: freetyp2, cups, pulse, alsa etc
30414     MISSING_DEPENDENCY=x11
30415     PKGHANDLER_COMMAND=
30416 
30417     case $PKGHANDLER in
30418         apt-get)
30419                 apt_help     $MISSING_DEPENDENCY ;;
30420     yum)
30421                 yum_help     $MISSING_DEPENDENCY ;;
30422         port)
30423                 port_help    $MISSING_DEPENDENCY ;;
30424         pkgutil)
30425                 pkgutil_help $MISSING_DEPENDENCY ;;
30426         pkgadd)
30427                 pkgadd_help  $MISSING_DEPENDENCY ;;
30428     * )
30429       break ;;
30430     esac
30431 
30432     if test "x$PKGHANDLER_COMMAND" != x; then
30433         HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30434     fi
30435 
30436     as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h). $HELP_MSG" "$LINENO" 5
30437 fi
30438 
30439 
30440 
30441 
30442 
30443 
30444 ###############################################################################
30445 #
30446 # The common unix printing system cups is used to print from java.
30447 #
30448 
30449 # Check whether --with-cups was given.
30450 if test "${with_cups+set}" = set; then :
30451   withval=$with_cups;
30452 fi
30453 
30454 
30455 # Check whether --with-cups-include was given.
30456 if test "${with_cups_include+set}" = set; then :
30457   withval=$with_cups_include;
30458 fi
30459 
30460 
30461 if test "x$CUPS_NOT_NEEDED" = xyes; then
30462         if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
30463                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
30464 $as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
30465         fi
30466         CUPS_CFLAGS=
30467 else
30468         CUPS_FOUND=no
30469 
30470         if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
30471             as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
30472         fi
30473 
30474         if test "x${with_cups}" != x; then
30475             CUPS_CFLAGS="-I${with_cups}/include"
30476             CUPS_FOUND=yes
30477         fi
30478         if test "x${with_cups_include}" != x; then
30479             CUPS_CFLAGS="-I${with_cups_include}"
30480             CUPS_FOUND=yes
30481         fi
30482         if test "x$CUPS_FOUND" = xno; then
30483 
30484 
30485     if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
30486         # Source the builddeps file again, to make sure it uses the latest variables!
30487         . $builddepsfile
30488         # Look for a target and build machine specific resource!
30489         eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
30490         if test "x$resource" = x; then
30491             # Ok, lets instead look for a target specific resource
30492             eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
30493         fi
30494         if test "x$resource" = x; then
30495             # Ok, lets instead look for a build specific resource
30496             eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
30497         fi
30498         if test "x$resource" = x; then
30499             # Ok, lets instead look for a generic resource
30500             # (The cups comes from M4 and not the shell, thus no need for eval here.)
30501             resource=${builddep_cups}
30502         fi
30503         if test "x$resource" != x; then
30504             { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
30505 $as_echo "$as_me: Using builddeps $resource for cups" >&6;}
30506             # If the resource in the builddeps.conf file is an existing directory,
30507             # for example /java/linux/cups
30508             if test -d ${resource}; then
30509                depdir=${resource}
30510             else
30511 
30512 # cups is for example mymodule
30513 # $resource is for example libs/general/libmymod_1_2_3.zip
30514 # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
30515 # $with_builddeps_dir is for example /localhome/builddeps
30516 # depdir is the name of the variable into which we store the depdir, eg MYMOD
30517 # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
30518 # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
30519     filename=`basename $resource`
30520     filebase=`echo $filename | sed 's/\.[^\.]*$//'`
30521     filebase=${filename%%.*}
30522     extension=${filename#*.}
30523     installdir=$with_builddeps_dir/$filebase
30524     if test ! -f $installdir/$filename.unpacked; then
30525         { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
30526 $as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
30527         if test ! -d $installdir; then
30528             mkdir -p $installdir
30529         fi
30530         if test ! -d $installdir; then
30531             as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
30532         fi
30533         tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
30534         touch $tmpfile
30535         if test ! -f $tmpfile; then
30536             as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
30537         fi
30538 
30539     # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
30540     # $tmpfile is the local file name for the downloaded file.
30541     VALID_TOOL=no
30542     if test "x$BDEPS_FTP" = xwget; then
30543        VALID_TOOL=yes
30544        wget -O $tmpfile $with_builddeps_server/$resource
30545     fi
30546     if test "x$BDEPS_FTP" = xlftp; then
30547        VALID_TOOL=yes
30548        lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
30549     fi
30550     if test "x$BDEPS_FTP" = xftp; then
30551         VALID_TOOL=yes
30552         FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
30553         FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
30554         FTPUSERPWD=${FTPSERVER%%@*}
30555         if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
30556             FTPUSER=${userpwd%%:*}
30557             FTPPWD=${userpwd#*@}
30558             FTPSERVER=${FTPSERVER#*@}
30559         else
30560             FTPUSER=ftp
30561             FTPPWD=ftp
30562         fi
30563         # the "pass" command does not work on some
30564         # ftp clients (read ftp.exe) but if it works,
30565         # passive mode is better!
30566         (\
30567             echo "user $FTPUSER $FTPPWD"        ;\
30568             echo "pass"                         ;\
30569             echo "bin"                          ;\
30570             echo "get $FTPPATH $tmpfile"              ;\
30571         ) | ftp -in $FTPSERVER
30572     fi
30573     if test "x$VALID_TOOL" != xyes; then
30574        as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
30575     fi
30576 
30577         mv $tmpfile $installdir/$filename
30578         if test ! -s $installdir/$filename; then
30579             as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
30580         fi
30581         case "$extension" in
30582             zip)  echo "Unzipping $installdir/$filename..."
30583                (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
30584             ;;
30585             tar.gz) echo "Untaring $installdir/$filename..."
30586                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30587             ;;
30588             tgz) echo "Untaring $installdir/$filename..."
30589                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30590             ;;
30591             *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
30592             ;;
30593         esac
30594     fi
30595     if test -f $installdir/$filename.unpacked; then
30596         depdir=$installdir
30597     fi
30598 
30599             fi
30600             # Source the builddeps file again, because in the previous command, the depdir
30601             # was updated to point at the current build dependency install directory.
30602             . $builddepsfile
30603             # Now extract variables from the builddeps.conf files.
30604             theroot=${builddep_cups_ROOT}
30605             thecflags=${builddep_cups_CFLAGS}
30606             thelibs=${builddep_cups_LIBS}
30607             if test "x$depdir" = x; then
30608                 as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
30609             fi
30610             CUPS=$depdir
30611             if test "x$theroot" != x; then
30612                CUPS="$theroot"
30613             fi
30614             if test "x$thecflags" != x; then
30615                CUPS_CFLAGS="$thecflags"
30616             fi
30617             if test "x$thelibs" != x; then
30618                CUPS_LIBS="$thelibs"
30619             fi
30620             CUPS_FOUND=yes
30621 
30622         fi
30623 
30624     fi
30625 
30626         fi
30627         if test "x$CUPS_FOUND" = xno; then
30628             # Are the cups headers installed in the default /usr/include location?
30629             for ac_header in cups/cups.h cups/ppd.h
30630 do :
30631   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
30632 ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
30633 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
30634   cat >>confdefs.h <<_ACEOF
30635 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
30636 _ACEOF
30637  CUPS_FOUND=yes
30638                               CUPS_CFLAGS=
30639                               DEFAULT_CUPS=yes
30640 fi
30641 
30642 done
30643 
30644         fi
30645         if test "x$CUPS_FOUND" = xno; then
30646             # Getting nervous now? Lets poke around for standard Solaris third-party
30647             # package installation locations.
30648             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
30649 $as_echo_n "checking for cups headers... " >&6; }
30650             if test -s /opt/sfw/cups/include/cups/cups.h; then
30651                # An SFW package seems to be installed!
30652                CUPS_FOUND=yes
30653                CUPS_CFLAGS="-I/opt/sfw/cups/include"
30654             elif test -s /opt/csw/include/cups/cups.h; then
30655                # A CSW package seems to be installed!
30656                CUPS_FOUND=yes
30657                CUPS_CFLAGS="-I/opt/csw/include"
30658             fi
30659             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
30660 $as_echo "$CUPS_FOUND" >&6; }
30661         fi
30662         if test "x$CUPS_FOUND" = xno; then
30663 
30664     # Print a helpful message on how to acquire the necessary build dependency.
30665     # cups is the help tag: freetyp2, cups, pulse, alsa etc
30666     MISSING_DEPENDENCY=cups
30667     PKGHANDLER_COMMAND=
30668 
30669     case $PKGHANDLER in
30670         apt-get)
30671                 apt_help     $MISSING_DEPENDENCY ;;
30672     yum)
30673                 yum_help     $MISSING_DEPENDENCY ;;
30674         port)
30675                 port_help    $MISSING_DEPENDENCY ;;
30676         pkgutil)
30677                 pkgutil_help $MISSING_DEPENDENCY ;;
30678         pkgadd)
30679                 pkgadd_help  $MISSING_DEPENDENCY ;;
30680     * )
30681       break ;;
30682     esac
30683 
30684     if test "x$PKGHANDLER_COMMAND" != x; then
30685         HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30686     fi
30687 
30688             as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
30689         fi
30690 fi
30691 
30692 
30693 
30694 
30695 
30696 
30697 ###############################################################################
30698 #
30699 # The ubiquitous freetype2 library is used to render fonts.
30700 #
30701 
30702 # Check whether --with-freetype was given.
30703 if test "${with_freetype+set}" = set; then :
30704   withval=$with_freetype;
30705 fi
30706 
30707 
30708 # If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
30709 USING_SYSTEM_FT_LIB=false
30710 
30711 if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
30712         if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
30713                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
30714 $as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
30715         fi
30716         FREETYPE2_CFLAGS=
30717         FREETYPE2_LIBS=
30718         FREETYPE2_LIB_PATH=
30719 else
30720         FREETYPE2_FOUND=no
30721 
30722         if test "x$with_freetype" != x; then
30723 
30724   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30725 
30726   # Input might be given as Windows format, start by converting to
30727   # unix format.
30728   path="$with_freetype"
30729   new_path=`$CYGPATH -u "$path"`
30730 
30731   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30732   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30733   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30734   # "foo.exe" is OK but "foo" is an error.
30735   #
30736   # This test is therefore slightly more accurate than "test -f" to check for file precense.
30737   # It is also a way to make sure we got the proper file name for the real test later on.
30738   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30739   if test "x$test_shortpath" = x; then
30740     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
30741 $as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
30742     as_fn_error $? "Cannot locate the the path of with_freetype" "$LINENO" 5
30743   fi
30744 
30745   # Call helper function which possibly converts this using DOS-style short mode.
30746   # If so, the updated path is stored in $new_path.
30747 
30748   input_path="$new_path"
30749   # Check if we need to convert this using DOS-style short mode. If the path
30750   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30751   # take no chances and rewrite it.
30752   # Note: m4 eats our [], so we need to use [ and ] instead.
30753   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30754   if test "x$has_forbidden_chars" != x; then
30755     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30756     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30757     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30758     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30759       # Going to short mode and back again did indeed matter. Since short mode is
30760       # case insensitive, let's make it lowercase to improve readability.
30761       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30762       # Now convert it back to Unix-stile (cygpath)
30763       input_path=`$CYGPATH -u "$shortmode_path"`
30764       new_path="$input_path"
30765     fi
30766   fi
30767 
30768   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30769   if test "x$test_cygdrive_prefix" = x; then
30770     # As a simple fix, exclude /usr/bin since it's not a real path.
30771     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30772       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30773       # a path prefixed by /cygdrive for fixpath to work.
30774       new_path="$CYGWIN_ROOT_PATH$input_path"
30775     fi
30776   fi
30777 
30778 
30779   if test "x$path" != "x$new_path"; then
30780     with_freetype="$new_path"
30781     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
30782 $as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
30783   fi
30784 
30785   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30786 
30787   path="$with_freetype"
30788   has_colon=`$ECHO $path | $GREP ^.:`
30789   new_path="$path"
30790   if test "x$has_colon" = x; then
30791     # Not in mixed or Windows style, start by that.
30792     new_path=`cmd //c echo $path`
30793   fi
30794 
30795 
30796   input_path="$new_path"
30797   # Check if we need to convert this using DOS-style short mode. If the path
30798   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30799   # take no chances and rewrite it.
30800   # Note: m4 eats our [], so we need to use [ and ] instead.
30801   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30802   if test "x$has_forbidden_chars" != x; then
30803     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30804     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30805   fi
30806 
30807 
30808   windows_path="$new_path"
30809   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30810     unix_path=`$CYGPATH -u "$windows_path"`
30811     new_path="$unix_path"
30812   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30813     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30814     new_path="$unix_path"
30815   fi
30816 
30817   if test "x$path" != "x$new_path"; then
30818     with_freetype="$new_path"
30819     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
30820 $as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
30821   fi
30822 
30823   # Save the first 10 bytes of this path to the storage, so fixpath can work.
30824   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30825 
30826   else
30827     # We're on a posix platform. Hooray! :)
30828     path="$with_freetype"
30829 
30830     if test ! -f "$path" && test ! -d "$path"; then
30831       as_fn_error $? "The path of with_freetype, which resolves as \"$path\", is not found." "$LINENO" 5
30832     fi
30833 
30834     has_space=`$ECHO "$path" | $GREP " "`
30835     if test "x$has_space" != x; then
30836       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
30837 $as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
30838       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30839     fi
30840   fi
30841 
30842             FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
30843             FREETYPE2_LIB_PATH="$with_freetype/lib"
30844             if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then
30845                 FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype"
30846                 FREETYPE2_LIB_PATH="$with_freetype/lib/amd64"
30847             fi
30848             if test "x$OPENJDK_TARGET_OS" = xwindows; then
30849                 FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
30850             fi
30851             FREETYPE2_CFLAGS="-I$with_freetype/include"
30852             if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
30853                 FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
30854             fi
30855             FREETYPE2_FOUND=yes
30856             if test "x$FREETYPE2_FOUND" = xyes; then
30857                 # Verify that the directories exist
30858                 if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
30859                    as_fn_error $? "Could not find the expected directories $with_freetype/lib and $with_freetype/include" "$LINENO" 5
30860                 fi
30861                 # List the contents of the lib.
30862                 FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
30863                 if test "x$FREETYPELIB" = x; then
30864                    as_fn_error $? "Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" "$LINENO" 5
30865                 fi
30866                 # Check one h-file
30867                 if ! test -s "$with_freetype/include/ft2build.h"; then
30868                    as_fn_error $? "Could not find $with_freetype/include/ft2build.h" "$LINENO" 5
30869                 fi
30870             fi
30871         fi
30872         if test "x$FREETYPE2_FOUND" = xno; then
30873 
30874 
30875     if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
30876         # Source the builddeps file again, to make sure it uses the latest variables!
30877         . $builddepsfile
30878         # Look for a target and build machine specific resource!
30879         eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
30880         if test "x$resource" = x; then
30881             # Ok, lets instead look for a target specific resource
30882             eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
30883         fi
30884         if test "x$resource" = x; then
30885             # Ok, lets instead look for a build specific resource
30886             eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
30887         fi
30888         if test "x$resource" = x; then
30889             # Ok, lets instead look for a generic resource
30890             # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
30891             resource=${builddep_freetype2}
30892         fi
30893         if test "x$resource" != x; then
30894             { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
30895 $as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
30896             # If the resource in the builddeps.conf file is an existing directory,
30897             # for example /java/linux/cups
30898             if test -d ${resource}; then
30899                depdir=${resource}
30900             else
30901 
30902 # freetype2 is for example mymodule
30903 # $resource is for example libs/general/libmymod_1_2_3.zip
30904 # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
30905 # $with_builddeps_dir is for example /localhome/builddeps
30906 # depdir is the name of the variable into which we store the depdir, eg MYMOD
30907 # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
30908 # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
30909     filename=`basename $resource`
30910     filebase=`echo $filename | sed 's/\.[^\.]*$//'`
30911     filebase=${filename%%.*}
30912     extension=${filename#*.}
30913     installdir=$with_builddeps_dir/$filebase
30914     if test ! -f $installdir/$filename.unpacked; then
30915         { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
30916 $as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
30917         if test ! -d $installdir; then
30918             mkdir -p $installdir
30919         fi
30920         if test ! -d $installdir; then
30921             as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
30922         fi
30923         tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
30924         touch $tmpfile
30925         if test ! -f $tmpfile; then
30926             as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
30927         fi
30928 
30929     # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
30930     # $tmpfile is the local file name for the downloaded file.
30931     VALID_TOOL=no
30932     if test "x$BDEPS_FTP" = xwget; then
30933        VALID_TOOL=yes
30934        wget -O $tmpfile $with_builddeps_server/$resource
30935     fi
30936     if test "x$BDEPS_FTP" = xlftp; then
30937        VALID_TOOL=yes
30938        lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
30939     fi
30940     if test "x$BDEPS_FTP" = xftp; then
30941         VALID_TOOL=yes
30942         FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
30943         FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
30944         FTPUSERPWD=${FTPSERVER%%@*}
30945         if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
30946             FTPUSER=${userpwd%%:*}
30947             FTPPWD=${userpwd#*@}
30948             FTPSERVER=${FTPSERVER#*@}
30949         else
30950             FTPUSER=ftp
30951             FTPPWD=ftp
30952         fi
30953         # the "pass" command does not work on some
30954         # ftp clients (read ftp.exe) but if it works,
30955         # passive mode is better!
30956         (\
30957             echo "user $FTPUSER $FTPPWD"        ;\
30958             echo "pass"                         ;\
30959             echo "bin"                          ;\
30960             echo "get $FTPPATH $tmpfile"              ;\
30961         ) | ftp -in $FTPSERVER
30962     fi
30963     if test "x$VALID_TOOL" != xyes; then
30964        as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
30965     fi
30966 
30967         mv $tmpfile $installdir/$filename
30968         if test ! -s $installdir/$filename; then
30969             as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
30970         fi
30971         case "$extension" in
30972             zip)  echo "Unzipping $installdir/$filename..."
30973                (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
30974             ;;
30975             tar.gz) echo "Untaring $installdir/$filename..."
30976                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30977             ;;
30978             tgz) echo "Untaring $installdir/$filename..."
30979                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30980             ;;
30981             *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
30982             ;;
30983         esac
30984     fi
30985     if test -f $installdir/$filename.unpacked; then
30986         depdir=$installdir
30987     fi
30988 
30989             fi
30990             # Source the builddeps file again, because in the previous command, the depdir
30991             # was updated to point at the current build dependency install directory.
30992             . $builddepsfile
30993             # Now extract variables from the builddeps.conf files.
30994             theroot=${builddep_freetype2_ROOT}
30995             thecflags=${builddep_freetype2_CFLAGS}
30996             thelibs=${builddep_freetype2_LIBS}
30997             if test "x$depdir" = x; then
30998                 as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
30999             fi
31000             FREETYPE2=$depdir
31001             if test "x$theroot" != x; then
31002                FREETYPE2="$theroot"
31003             fi
31004             if test "x$thecflags" != x; then
31005                FREETYPE2_CFLAGS="$thecflags"
31006             fi
31007             if test "x$thelibs" != x; then
31008                FREETYPE2_LIBS="$thelibs"
31009             fi
31010             FREETYPE2_FOUND=yes
31011             else FREETYPE2_FOUND=no
31012 
31013         fi
31014         else FREETYPE2_FOUND=no
31015 
31016     fi
31017 
31018             USING_SYSTEM_FT_LIB=true
31019         fi
31020         if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then
31021             FREETYPELOCATION="$PROGRAMFILES/GnuWin32"
31022 
31023   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31024 
31025   # Input might be given as Windows format, start by converting to
31026   # unix format.
31027   path="$FREETYPELOCATION"
31028   new_path=`$CYGPATH -u "$path"`
31029 
31030   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31031   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31032   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31033   # "foo.exe" is OK but "foo" is an error.
31034   #
31035   # This test is therefore slightly more accurate than "test -f" to check for file precense.
31036   # It is also a way to make sure we got the proper file name for the real test later on.
31037   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31038   if test "x$test_shortpath" = x; then
31039     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
31040 $as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
31041     as_fn_error $? "Cannot locate the the path of FREETYPELOCATION" "$LINENO" 5
31042   fi
31043 
31044   # Call helper function which possibly converts this using DOS-style short mode.
31045   # If so, the updated path is stored in $new_path.
31046 
31047   input_path="$new_path"
31048   # Check if we need to convert this using DOS-style short mode. If the path
31049   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31050   # take no chances and rewrite it.
31051   # Note: m4 eats our [], so we need to use [ and ] instead.
31052   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31053   if test "x$has_forbidden_chars" != x; then
31054     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31055     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31056     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31057     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31058       # Going to short mode and back again did indeed matter. Since short mode is
31059       # case insensitive, let's make it lowercase to improve readability.
31060       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31061       # Now convert it back to Unix-stile (cygpath)
31062       input_path=`$CYGPATH -u "$shortmode_path"`
31063       new_path="$input_path"
31064     fi
31065   fi
31066 
31067   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31068   if test "x$test_cygdrive_prefix" = x; then
31069     # As a simple fix, exclude /usr/bin since it's not a real path.
31070     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31071       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31072       # a path prefixed by /cygdrive for fixpath to work.
31073       new_path="$CYGWIN_ROOT_PATH$input_path"
31074     fi
31075   fi
31076 
31077 
31078   if test "x$path" != "x$new_path"; then
31079     FREETYPELOCATION="$new_path"
31080     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
31081 $as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
31082   fi
31083 
31084   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31085 
31086   path="$FREETYPELOCATION"
31087   has_colon=`$ECHO $path | $GREP ^.:`
31088   new_path="$path"
31089   if test "x$has_colon" = x; then
31090     # Not in mixed or Windows style, start by that.
31091     new_path=`cmd //c echo $path`
31092   fi
31093 
31094 
31095   input_path="$new_path"
31096   # Check if we need to convert this using DOS-style short mode. If the path
31097   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31098   # take no chances and rewrite it.
31099   # Note: m4 eats our [], so we need to use [ and ] instead.
31100   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31101   if test "x$has_forbidden_chars" != x; then
31102     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31103     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31104   fi
31105 
31106 
31107   windows_path="$new_path"
31108   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31109     unix_path=`$CYGPATH -u "$windows_path"`
31110     new_path="$unix_path"
31111   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31112     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31113     new_path="$unix_path"
31114   fi
31115 
31116   if test "x$path" != "x$new_path"; then
31117     FREETYPELOCATION="$new_path"
31118     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
31119 $as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
31120   fi
31121 
31122   # Save the first 10 bytes of this path to the storage, so fixpath can work.
31123   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31124 
31125   else
31126     # We're on a posix platform. Hooray! :)
31127     path="$FREETYPELOCATION"
31128 
31129     if test ! -f "$path" && test ! -d "$path"; then
31130       as_fn_error $? "The path of FREETYPELOCATION, which resolves as \"$path\", is not found." "$LINENO" 5
31131     fi
31132 
31133     has_space=`$ECHO "$path" | $GREP " "`
31134     if test "x$has_space" != x; then
31135       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
31136 $as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
31137       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31138     fi
31139   fi
31140 
31141             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard windows locations" >&5
31142 $as_echo_n "checking for freetype in some standard windows locations... " >&6; }
31143             if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then
31144                 FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include"
31145                 FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib"
31146                 FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib"
31147                 if ! test -s "$FREETYPE2_LIBS"; then
31148                    as_fn_error $? "Could not find $FREETYPE2_LIBS" "$LINENO" 5
31149                 fi
31150                 if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then
31151                    as_fn_error $? "Could not find $FREETYPE2_LIB_PATH/freetype.dll" "$LINENO" 5
31152                 fi
31153                 USING_SYSTEM_FT_LIB=true
31154                 FREETYPE2_FOUND=yes
31155             fi
31156             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
31157 $as_echo "$FREETYPE2_FOUND" >&6; }
31158         fi
31159         if test "x$FREETYPE2_FOUND" = xno; then
31160 
31161 pkg_failed=no
31162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE2" >&5
31163 $as_echo_n "checking for FREETYPE2... " >&6; }
31164 
31165 if test -n "$FREETYPE2_CFLAGS"; then
31166     pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS"
31167  elif test -n "$PKG_CONFIG"; then
31168     if test -n "$PKG_CONFIG" && \
31169     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
31170   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31171   ac_status=$?
31172   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31173   test $ac_status = 0; }; then
31174   pkg_cv_FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
31175 else
31176   pkg_failed=yes
31177 fi
31178  else
31179     pkg_failed=untried
31180 fi
31181 if test -n "$FREETYPE2_LIBS"; then
31182     pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS"
31183  elif test -n "$PKG_CONFIG"; then
31184     if test -n "$PKG_CONFIG" && \
31185     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
31186   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31187   ac_status=$?
31188   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31189   test $ac_status = 0; }; then
31190   pkg_cv_FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
31191 else
31192   pkg_failed=yes
31193 fi
31194  else
31195     pkg_failed=untried
31196 fi
31197 
31198 
31199 
31200 if test $pkg_failed = yes; then
31201 
31202 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
31203         _pkg_short_errors_supported=yes
31204 else
31205         _pkg_short_errors_supported=no
31206 fi
31207         if test $_pkg_short_errors_supported = yes; then
31208                 FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
31209         else
31210                 FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
31211         fi
31212         # Put the nasty error message in config.log where it belongs
31213         echo "$FREETYPE2_PKG_ERRORS" >&5
31214 
31215         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31216 $as_echo "no" >&6; }
31217                 FREETYPE2_FOUND=no
31218 elif test $pkg_failed = untried; then
31219         FREETYPE2_FOUND=no
31220 else
31221         FREETYPE2_CFLAGS=$pkg_cv_FREETYPE2_CFLAGS
31222         FREETYPE2_LIBS=$pkg_cv_FREETYPE2_LIBS
31223         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31224 $as_echo "yes" >&6; }
31225         FREETYPE2_FOUND=yes
31226 fi
31227             # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
31228             FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'`
31229             USING_SYSTEM_FT_LIB=true
31230             # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
31231             if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
31232               FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'`
31233             fi
31234         fi
31235         if test "x$FREETYPE2_FOUND" = xno; then
31236             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard locations" >&5
31237 $as_echo_n "checking for freetype in some standard locations... " >&6; }
31238 
31239             if test -s /usr/X11/include/ft2build.h && test -d /usr/X11/include/freetype2/freetype; then
31240                 DEFAULT_FREETYPE_CFLAGS="-I/usr/X11/include/freetype2 -I/usr/X11/include"
31241                 DEFAULT_FREETYPE_LIBS="-L/usr/X11/lib -lfreetype"
31242             fi
31243             if test -s /usr/include/ft2build.h && test -d /usr/include/freetype2/freetype; then
31244                 DEFAULT_FREETYPE_CFLAGS="-I/usr/include/freetype2"
31245                 DEFAULT_FREETYPE_LIBS="-lfreetype"
31246             fi
31247 
31248             PREV_CXXCFLAGS="$CXXFLAGS"
31249             PREV_LDFLAGS="$LDFLAGS"
31250             CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
31251             LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
31252             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31253 /* end confdefs.h.  */
31254 #include<ft2build.h>
31255                             #include FT_FREETYPE_H
31256                            int main() { return 0; }
31257 
31258 _ACEOF
31259 if ac_fn_cxx_try_link "$LINENO"; then :
31260 
31261                               # Yes, the default cflags and libs did the trick.
31262                               FREETYPE2_FOUND=yes
31263                               FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
31264                               FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
31265 
31266 else
31267 
31268                               FREETYPE2_FOUND=no
31269 
31270 fi
31271 rm -f core conftest.err conftest.$ac_objext \
31272     conftest$ac_exeext conftest.$ac_ext
31273             CXXCFLAGS="$PREV_CXXFLAGS"
31274             LDFLAGS="$PREV_LDFLAGS"
31275             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
31276 $as_echo "$FREETYPE2_FOUND" >&6; }
31277             USING_SYSTEM_FT_LIB=true
31278         fi
31279         if test "x$FREETYPE2_FOUND" = xno; then
31280 
31281     # Print a helpful message on how to acquire the necessary build dependency.
31282     # freetype2 is the help tag: freetyp2, cups, pulse, alsa etc
31283     MISSING_DEPENDENCY=freetype2
31284     PKGHANDLER_COMMAND=
31285 
31286     case $PKGHANDLER in
31287         apt-get)
31288                 apt_help     $MISSING_DEPENDENCY ;;
31289     yum)
31290                 yum_help     $MISSING_DEPENDENCY ;;
31291         port)
31292                 port_help    $MISSING_DEPENDENCY ;;
31293         pkgutil)
31294                 pkgutil_help $MISSING_DEPENDENCY ;;
31295         pkgadd)
31296                 pkgadd_help  $MISSING_DEPENDENCY ;;
31297     * )
31298       break ;;
31299     esac
31300 
31301     if test "x$PKGHANDLER_COMMAND" != x; then
31302         HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31303     fi
31304 
31305                 as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
31306         fi
31307 
31308         if test "x$OPENJDK_TARGET_OS" != xwindows; then
31309             # AC_CHECK_LIB does not support use of cl.exe
31310             PREV_LDFLAGS="$LDFLAGS"
31311             LDFLAGS="$FREETYPE2_LIBS"
31312             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_Init_FreeType in -lfreetype" >&5
31313 $as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; }
31314 if test "${ac_cv_lib_freetype_FT_Init_FreeType+set}" = set; then :
31315   $as_echo_n "(cached) " >&6
31316 else
31317   ac_check_lib_save_LIBS=$LIBS
31318 LIBS="-lfreetype  $LIBS"
31319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31320 /* end confdefs.h.  */
31321 
31322 /* Override any GCC internal prototype to avoid an error.
31323    Use char because int might match the return type of a GCC
31324    builtin and then its argument prototype would still apply.  */
31325 #ifdef __cplusplus
31326 extern "C"
31327 #endif
31328 char FT_Init_FreeType ();
31329 int
31330 main ()
31331 {
31332 return FT_Init_FreeType ();
31333   ;
31334   return 0;
31335 }
31336 _ACEOF
31337 if ac_fn_cxx_try_link "$LINENO"; then :
31338   ac_cv_lib_freetype_FT_Init_FreeType=yes
31339 else
31340   ac_cv_lib_freetype_FT_Init_FreeType=no
31341 fi
31342 rm -f core conftest.err conftest.$ac_objext \
31343     conftest$ac_exeext conftest.$ac_ext
31344 LIBS=$ac_check_lib_save_LIBS
31345 fi
31346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5
31347 $as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; }
31348 if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = x""yes; then :
31349   FREETYPE2_FOUND=true
31350 else
31351   as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
31352 fi
31353 
31354             LDFLAGS="$PREV_LDFLAGS"
31355         fi
31356 fi
31357 
31358 
31359 
31360 
31361 
31362 
31363 
31364 
31365 
31366 ###############################################################################
31367 #
31368 # Check for alsa headers and libraries. Used on Linux/GNU systems.
31369 #
31370 
31371 # Check whether --with-alsa was given.
31372 if test "${with_alsa+set}" = set; then :
31373   withval=$with_alsa;
31374 fi
31375 
31376 
31377 # Check whether --with-alsa-include was given.
31378 if test "${with_alsa_include+set}" = set; then :
31379   withval=$with_alsa_include;
31380 fi
31381 
31382 
31383 # Check whether --with-alsa-lib was given.
31384 if test "${with_alsa_lib+set}" = set; then :
31385   withval=$with_alsa_lib;
31386 fi
31387 
31388 
31389 if test "x$ALSA_NOT_NEEDED" = xyes; then
31390         if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
31391                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
31392 $as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
31393         fi
31394         ALSA_CFLAGS=
31395         ALSA_LIBS=
31396 else
31397         ALSA_FOUND=no
31398 
31399         if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
31400             as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
31401         fi
31402 
31403         if test "x${with_alsa}" != x; then
31404             ALSA_LIBS="-L${with_alsa}/lib -lalsa"
31405             ALSA_CFLAGS="-I${with_alsa}/include"
31406             ALSA_FOUND=yes
31407         fi
31408         if test "x${with_alsa_include}" != x; then
31409             ALSA_CFLAGS="-I${with_alsa_include}"
31410             ALSA_FOUND=yes
31411         fi
31412         if test "x${with_alsa_lib}" != x; then
31413             ALSA_LIBS="-L${with_alsa_lib} -lalsa"
31414             ALSA_FOUND=yes
31415         fi
31416         if test "x$ALSA_FOUND" = xno; then
31417 
31418 
31419     if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31420         # Source the builddeps file again, to make sure it uses the latest variables!
31421         . $builddepsfile
31422         # Look for a target and build machine specific resource!
31423         eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31424         if test "x$resource" = x; then
31425             # Ok, lets instead look for a target specific resource
31426             eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
31427         fi
31428         if test "x$resource" = x; then
31429             # Ok, lets instead look for a build specific resource
31430             eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
31431         fi
31432         if test "x$resource" = x; then
31433             # Ok, lets instead look for a generic resource
31434             # (The alsa comes from M4 and not the shell, thus no need for eval here.)
31435             resource=${builddep_alsa}
31436         fi
31437         if test "x$resource" != x; then
31438             { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
31439 $as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
31440             # If the resource in the builddeps.conf file is an existing directory,
31441             # for example /java/linux/cups
31442             if test -d ${resource}; then
31443                depdir=${resource}
31444             else
31445 
31446 # alsa is for example mymodule
31447 # $resource is for example libs/general/libmymod_1_2_3.zip
31448 # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31449 # $with_builddeps_dir is for example /localhome/builddeps
31450 # depdir is the name of the variable into which we store the depdir, eg MYMOD
31451 # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31452 # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31453     filename=`basename $resource`
31454     filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31455     filebase=${filename%%.*}
31456     extension=${filename#*.}
31457     installdir=$with_builddeps_dir/$filebase
31458     if test ! -f $installdir/$filename.unpacked; then
31459         { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
31460 $as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31461         if test ! -d $installdir; then
31462             mkdir -p $installdir
31463         fi
31464         if test ! -d $installdir; then
31465             as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31466         fi
31467         tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
31468         touch $tmpfile
31469         if test ! -f $tmpfile; then
31470             as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31471         fi
31472 
31473     # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31474     # $tmpfile is the local file name for the downloaded file.
31475     VALID_TOOL=no
31476     if test "x$BDEPS_FTP" = xwget; then
31477        VALID_TOOL=yes
31478        wget -O $tmpfile $with_builddeps_server/$resource
31479     fi
31480     if test "x$BDEPS_FTP" = xlftp; then
31481        VALID_TOOL=yes
31482        lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31483     fi
31484     if test "x$BDEPS_FTP" = xftp; then
31485         VALID_TOOL=yes
31486         FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31487         FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31488         FTPUSERPWD=${FTPSERVER%%@*}
31489         if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31490             FTPUSER=${userpwd%%:*}
31491             FTPPWD=${userpwd#*@}
31492             FTPSERVER=${FTPSERVER#*@}
31493         else
31494             FTPUSER=ftp
31495             FTPPWD=ftp
31496         fi
31497         # the "pass" command does not work on some
31498         # ftp clients (read ftp.exe) but if it works,
31499         # passive mode is better!
31500         (\
31501             echo "user $FTPUSER $FTPPWD"        ;\
31502             echo "pass"                         ;\
31503             echo "bin"                          ;\
31504             echo "get $FTPPATH $tmpfile"              ;\
31505         ) | ftp -in $FTPSERVER
31506     fi
31507     if test "x$VALID_TOOL" != xyes; then
31508        as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31509     fi
31510 
31511         mv $tmpfile $installdir/$filename
31512         if test ! -s $installdir/$filename; then
31513             as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31514         fi
31515         case "$extension" in
31516             zip)  echo "Unzipping $installdir/$filename..."
31517                (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31518             ;;
31519             tar.gz) echo "Untaring $installdir/$filename..."
31520                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31521             ;;
31522             tgz) echo "Untaring $installdir/$filename..."
31523                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31524             ;;
31525             *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31526             ;;
31527         esac
31528     fi
31529     if test -f $installdir/$filename.unpacked; then
31530         depdir=$installdir
31531     fi
31532 
31533             fi
31534             # Source the builddeps file again, because in the previous command, the depdir
31535             # was updated to point at the current build dependency install directory.
31536             . $builddepsfile
31537             # Now extract variables from the builddeps.conf files.
31538             theroot=${builddep_alsa_ROOT}
31539             thecflags=${builddep_alsa_CFLAGS}
31540             thelibs=${builddep_alsa_LIBS}
31541             if test "x$depdir" = x; then
31542                 as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
31543             fi
31544             ALSA=$depdir
31545             if test "x$theroot" != x; then
31546                ALSA="$theroot"
31547             fi
31548             if test "x$thecflags" != x; then
31549                ALSA_CFLAGS="$thecflags"
31550             fi
31551             if test "x$thelibs" != x; then
31552                ALSA_LIBS="$thelibs"
31553             fi
31554             ALSA_FOUND=yes
31555             else ALSA_FOUND=no
31556 
31557         fi
31558         else ALSA_FOUND=no
31559 
31560     fi
31561 
31562         fi
31563         if test "x$ALSA_FOUND" = xno; then
31564 
31565 pkg_failed=no
31566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
31567 $as_echo_n "checking for ALSA... " >&6; }
31568 
31569 if test -n "$ALSA_CFLAGS"; then
31570     pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
31571  elif test -n "$PKG_CONFIG"; then
31572     if test -n "$PKG_CONFIG" && \
31573     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
31574   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
31575   ac_status=$?
31576   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31577   test $ac_status = 0; }; then
31578   pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
31579 else
31580   pkg_failed=yes
31581 fi
31582  else
31583     pkg_failed=untried
31584 fi
31585 if test -n "$ALSA_LIBS"; then
31586     pkg_cv_ALSA_LIBS="$ALSA_LIBS"
31587  elif test -n "$PKG_CONFIG"; then
31588     if test -n "$PKG_CONFIG" && \
31589     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
31590   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
31591   ac_status=$?
31592   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31593   test $ac_status = 0; }; then
31594   pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
31595 else
31596   pkg_failed=yes
31597 fi
31598  else
31599     pkg_failed=untried
31600 fi
31601 
31602 
31603 
31604 if test $pkg_failed = yes; then
31605 
31606 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
31607         _pkg_short_errors_supported=yes
31608 else
31609         _pkg_short_errors_supported=no
31610 fi
31611         if test $_pkg_short_errors_supported = yes; then
31612                 ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
31613         else
31614                 ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
31615         fi
31616         # Put the nasty error message in config.log where it belongs
31617         echo "$ALSA_PKG_ERRORS" >&5
31618 
31619         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31620 $as_echo "no" >&6; }
31621                 ALSA_FOUND=no
31622 elif test $pkg_failed = untried; then
31623         ALSA_FOUND=no
31624 else
31625         ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
31626         ALSA_LIBS=$pkg_cv_ALSA_LIBS
31627         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31628 $as_echo "yes" >&6; }
31629         ALSA_FOUND=yes
31630 fi
31631         fi
31632         if test "x$ALSA_FOUND" = xno; then
31633             for ac_header in alsa/asoundlib.h
31634 do :
31635   ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
31636 if test "x$ac_cv_header_alsa_asoundlib_h" = x""yes; then :
31637   cat >>confdefs.h <<_ACEOF
31638 #define HAVE_ALSA_ASOUNDLIB_H 1
31639 _ACEOF
31640  ALSA_FOUND=yes
31641                               ALSA_CFLAGS=-Iignoreme
31642                               ALSA_LIBS=-lasound
31643                               DEFAULT_ALSA=yes
31644 else
31645   ALSA_FOUND=no
31646 fi
31647 
31648 done
31649 
31650         fi
31651         if test "x$ALSA_FOUND" = xno; then
31652 
31653     # Print a helpful message on how to acquire the necessary build dependency.
31654     # alsa is the help tag: freetyp2, cups, pulse, alsa etc
31655     MISSING_DEPENDENCY=alsa
31656     PKGHANDLER_COMMAND=
31657 
31658     case $PKGHANDLER in
31659         apt-get)
31660                 apt_help     $MISSING_DEPENDENCY ;;
31661     yum)
31662                 yum_help     $MISSING_DEPENDENCY ;;
31663         port)
31664                 port_help    $MISSING_DEPENDENCY ;;
31665         pkgutil)
31666                 pkgutil_help $MISSING_DEPENDENCY ;;
31667         pkgadd)
31668                 pkgadd_help  $MISSING_DEPENDENCY ;;
31669     * )
31670       break ;;
31671     esac
31672 
31673     if test "x$PKGHANDLER_COMMAND" != x; then
31674         HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31675     fi
31676 
31677             as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
31678         fi
31679 fi
31680 
31681 
31682 
31683 
31684 
31685 
31686 
31687 ###############################################################################
31688 #
31689 # Check for the jpeg library
31690 #
31691 
31692 USE_EXTERNAL_LIBJPEG=true
31693 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
31694 $as_echo_n "checking for main in -ljpeg... " >&6; }
31695 if test "${ac_cv_lib_jpeg_main+set}" = set; then :
31696   $as_echo_n "(cached) " >&6
31697 else
31698   ac_check_lib_save_LIBS=$LIBS
31699 LIBS="-ljpeg  $LIBS"
31700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31701 /* end confdefs.h.  */
31702 
31703 
31704 int
31705 main ()
31706 {
31707 return main ();
31708   ;
31709   return 0;
31710 }
31711 _ACEOF
31712 if ac_fn_cxx_try_link "$LINENO"; then :
31713   ac_cv_lib_jpeg_main=yes
31714 else
31715   ac_cv_lib_jpeg_main=no
31716 fi
31717 rm -f core conftest.err conftest.$ac_objext \
31718     conftest$ac_exeext conftest.$ac_ext
31719 LIBS=$ac_check_lib_save_LIBS
31720 fi
31721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
31722 $as_echo "$ac_cv_lib_jpeg_main" >&6; }
31723 if test "x$ac_cv_lib_jpeg_main" = x""yes; then :
31724   cat >>confdefs.h <<_ACEOF
31725 #define HAVE_LIBJPEG 1
31726 _ACEOF
31727 
31728   LIBS="-ljpeg $LIBS"
31729 
31730 else
31731    USE_EXTERNAL_LIBJPEG=false
31732                { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
31733 $as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
31734 
31735 fi
31736 
31737 
31738 
31739 ###############################################################################
31740 #
31741 # Check for the gif library
31742 #
31743 
31744 
31745 # Check whether --with-giflib was given.
31746 if test "${with_giflib+set}" = set; then :
31747   withval=$with_giflib;
31748 fi
31749 
31750 
31751 
31752 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
31753 $as_echo_n "checking for which giflib to use... " >&6; }
31754 
31755 # default is bundled
31756 DEFAULT_GIFLIB=bundled
31757 
31758 #
31759 # if user didn't specify, use DEFAULT_GIFLIB
31760 #
31761 if test "x${with_giflib}" = "x"; then
31762     with_giflib=${DEFAULT_GIFLIB}
31763 fi
31764 
31765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
31766 $as_echo "${with_giflib}" >&6; }
31767 
31768 if test "x${with_giflib}" = "xbundled"; then
31769     USE_EXTERNAL_LIBGIF=false
31770 elif test "x${with_giflib}" = "xsystem"; then
31771     ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
31772 if test "x$ac_cv_header_gif_lib_h" = x""yes; then :
31773 
31774 else
31775    as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
31776 fi
31777 
31778 
31779     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
31780 $as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
31781 if test "${ac_cv_lib_gif_DGifGetCode+set}" = set; then :
31782   $as_echo_n "(cached) " >&6
31783 else
31784   ac_check_lib_save_LIBS=$LIBS
31785 LIBS="-lgif  $LIBS"
31786 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31787 /* end confdefs.h.  */
31788 
31789 /* Override any GCC internal prototype to avoid an error.
31790    Use char because int might match the return type of a GCC
31791    builtin and then its argument prototype would still apply.  */
31792 #ifdef __cplusplus
31793 extern "C"
31794 #endif
31795 char DGifGetCode ();
31796 int
31797 main ()
31798 {
31799 return DGifGetCode ();
31800   ;
31801   return 0;
31802 }
31803 _ACEOF
31804 if ac_fn_cxx_try_link "$LINENO"; then :
31805   ac_cv_lib_gif_DGifGetCode=yes
31806 else
31807   ac_cv_lib_gif_DGifGetCode=no
31808 fi
31809 rm -f core conftest.err conftest.$ac_objext \
31810     conftest$ac_exeext conftest.$ac_ext
31811 LIBS=$ac_check_lib_save_LIBS
31812 fi
31813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
31814 $as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
31815 if test "x$ac_cv_lib_gif_DGifGetCode" = x""yes; then :
31816   cat >>confdefs.h <<_ACEOF
31817 #define HAVE_LIBGIF 1
31818 _ACEOF
31819 
31820   LIBS="-lgif $LIBS"
31821 
31822 else
31823    as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
31824 fi
31825 
31826 
31827     USE_EXTERNAL_LIBGIF=true
31828 else
31829     as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
31830 fi
31831 
31832 
31833 ###############################################################################
31834 #
31835 # Check for the zlib library
31836 #
31837 
31838 
31839 # Check whether --with-zlib was given.
31840 if test "${with_zlib+set}" = set; then :
31841   withval=$with_zlib;
31842 fi
31843 
31844 
31845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
31846 $as_echo_n "checking for compress in -lz... " >&6; }
31847 if test "${ac_cv_lib_z_compress+set}" = set; then :
31848   $as_echo_n "(cached) " >&6
31849 else
31850   ac_check_lib_save_LIBS=$LIBS
31851 LIBS="-lz  $LIBS"
31852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31853 /* end confdefs.h.  */
31854 
31855 /* Override any GCC internal prototype to avoid an error.
31856    Use char because int might match the return type of a GCC
31857    builtin and then its argument prototype would still apply.  */
31858 #ifdef __cplusplus
31859 extern "C"
31860 #endif
31861 char compress ();
31862 int
31863 main ()
31864 {
31865 return compress ();
31866   ;
31867   return 0;
31868 }
31869 _ACEOF
31870 if ac_fn_cxx_try_link "$LINENO"; then :
31871   ac_cv_lib_z_compress=yes
31872 else
31873   ac_cv_lib_z_compress=no
31874 fi
31875 rm -f core conftest.err conftest.$ac_objext \
31876     conftest$ac_exeext conftest.$ac_ext
31877 LIBS=$ac_check_lib_save_LIBS
31878 fi
31879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
31880 $as_echo "$ac_cv_lib_z_compress" >&6; }
31881 if test "x$ac_cv_lib_z_compress" = x""yes; then :
31882    ZLIB_FOUND=yes
31883 else
31884    ZLIB_FOUND=no
31885 fi
31886 
31887 
31888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
31889 $as_echo_n "checking for which zlib to use... " >&6; }
31890 
31891 DEFAULT_ZLIB=bundled
31892 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31893 #
31894 # On macosx default is system...on others default is
31895 #
31896     DEFAULT_ZLIB=system
31897 fi
31898 
31899 if test "x${ZLIB_FOUND}" != "xyes"; then
31900 #
31901 # If we don't find any system...set default to bundled
31902 #
31903     DEFAULT_ZLIB=bundled
31904 fi
31905 
31906 #
31907 # If user didn't specify, use DEFAULT_ZLIB
31908 #
31909 if test "x${with_zlib}" = "x"; then
31910     with_zlib=${DEFAULT_ZLIB}
31911 fi
31912 
31913 if test "x${with_zlib}" = "xbundled"; then
31914     USE_EXTERNAL_LIBZ=false
31915     { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
31916 $as_echo "bundled" >&6; }
31917 elif test "x${with_zlib}" = "xsystem"; then
31918     if test "x${ZLIB_FOUND}" = "xyes"; then
31919         USE_EXTERNAL_LIBZ=true
31920         { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
31921 $as_echo "system" >&6; }
31922     else
31923         { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
31924 $as_echo "system not found" >&6; }
31925         as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
31926     fi
31927 else
31928     as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
31929 fi
31930 
31931 
31932 
31933 ###############################################################################
31934 LIBZIP_CAN_USE_MMAP=true
31935 
31936 
31937 
31938 ###############################################################################
31939 #
31940 # Check if altzone exists in time.h
31941 #
31942 
31943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31944 /* end confdefs.h.  */
31945 #include <time.h>
31946 int
31947 main ()
31948 {
31949 return (int)altzone;
31950   ;
31951   return 0;
31952 }
31953 _ACEOF
31954 if ac_fn_cxx_try_link "$LINENO"; then :
31955   has_altzone=yes
31956 else
31957   has_altzone=no
31958 fi
31959 rm -f core conftest.err conftest.$ac_objext \
31960     conftest$ac_exeext conftest.$ac_ext
31961 if test "x$has_altzone" = xyes; then
31962 
31963 $as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
31964 
31965 fi
31966 
31967 ###############################################################################
31968 #
31969 # Check the maths library
31970 #
31971 
31972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
31973 $as_echo_n "checking for cos in -lm... " >&6; }
31974 if test "${ac_cv_lib_m_cos+set}" = set; then :
31975   $as_echo_n "(cached) " >&6
31976 else
31977   ac_check_lib_save_LIBS=$LIBS
31978 LIBS="-lm  $LIBS"
31979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31980 /* end confdefs.h.  */
31981 
31982 /* Override any GCC internal prototype to avoid an error.
31983    Use char because int might match the return type of a GCC
31984    builtin and then its argument prototype would still apply.  */
31985 #ifdef __cplusplus
31986 extern "C"
31987 #endif
31988 char cos ();
31989 int
31990 main ()
31991 {
31992 return cos ();
31993   ;
31994   return 0;
31995 }
31996 _ACEOF
31997 if ac_fn_cxx_try_link "$LINENO"; then :
31998   ac_cv_lib_m_cos=yes
31999 else
32000   ac_cv_lib_m_cos=no
32001 fi
32002 rm -f core conftest.err conftest.$ac_objext \
32003     conftest$ac_exeext conftest.$ac_ext
32004 LIBS=$ac_check_lib_save_LIBS
32005 fi
32006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
32007 $as_echo "$ac_cv_lib_m_cos" >&6; }
32008 if test "x$ac_cv_lib_m_cos" = x""yes; then :
32009   cat >>confdefs.h <<_ACEOF
32010 #define HAVE_LIBM 1
32011 _ACEOF
32012 
32013   LIBS="-lm $LIBS"
32014 
32015 else
32016 
32017                   { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
32018 $as_echo "$as_me: Maths library was not found" >&6;}
32019 
32020 fi
32021 
32022 
32023 
32024 ###############################################################################
32025 #
32026 # Check for libdl.so
32027 
32028 save_LIBS="$LIBS"
32029 LIBS=""
32030 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
32031 $as_echo_n "checking for dlopen in -ldl... " >&6; }
32032 if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
32033   $as_echo_n "(cached) " >&6
32034 else
32035   ac_check_lib_save_LIBS=$LIBS
32036 LIBS="-ldl  $LIBS"
32037 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32038 /* end confdefs.h.  */
32039 
32040 /* Override any GCC internal prototype to avoid an error.
32041    Use char because int might match the return type of a GCC
32042    builtin and then its argument prototype would still apply.  */
32043 #ifdef __cplusplus
32044 extern "C"
32045 #endif
32046 char dlopen ();
32047 int
32048 main ()
32049 {
32050 return dlopen ();
32051   ;
32052   return 0;
32053 }
32054 _ACEOF
32055 if ac_fn_cxx_try_link "$LINENO"; then :
32056   ac_cv_lib_dl_dlopen=yes
32057 else
32058   ac_cv_lib_dl_dlopen=no
32059 fi
32060 rm -f core conftest.err conftest.$ac_objext \
32061     conftest$ac_exeext conftest.$ac_ext
32062 LIBS=$ac_check_lib_save_LIBS
32063 fi
32064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
32065 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
32066 if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
32067   cat >>confdefs.h <<_ACEOF
32068 #define HAVE_LIBDL 1
32069 _ACEOF
32070 
32071   LIBS="-ldl $LIBS"
32072 
32073 fi
32074 
32075 LIBDL="$LIBS"
32076 
32077 LIBS="$save_LIBS"
32078 
32079 
32080 
32081 ###############################################################################
32082 #
32083 # statically link libstdc++ before C++ ABI is stablized on Linux unless
32084 # dynamic build is configured on command line.
32085 #
32086 
32087 # Check whether --with-stdc++lib was given.
32088 if test "${with_stdc__lib+set}" = set; then :
32089   withval=$with_stdc__lib;
32090     if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
32091         && test "x$with_stdc__lib" != xdefault; then
32092       as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
32093     fi
32094 
32095 else
32096   with_stdc__lib=default
32097 
32098 fi
32099 
32100 
32101 if test "x$OPENJDK_TARGET_OS" = xlinux; then
32102     # Test if -lstdc++ works.
32103     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
32104 $as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
32105     ac_ext=cpp
32106 ac_cpp='$CXXCPP $CPPFLAGS'
32107 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32108 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32109 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32110 
32111     OLD_CXXFLAGS="$CXXFLAGS"
32112     CXXFLAGS="$CXXFLAGS -lstdc++"
32113     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32114 /* end confdefs.h.  */
32115 
32116 int
32117 main ()
32118 {
32119 return 0;
32120   ;
32121   return 0;
32122 }
32123 _ACEOF
32124 if ac_fn_cxx_try_link "$LINENO"; then :
32125   has_dynamic_libstdcxx=yes
32126 else
32127   has_dynamic_libstdcxx=no
32128 fi
32129 rm -f core conftest.err conftest.$ac_objext \
32130     conftest$ac_exeext conftest.$ac_ext
32131     CXXFLAGS="$OLD_CXXFLAGS"
32132     ac_ext=cpp
32133 ac_cpp='$CXXCPP $CPPFLAGS'
32134 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32135 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32136 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32137 
32138     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
32139 $as_echo "$has_dynamic_libstdcxx" >&6; }
32140 
32141     # Test if stdc++ can be linked statically.
32142     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
32143 $as_echo_n "checking if static link of stdc++ is possible... " >&6; }
32144     STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
32145     ac_ext=cpp
32146 ac_cpp='$CXXCPP $CPPFLAGS'
32147 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32148 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32149 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32150 
32151     OLD_LIBS="$LIBS"
32152     OLD_CXX="$CXX"
32153     LIBS="$STATIC_STDCXX_FLAGS"
32154     CXX="$CC"
32155     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32156 /* end confdefs.h.  */
32157 
32158 int
32159 main ()
32160 {
32161 return 0;
32162   ;
32163   return 0;
32164 }
32165 _ACEOF
32166 if ac_fn_cxx_try_link "$LINENO"; then :
32167   has_static_libstdcxx=yes
32168 else
32169   has_static_libstdcxx=no
32170 fi
32171 rm -f core conftest.err conftest.$ac_objext \
32172     conftest$ac_exeext conftest.$ac_ext
32173     LIBS="$OLD_LIBS"
32174     CXX="$OLD_CXX"
32175     ac_ext=cpp
32176 ac_cpp='$CXXCPP $CPPFLAGS'
32177 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32178 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32179 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32180 
32181     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
32182 $as_echo "$has_static_libstdcxx" >&6; }
32183 
32184     if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
32185         as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
32186     fi
32187 
32188     if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
32189         as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
32190     fi
32191 
32192     if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
32193         as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
32194     fi
32195 
32196     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
32197 $as_echo_n "checking how to link with libstdc++... " >&6; }
32198     # If dynamic was requested, it's available since it would fail above otherwise.
32199     # If dynamic wasn't requested, go with static unless it isn't available.
32200     if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32201         LIBCXX="$LIBCXX -lstdc++"
32202         LDCXX="$CXX"
32203         STATIC_CXX_SETTING="STATIC_CXX=false"
32204         { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
32205 $as_echo "dynamic" >&6; }
32206     else
32207         LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
32208         LDCXX="$CC"
32209         STATIC_CXX_SETTING="STATIC_CXX=true"
32210         { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
32211 $as_echo "static" >&6; }
32212     fi
32213 fi
32214 
32215 
32216 if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32217     # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
32218 
32219 pkg_failed=no
32220 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
32221 $as_echo_n "checking for LIBFFI... " >&6; }
32222 
32223 if test -n "$LIBFFI_CFLAGS"; then
32224     pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
32225  elif test -n "$PKG_CONFIG"; then
32226     if test -n "$PKG_CONFIG" && \
32227     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
32228   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
32229   ac_status=$?
32230   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32231   test $ac_status = 0; }; then
32232   pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
32233 else
32234   pkg_failed=yes
32235 fi
32236  else
32237     pkg_failed=untried
32238 fi
32239 if test -n "$LIBFFI_LIBS"; then
32240     pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
32241  elif test -n "$PKG_CONFIG"; then
32242     if test -n "$PKG_CONFIG" && \
32243     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
32244   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
32245   ac_status=$?
32246   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32247   test $ac_status = 0; }; then
32248   pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
32249 else
32250   pkg_failed=yes
32251 fi
32252  else
32253     pkg_failed=untried
32254 fi
32255 
32256 
32257 
32258 if test $pkg_failed = yes; then
32259 
32260 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
32261         _pkg_short_errors_supported=yes
32262 else
32263         _pkg_short_errors_supported=no
32264 fi
32265         if test $_pkg_short_errors_supported = yes; then
32266                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
32267         else
32268                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
32269         fi
32270         # Put the nasty error message in config.log where it belongs
32271         echo "$LIBFFI_PKG_ERRORS" >&5
32272 
32273         as_fn_error $? "Package requirements (libffi) were not met:
32274 
32275 $LIBFFI_PKG_ERRORS
32276 
32277 Consider adjusting the PKG_CONFIG_PATH environment variable if you
32278 installed software in a non-standard prefix.
32279 
32280 Alternatively, you may set the environment variables LIBFFI_CFLAGS
32281 and LIBFFI_LIBS to avoid the need to call pkg-config.
32282 See the pkg-config man page for more details.
32283 " "$LINENO" 5
32284 elif test $pkg_failed = untried; then
32285         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32286 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32287 as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
32288 is in your PATH or set the PKG_CONFIG environment variable to the full
32289 path to pkg-config.
32290 
32291 Alternatively, you may set the environment variables LIBFFI_CFLAGS
32292 and LIBFFI_LIBS to avoid the need to call pkg-config.
32293 See the pkg-config man page for more details.
32294 
32295 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
32296 See \`config.log' for more details" "$LINENO" 5 ; }
32297 else
32298         LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
32299         LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
32300         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32301 $as_echo "yes" >&6; }
32302         :
32303 fi
32304 
32305 fi
32306 
32307 if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32308     # Extract the first word of "llvm-config", so it can be a program name with args.
32309 set dummy llvm-config; ac_word=$2
32310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32311 $as_echo_n "checking for $ac_word... " >&6; }
32312 if test "${ac_cv_prog_LLVM_CONFIG+set}" = set; then :
32313   $as_echo_n "(cached) " >&6
32314 else
32315   if test -n "$LLVM_CONFIG"; then
32316   ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
32317 else
32318 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32319 for as_dir in $PATH
32320 do
32321   IFS=$as_save_IFS
32322   test -z "$as_dir" && as_dir=.
32323     for ac_exec_ext in '' $ac_executable_extensions; do
32324   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
32325     ac_cv_prog_LLVM_CONFIG="llvm-config"
32326     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32327     break 2
32328   fi
32329 done
32330   done
32331 IFS=$as_save_IFS
32332 
32333 fi
32334 fi
32335 LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
32336 if test -n "$LLVM_CONFIG"; then
32337   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
32338 $as_echo "$LLVM_CONFIG" >&6; }
32339 else
32340   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32341 $as_echo "no" >&6; }
32342 fi
32343 
32344 
32345 
32346     if test "x$LLVM_CONFIG" != xllvm-config; then
32347         as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
32348     fi
32349 
32350     llvm_components="jit mcjit engine nativecodegen native"
32351     unset LLVM_CFLAGS
32352     for flag in $("$LLVM_CONFIG" --cxxflags); do
32353       if echo "${flag}" | grep -q '^-[ID]'; then
32354         if test "${flag}" != "-D_DEBUG" ; then
32355           if test "${LLVM_CFLAGS}" != "" ; then
32356             LLVM_CFLAGS="${LLVM_CFLAGS} "
32357           fi
32358           LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
32359         fi
32360       fi
32361     done
32362     llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
32363     LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
32364 
32365     unset LLVM_LDFLAGS
32366     for flag in $("${LLVM_CONFIG}" --ldflags); do
32367       if echo "${flag}" | grep -q '^-L'; then
32368         if test "${LLVM_LDFLAGS}" != ""; then
32369           LLVM_LDFLAGS="${LLVM_LDFLAGS} "
32370         fi
32371         LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
32372       fi
32373     done
32374 
32375     unset LLVM_LIBS
32376     for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
32377       if echo "${flag}" | grep -q '^-l'; then
32378         if test "${LLVM_LIBS}" != ""; then
32379           LLVM_LIBS="${LLVM_LIBS} "
32380         fi
32381         LLVM_LIBS="${LLVM_LIBS}${flag}"
32382       fi
32383     done
32384 
32385 
32386 
32387 
32388 fi
32389 
32390 # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
32391 if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
32392     LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
32393 fi
32394 
32395 # TODO better (platform agnostic) test
32396 if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
32397     LIBCXX="-lstdc++"
32398 fi
32399 
32400 
32401 
32402 
32403 
32404 # After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper
32405 
32406 # When using cygwin or msys, we need a wrapper binary that renames
32407 # /cygdrive/c/ arguments into c:/ arguments and peeks into
32408 # @files and rewrites these too! This wrapper binary is
32409 # called fixpath.
32410 FIXPATH=
32411 if test "x$OPENJDK_BUILD_OS" = xwindows; then
32412     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
32413 $as_echo_n "checking if fixpath can be created... " >&6; }
32414     FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
32415     FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
32416     if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
32417       FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
32418       FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
32419       # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
32420       FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
32421     elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
32422       FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
32423       FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
32424 
32425       # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
32426       # @ was chosen as separator to minimize risk of other tools messing around with it
32427       all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
32428       fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
32429 
32430       FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
32431     fi
32432     rm -f $OUTPUT_ROOT/fixpath*
32433     cd $OUTPUT_ROOT
32434     $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
32435     cd $CURDIR
32436 
32437     if test ! -x $OUTPUT_ROOT/fixpath.exe; then
32438         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32439 $as_echo "no" >&6; }
32440         cat $OUTPUT_ROOT/fixpath1.log
32441         as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
32442     fi
32443     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32444 $as_echo "yes" >&6; }
32445     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
32446 $as_echo_n "checking if fixpath.exe works... " >&6; }
32447     cd $OUTPUT_ROOT
32448     $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
32449     cd $CURDIR
32450     if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
32451         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32452 $as_echo "no" >&6; }
32453         cat $OUTPUT_ROOT/fixpath2.log
32454         as_fn_error $? "fixpath did not work!" "$LINENO" 5
32455     fi
32456     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32457 $as_echo "yes" >&6; }
32458     rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
32459 fi
32460 
32461 
32462 
32463 
32464 ###############################################################################
32465 #
32466 # We need to do some final tweaking, when everything else is done.
32467 #
32468 ###############################################################################
32469 
32470 
32471 HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
32472 
32473 
32474 # The name of the Service Agent jar.
32475 SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
32476 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
32477   SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
32478 fi
32479 
32480 
32481 
32482 
32483 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
32484 $as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
32485 
32486 if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
32487     ENABLE_INTREE_EC=yes
32488     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32489 $as_echo "yes" >&6; }
32490 else
32491     ENABLE_INTREE_EC=no
32492     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32493 $as_echo "no" >&6; }
32494 fi
32495 
32496 
32497 
32498 
32499 ###############################################################################
32500 #
32501 # Configure parts of the build that only affect the build performance,
32502 # not the result.
32503 #
32504 ###############################################################################
32505 
32506 
32507   # How many cores do we have on this build system?
32508 
32509 # Check whether --with-num-cores was given.
32510 if test "${with_num_cores+set}" = set; then :
32511   withval=$with_num_cores;
32512 fi
32513 
32514   if test "x$with_num_cores" = x; then
32515     # The number of cores were not specified, try to probe them.
32516 
32517     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
32518 $as_echo_n "checking for number of cores... " >&6; }
32519     NUM_CORES=1
32520     FOUND_CORES=no
32521 
32522     if test -f /proc/cpuinfo; then
32523         # Looks like a Linux (or cygwin) system
32524         NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
32525         FOUND_CORES=yes
32526     elif test -x /usr/sbin/psrinfo; then
32527         # Looks like a Solaris system
32528         NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
32529         FOUND_CORES=yes
32530     elif test -x /usr/sbin/system_profiler; then
32531         # Looks like a MacOSX system
32532         NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
32533         FOUND_CORES=yes
32534     elif test -n "$NUMBER_OF_PROCESSORS"; then
32535         # On windows, look in the env
32536         NUM_CORES=$NUMBER_OF_PROCESSORS
32537         FOUND_CORES=yes
32538     fi
32539 
32540     if test "x$FOUND_CORES" = xyes; then
32541         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
32542 $as_echo "$NUM_CORES" >&6; }
32543     else
32544         { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
32545 $as_echo "could not detect number of cores, defaulting to 1" >&6; }
32546         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
32547 $as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
32548     fi
32549 
32550 
32551   else
32552     NUM_CORES=$with_num_cores
32553   fi
32554 
32555 
32556 
32557   # How much memory do we have on this build system?
32558 
32559 # Check whether --with-memory-size was given.
32560 if test "${with_memory_size+set}" = set; then :
32561   withval=$with_memory_size;
32562 fi
32563 
32564   if test "x$with_memory_size" = x; then
32565     # The memory size was not specified, try to probe it.
32566 
32567     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
32568 $as_echo_n "checking for memory size... " >&6; }
32569     # Default to 1024 MB
32570     MEMORY_SIZE=1024
32571     FOUND_MEM=no
32572 
32573     if test -f /proc/meminfo; then
32574         # Looks like a Linux (or cygwin) system
32575         MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
32576         MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
32577         FOUND_MEM=yes
32578     elif test -x /usr/sbin/prtconf; then
32579         # Looks like a Solaris system
32580         MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'`
32581         FOUND_MEM=yes
32582     elif test -x /usr/sbin/system_profiler; then
32583         # Looks like a MacOSX system
32584         MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
32585         MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
32586         FOUND_MEM=yes
32587     elif test "x$OPENJDK_BUILD_OS" = xwindows; then
32588         # Windows, but without cygwin
32589         MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
32590         MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
32591         FOUND_MEM=yes
32592     fi
32593 
32594     if test "x$FOUND_MEM" = xyes; then
32595         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
32596 $as_echo "$MEMORY_SIZE MB" >&6; }
32597     else
32598         { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
32599 $as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
32600         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
32601 $as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
32602     fi
32603 
32604   else
32605     MEMORY_SIZE=$with_memory_size
32606   fi
32607 
32608 
32609 
32610   # Provide a decent default number of parallel jobs for make depending on
32611   # number of cores, amount of memory and machine architecture.
32612 
32613 # Check whether --with-jobs was given.
32614 if test "${with_jobs+set}" = set; then :
32615   withval=$with_jobs;
32616 fi
32617 
32618   if test "x$with_jobs" = x; then
32619     # Number of jobs was not specified, calculate.
32620     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
32621 $as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
32622     # Approximate memory in GB, rounding up a bit.
32623     memory_gb=`expr $MEMORY_SIZE / 1100`
32624     # Pick the lowest of memory in gb and number of cores.
32625     if test "$memory_gb" -lt "$NUM_CORES"; then
32626       JOBS="$memory_gb"
32627     else
32628       JOBS="$NUM_CORES"
32629       # On bigger machines, leave some room for other processes to run
32630       if test "$JOBS" -gt "4"; then
32631         JOBS=`expr $JOBS '*' 90 / 100`
32632       fi
32633     fi
32634     # Cap number of jobs to 16
32635     if test "$JOBS" -gt "16"; then
32636       JOBS=16
32637     fi
32638     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
32639 $as_echo "$JOBS" >&6; }
32640   else
32641     JOBS=$with_jobs
32642   fi
32643 
32644 
32645 
32646 # Setup smart javac (after cores and memory have been setup)
32647 
32648 
32649 # Check whether --with-sjavac-server-java was given.
32650 if test "${with_sjavac_server_java+set}" = set; then :
32651   withval=$with_sjavac_server_java;
32652 fi
32653 
32654 
32655 if test "x$with_sjavac_server_java" != x; then
32656     SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
32657     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
32658     if test "x$FOUND_VERSION" = x; then
32659         as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
32660     fi
32661 else
32662     SJAVAC_SERVER_JAVA=""
32663     # Hotspot specific options.
32664 
32665     # Test if -verbosegc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
32666     # If so, then append -verbosegc to SJAVAC_SERVER_JAVA
32667     FOUND_WARN=`$JAVA -verbosegc -version 2>&1 | grep -i warn`
32668     FOUND_VERSION=`$JAVA -verbosegc -version 2>&1 | grep " version \""`
32669     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32670         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
32671     fi
32672 
32673     # JRockit specific options.
32674 
32675     # Test if -Xverbose:gc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
32676     # If so, then append -Xverbose:gc to SJAVAC_SERVER_JAVA
32677     FOUND_WARN=`$JAVA -Xverbose:gc -version 2>&1 | grep -i warn`
32678     FOUND_VERSION=`$JAVA -Xverbose:gc -version 2>&1 | grep " version \""`
32679     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32680         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
32681     fi
32682 
32683     SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
32684 fi
32685 
32686 
32687 
32688 # Check whether --with-sjavac-server-cores was given.
32689 if test "${with_sjavac_server_cores+set}" = set; then :
32690   withval=$with_sjavac_server_cores;
32691 fi
32692 
32693 if test "x$with_sjavac_server_cores" != x; then
32694     SJAVAC_SERVER_CORES="$with_sjavac_server_cores"
32695 else
32696     if test "$NUM_CORES" -gt 16; then
32697         # We set this arbitrary limit because we want to limit the heap
32698         # size of the javac server.
32699         # In the future we will make the javac compilers in the server
32700         # share more and more state, thus enabling us to use more and
32701         # more concurrent threads in the server.
32702         SJAVAC_SERVER_CORES="16"
32703     else
32704         SJAVAC_SERVER_CORES="$NUM_CORES"
32705     fi
32706 
32707     if test "$MEMORY_SIZE" -gt "17000"; then
32708         MAX_HEAP_MEM=10000
32709 
32710     # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
32711     # If so, then append -d64 to SJAVAC_SERVER_JAVA
32712     FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
32713     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
32714     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32715         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
32716     fi
32717 
32718 
32719     # Test if -Xms10G -Xmx10G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
32720     # If so, then append -Xms10G -Xmx10G to SJAVAC_SERVER_JAVA
32721     FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep -i warn`
32722     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep " version \""`
32723     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32724         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
32725     fi
32726 
32727     elif test "$MEMORY_SIZE" -gt "10000"; then
32728         MAX_HEAP_MEM=6000
32729 
32730     # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
32731     # If so, then append -d64 to SJAVAC_SERVER_JAVA
32732     FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
32733     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
32734     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32735         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
32736     fi
32737 
32738 
32739     # Test if -Xms6G -Xmx6G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
32740     # If so, then append -Xms6G -Xmx6G to SJAVAC_SERVER_JAVA
32741     FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep -i warn`
32742     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep " version \""`
32743     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32744         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
32745     fi
32746 
32747     elif test "$MEMORY_SIZE" -gt "5000"; then
32748         MAX_HEAP_MEM=3000
32749 
32750     # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
32751     # If so, then append -d64 to SJAVAC_SERVER_JAVA
32752     FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
32753     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
32754     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32755         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
32756     fi
32757 
32758 
32759     # Test if -Xms1G -Xmx3G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
32760     # If so, then append -Xms1G -Xmx3G to SJAVAC_SERVER_JAVA
32761     FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep -i warn`
32762     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep " version \""`
32763     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32764         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
32765     fi
32766 
32767     elif test "$MEMORY_SIZE" -gt "3800"; then
32768         MAX_HEAP_MEM=2500
32769 
32770     # Test if -Xms1G -Xmx2500M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
32771     # If so, then append -Xms1G -Xmx2500M to SJAVAC_SERVER_JAVA
32772     FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep -i warn`
32773     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep " version \""`
32774     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32775         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
32776     fi
32777 
32778     elif test "$MEMORY_SIZE" -gt "1900"; then
32779         MAX_HEAP_MEM=1200
32780 
32781     # Test if -Xms700M -Xmx1400M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
32782     # If so, then append -Xms700M -Xmx1400M to SJAVAC_SERVER_JAVA
32783     FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep -i warn`
32784     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep " version \""`
32785     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32786         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M"
32787     fi
32788 
32789     elif test "$MEMORY_SIZE" -gt "1000"; then
32790         MAX_HEAP_MEM=900
32791 
32792     # Test if -Xms400M -Xmx1100M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
32793     # If so, then append -Xms400M -Xmx1100M to SJAVAC_SERVER_JAVA
32794     FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep -i warn`
32795     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep " version \""`
32796     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32797         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
32798     fi
32799 
32800     else
32801         MAX_HEAP_MEM=512
32802 
32803     # Test if -Xms256M -Xmx512M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
32804     # If so, then append -Xms256M -Xmx512M to SJAVAC_SERVER_JAVA
32805     FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep -i warn`
32806     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep " version \""`
32807     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32808         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
32809     fi
32810 
32811     fi
32812 
32813 
32814     # Test if -XX:PermSize=32m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
32815     # If so, then append -XX:PermSize=32m to SJAVAC_SERVER_JAVA
32816     FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
32817     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
32818     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32819         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:PermSize=32m"
32820     fi
32821 
32822 
32823     # Test if -XX:MaxPermSize=160m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
32824     # If so, then append -XX:MaxPermSize=160m to SJAVAC_SERVER_JAVA
32825     FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
32826     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
32827     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32828         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m"
32829     fi
32830 
32831 
32832     # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
32833     # If so, then append -XX:ThreadStackSize=$STACK_SIZE to SJAVAC_SERVER_JAVA
32834     FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
32835     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
32836     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32837         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE"
32838     fi
32839 
32840 
32841     MAX_COMPILERS_IN_HEAP=`expr $MAX_HEAP_MEM / 501`
32842     if test "$SJAVAC_SERVER_CORES" -gt "$MAX_COMPILERS_IN_HEAP"; then
32843         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if number of server cores must be reduced" >&5
32844 $as_echo_n "checking if number of server cores must be reduced... " >&6; }
32845         SJAVAC_SERVER_CORES="$MAX_COMPILERS_IN_HEAP"
32846         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&5
32847 $as_echo "yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&6; }
32848     fi
32849 fi
32850 
32851 
32852 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
32853 $as_echo_n "checking whether to use sjavac... " >&6; }
32854 # Check whether --enable-sjavac was given.
32855 if test "${enable_sjavac+set}" = set; then :
32856   enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
32857 else
32858   ENABLE_SJAVAC='no'
32859 fi
32860 
32861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
32862 $as_echo "$ENABLE_SJAVAC" >&6; }
32863 
32864 
32865 if test "x$ENABLE_SJAVAC" = xyes; then
32866     SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
32867 else
32868     SJAVAC_SERVER_DIR=
32869 fi
32870 
32871 
32872 
32873 
32874 # Setup use of ccache, if available
32875 
32876     # Check whether --enable-ccache was given.
32877 if test "${enable_ccache+set}" = set; then :
32878   enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
32879 else
32880   ENABLE_CCACHE=yes
32881 fi
32882 
32883     if test "x$ENABLE_CCACHE" = xyes; then
32884         # Extract the first word of "ccache", so it can be a program name with args.
32885 set dummy ccache; ac_word=$2
32886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32887 $as_echo_n "checking for $ac_word... " >&6; }
32888 if test "${ac_cv_path_CCACHE+set}" = set; then :
32889   $as_echo_n "(cached) " >&6
32890 else
32891   case $CCACHE in
32892   [\\/]* | ?:[\\/]*)
32893   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
32894   ;;
32895   *)
32896   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32897 for as_dir in $PATH
32898 do
32899   IFS=$as_save_IFS
32900   test -z "$as_dir" && as_dir=.
32901     for ac_exec_ext in '' $ac_executable_extensions; do
32902   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
32903     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
32904     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32905     break 2
32906   fi
32907 done
32908   done
32909 IFS=$as_save_IFS
32910 
32911   ;;
32912 esac
32913 fi
32914 CCACHE=$ac_cv_path_CCACHE
32915 if test -n "$CCACHE"; then
32916   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
32917 $as_echo "$CCACHE" >&6; }
32918 else
32919   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32920 $as_echo "no" >&6; }
32921 fi
32922 
32923 
32924     else
32925         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
32926 $as_echo_n "checking for ccache... " >&6; }
32927         { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
32928 $as_echo "explicitly disabled" >&6; }
32929         CCACHE=
32930     fi
32931 
32932 
32933 
32934 # Check whether --with-ccache-dir was given.
32935 if test "${with_ccache_dir+set}" = set; then :
32936   withval=$with_ccache_dir;
32937 fi
32938 
32939 
32940     if test "x$with_ccache_dir" != x; then
32941         # When using a non home ccache directory, assume the use is to share ccache files
32942         # with other users. Thus change the umask.
32943         SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
32944     fi
32945     if test "x$CCACHE" != x; then
32946         CCACHE_SLOPPINESS=time_macros
32947         CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
32948 
32949         if test "x$SET_CCACHE_DIR" != x; then
32950             mkdir -p $with_ccache_dir > /dev/null 2>&1
32951             chmod a+rwxs $with_ccache_dir > /dev/null 2>&1
32952         fi
32953     fi
32954 
32955 
32956 # Can the C/C++ compiler use precompiled headers?
32957 
32958 
32959 ###############################################################################
32960 #
32961 # Can the C/C++ compiler use precompiled headers?
32962 #
32963 # Check whether --enable-precompiled-headers was given.
32964 if test "${enable_precompiled_headers+set}" = set; then :
32965   enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
32966 else
32967   ENABLE_PRECOMPH=yes
32968 fi
32969 
32970 
32971   USE_PRECOMPILED_HEADER=1
32972   if test "x$ENABLE_PRECOMPH" = xno; then
32973     USE_PRECOMPILED_HEADER=0
32974   elif test "x$CCACHE" != x; then
32975     # Disable precompiled header when using ccache as they don't work well together.
32976     USE_PRECOMPILED_HEADER=0
32977   elif test "x$ENABLE_PRECOMPH" = xyes; then
32978     # Check that the compiler actually supports precomp headers.
32979     if test "x$GCC" = xyes; then
32980        { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
32981 $as_echo_n "checking that precompiled headers work... " >&6; }
32982        echo "int alfa();" > conftest.h
32983        $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
32984        if test ! -f conftest.hpp.gch; then
32985          USE_PRECOMPILED_HEADER=0
32986          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32987 $as_echo "no" >&6; }
32988        else
32989          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32990 $as_echo "yes" >&6; }
32991        fi
32992        rm -f conftest.h conftest.hpp.gch
32993     fi
32994   fi
32995 
32996 
32997 
32998 
32999 ###############################################################################
33000 #
33001 # And now the finish...
33002 #
33003 ###############################################################################
33004 
33005 # Check for some common pitfalls
33006 
33007   if test x"$OPENJDK_BUILD_OS" = xwindows; then
33008     file_to_test="$SRC_ROOT/LICENSE"
33009     if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
33010       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
33011     fi
33012   fi
33013 
33014 
33015 
33016 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
33017 $as_echo_n "checking if build directory is on local disk... " >&6; }
33018 
33019         # df -l lists only local disks; if the given directory is not found then
33020         # a non-zero exit code is given
33021   if test "x$DF" = x; then
33022     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33023       # msys does not have df; use Windows "net use" instead.
33024       IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
33025       if test "x$IS_NETWORK_DISK" = x; then
33026         OUTPUT_DIR_IS_LOCAL="yes"
33027       else
33028         OUTPUT_DIR_IS_LOCAL="no"
33029       fi
33030     else
33031       # No df here, say it's local
33032       OUTPUT_DIR_IS_LOCAL="yes"
33033     fi
33034   else
33035     if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
33036       OUTPUT_DIR_IS_LOCAL="yes"
33037     else
33038       OUTPUT_DIR_IS_LOCAL="no"
33039     fi
33040   fi
33041 
33042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
33043 $as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
33044 
33045 
33046 
33047 # Check if the user has any old-style ALT_ variables set.
33048 FOUND_ALT_VARIABLES=`env | grep ^ALT_`
33049 
33050 # Before generating output files, test if they exist. If they do, this is a reconfigure.
33051 # Since we can't properly handle the dependencies for this, warn the user about the situation
33052 if test -e $OUTPUT_ROOT/spec.gmk; then
33053   IS_RECONFIGURE=yes
33054 else
33055   IS_RECONFIGURE=no
33056 fi
33057 
33058 if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
33059   HIDE_PERFORMANCE_HINTS=yes
33060 else
33061   HIDE_PERFORMANCE_HINTS=no
33062   # Hide it the next time around...
33063   $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
33064 fi
33065 
33066 
33067 
33068 # At the end, call the custom hook. (Dummy macro if no custom sources available)
33069 
33070 
33071 # We're messing a bit with internal autoconf variables to put the config.status
33072 # in the output directory instead of the current directory.
33073 CONFIG_STATUS="$OUTPUT_ROOT/config.status"
33074 # Create the actual output files. Now the main work of configure is done.
33075 cat >confcache <<\_ACEOF
33076 # This file is a shell script that caches the results of configure
33077 # tests run on this system so they can be shared between configure
33078 # scripts and configure runs, see configure's option --config-cache.
33079 # It is not useful on other systems.  If it contains results you don't
33080 # want to keep, you may remove or edit it.
33081 #
33082 # config.status only pays attention to the cache file if you give it
33083 # the --recheck option to rerun configure.
33084 #
33085 # `ac_cv_env_foo' variables (set or unset) will be overridden when
33086 # loading this file, other *unset* `ac_cv_foo' will be assigned the
33087 # following values.
33088 
33089 _ACEOF
33090 
33091 # The following way of writing the cache mishandles newlines in values,
33092 # but we know of no workaround that is simple, portable, and efficient.
33093 # So, we kill variables containing newlines.
33094 # Ultrix sh set writes to stderr and can't be redirected directly,
33095 # and sets the high bit in the cache file unless we assign to the vars.
33096 (
33097   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
33098     eval ac_val=\$$ac_var
33099     case $ac_val in #(
33100     *${as_nl}*)
33101       case $ac_var in #(
33102       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
33103 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
33104       esac
33105       case $ac_var in #(
33106       _ | IFS | as_nl) ;; #(
33107       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
33108       *) { eval $ac_var=; unset $ac_var;} ;;
33109       esac ;;
33110     esac
33111   done
33112 
33113   (set) 2>&1 |
33114     case $as_nl`(ac_space=' '; set) 2>&1` in #(
33115     *${as_nl}ac_space=\ *)
33116       # `set' does not quote correctly, so add quotes: double-quote
33117       # substitution turns \\\\ into \\, and sed turns \\ into \.
33118       sed -n \
33119         "s/'/'\\\\''/g;
33120           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
33121       ;; #(
33122     *)
33123       # `set' quotes correctly as required by POSIX, so do not add quotes.
33124       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
33125       ;;
33126     esac |
33127     sort
33128 ) |
33129   sed '
33130      /^ac_cv_env_/b end
33131      t clear
33132      :clear
33133      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
33134      t end
33135      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
33136      :end' >>confcache
33137 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
33138   if test -w "$cache_file"; then
33139     test "x$cache_file" != "x/dev/null" &&
33140       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
33141 $as_echo "$as_me: updating cache $cache_file" >&6;}
33142     cat confcache >$cache_file
33143   else
33144     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
33145 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
33146   fi
33147 fi
33148 rm -f confcache
33149 
33150 test "x$prefix" = xNONE && prefix=$ac_default_prefix
33151 # Let make expand exec_prefix.
33152 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
33153 
33154 DEFS=-DHAVE_CONFIG_H
33155 
33156 ac_libobjs=
33157 ac_ltlibobjs=
33158 U=
33159 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
33160   # 1. Remove the extension, and $U if already installed.
33161   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
33162   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
33163   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
33164   #    will be set to the directory where LIBOBJS objects are built.
33165   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
33166   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
33167 done
33168 LIBOBJS=$ac_libobjs
33169 
33170 LTLIBOBJS=$ac_ltlibobjs
33171 
33172 
33173 
33174 : ${CONFIG_STATUS=./config.status}
33175 ac_write_fail=0
33176 ac_clean_files_save=$ac_clean_files
33177 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
33178 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
33179 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
33180 as_write_fail=0
33181 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
33182 #! $SHELL
33183 # Generated by $as_me.
33184 # Run this file to recreate the current configuration.
33185 # Compiler output produced by configure, useful for debugging
33186 # configure, is in config.log if it exists.
33187 
33188 debug=false
33189 ac_cs_recheck=false
33190 ac_cs_silent=false
33191 
33192 SHELL=\${CONFIG_SHELL-$SHELL}
33193 export SHELL
33194 _ASEOF
33195 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
33196 ## -------------------- ##
33197 ## M4sh Initialization. ##
33198 ## -------------------- ##
33199 
33200 # Be more Bourne compatible
33201 DUALCASE=1; export DUALCASE # for MKS sh
33202 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
33203   emulate sh
33204   NULLCMD=:
33205   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
33206   # is contrary to our usage.  Disable this feature.
33207   alias -g '${1+"$@"}'='"$@"'
33208   setopt NO_GLOB_SUBST
33209 else
33210   case `(set -o) 2>/dev/null` in #(
33211   *posix*) :
33212     set -o posix ;; #(
33213   *) :
33214      ;;
33215 esac
33216 fi
33217 
33218 
33219 as_nl='
33220 '
33221 export as_nl
33222 # Printing a long string crashes Solaris 7 /usr/bin/printf.
33223 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
33224 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
33225 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
33226 # Prefer a ksh shell builtin over an external printf program on Solaris,
33227 # but without wasting forks for bash or zsh.
33228 if test -z "$BASH_VERSION$ZSH_VERSION" \
33229     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
33230   as_echo='print -r --'
33231   as_echo_n='print -rn --'
33232 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
33233   as_echo='printf %s\n'
33234   as_echo_n='printf %s'
33235 else
33236   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
33237     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
33238     as_echo_n='/usr/ucb/echo -n'
33239   else
33240     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
33241     as_echo_n_body='eval
33242       arg=$1;
33243       case $arg in #(
33244       *"$as_nl"*)
33245         expr "X$arg" : "X\\(.*\\)$as_nl";
33246         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
33247       esac;
33248       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
33249     '
33250     export as_echo_n_body
33251     as_echo_n='sh -c $as_echo_n_body as_echo'
33252   fi
33253   export as_echo_body
33254   as_echo='sh -c $as_echo_body as_echo'
33255 fi
33256 
33257 # The user is always right.
33258 if test "${PATH_SEPARATOR+set}" != set; then
33259   PATH_SEPARATOR=:
33260   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
33261     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
33262       PATH_SEPARATOR=';'
33263   }
33264 fi
33265 
33266 
33267 # IFS
33268 # We need space, tab and new line, in precisely that order.  Quoting is
33269 # there to prevent editors from complaining about space-tab.
33270 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
33271 # splitting by setting IFS to empty value.)
33272 IFS=" ""        $as_nl"
33273 
33274 # Find who we are.  Look in the path if we contain no directory separator.
33275 case $0 in #((
33276   *[\\/]* ) as_myself=$0 ;;
33277   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33278 for as_dir in $PATH
33279 do
33280   IFS=$as_save_IFS
33281   test -z "$as_dir" && as_dir=.
33282     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
33283   done
33284 IFS=$as_save_IFS
33285 
33286      ;;
33287 esac
33288 # We did not find ourselves, most probably we were run as `sh COMMAND'
33289 # in which case we are not to be found in the path.
33290 if test "x$as_myself" = x; then
33291   as_myself=$0
33292 fi
33293 if test ! -f "$as_myself"; then
33294   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
33295   exit 1
33296 fi
33297 
33298 # Unset variables that we do not need and which cause bugs (e.g. in
33299 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
33300 # suppresses any "Segmentation fault" message there.  '((' could
33301 # trigger a bug in pdksh 5.2.14.
33302 for as_var in BASH_ENV ENV MAIL MAILPATH
33303 do eval test x\${$as_var+set} = xset \
33304   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
33305 done
33306 PS1='$ '
33307 PS2='> '
33308 PS4='+ '
33309 
33310 # NLS nuisances.
33311 LC_ALL=C
33312 export LC_ALL
33313 LANGUAGE=C
33314 export LANGUAGE
33315 
33316 # CDPATH.
33317 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
33318 
33319 
33320 # as_fn_error STATUS ERROR [LINENO LOG_FD]
33321 # ----------------------------------------
33322 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
33323 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
33324 # script with STATUS, using 1 if that was 0.
33325 as_fn_error ()
33326 {
33327   as_status=$1; test $as_status -eq 0 && as_status=1
33328   if test "$4"; then
33329     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
33330     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
33331   fi
33332   $as_echo "$as_me: error: $2" >&2
33333   as_fn_exit $as_status
33334 } # as_fn_error
33335 
33336 
33337 # as_fn_set_status STATUS
33338 # -----------------------
33339 # Set $? to STATUS, without forking.
33340 as_fn_set_status ()
33341 {
33342   return $1
33343 } # as_fn_set_status
33344 
33345 # as_fn_exit STATUS
33346 # -----------------
33347 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
33348 as_fn_exit ()
33349 {
33350   set +e
33351   as_fn_set_status $1
33352   exit $1
33353 } # as_fn_exit
33354 
33355 # as_fn_unset VAR
33356 # ---------------
33357 # Portably unset VAR.
33358 as_fn_unset ()
33359 {
33360   { eval $1=; unset $1;}
33361 }
33362 as_unset=as_fn_unset
33363 # as_fn_append VAR VALUE
33364 # ----------------------
33365 # Append the text in VALUE to the end of the definition contained in VAR. Take
33366 # advantage of any shell optimizations that allow amortized linear growth over
33367 # repeated appends, instead of the typical quadratic growth present in naive
33368 # implementations.
33369 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
33370   eval 'as_fn_append ()
33371   {
33372     eval $1+=\$2
33373   }'
33374 else
33375   as_fn_append ()
33376   {
33377     eval $1=\$$1\$2
33378   }
33379 fi # as_fn_append
33380 
33381 # as_fn_arith ARG...
33382 # ------------------
33383 # Perform arithmetic evaluation on the ARGs, and store the result in the
33384 # global $as_val. Take advantage of shells that can avoid forks. The arguments
33385 # must be portable across $(()) and expr.
33386 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
33387   eval 'as_fn_arith ()
33388   {
33389     as_val=$(( $* ))
33390   }'
33391 else
33392   as_fn_arith ()
33393   {
33394     as_val=`expr "$@" || test $? -eq 1`
33395   }
33396 fi # as_fn_arith
33397 
33398 
33399 if expr a : '\(a\)' >/dev/null 2>&1 &&
33400    test "X`expr 00001 : '.*\(...\)'`" = X001; then
33401   as_expr=expr
33402 else
33403   as_expr=false
33404 fi
33405 
33406 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
33407   as_basename=basename
33408 else
33409   as_basename=false
33410 fi
33411 
33412 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
33413   as_dirname=dirname
33414 else
33415   as_dirname=false
33416 fi
33417 
33418 as_me=`$as_basename -- "$0" ||
33419 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
33420          X"$0" : 'X\(//\)$' \| \
33421          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
33422 $as_echo X/"$0" |
33423     sed '/^.*\/\([^/][^/]*\)\/*$/{
33424             s//\1/
33425             q
33426           }
33427           /^X\/\(\/\/\)$/{
33428             s//\1/
33429             q
33430           }
33431           /^X\/\(\/\).*/{
33432             s//\1/
33433             q
33434           }
33435           s/.*/./; q'`
33436 
33437 # Avoid depending upon Character Ranges.
33438 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
33439 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
33440 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
33441 as_cr_digits='0123456789'
33442 as_cr_alnum=$as_cr_Letters$as_cr_digits
33443 
33444 ECHO_C= ECHO_N= ECHO_T=
33445 case `echo -n x` in #(((((
33446 -n*)
33447   case `echo 'xy\c'` in
33448   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
33449   xy)  ECHO_C='\c';;
33450   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
33451        ECHO_T=' ';;
33452   esac;;
33453 *)
33454   ECHO_N='-n';;
33455 esac
33456 
33457 rm -f conf$$ conf$$.exe conf$$.file
33458 if test -d conf$$.dir; then
33459   rm -f conf$$.dir/conf$$.file
33460 else
33461   rm -f conf$$.dir
33462   mkdir conf$$.dir 2>/dev/null
33463 fi
33464 if (echo >conf$$.file) 2>/dev/null; then
33465   if ln -s conf$$.file conf$$ 2>/dev/null; then
33466     as_ln_s='ln -s'
33467     # ... but there are two gotchas:
33468     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
33469     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
33470     # In both cases, we have to default to `cp -p'.
33471     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
33472       as_ln_s='cp -p'
33473   elif ln conf$$.file conf$$ 2>/dev/null; then
33474     as_ln_s=ln
33475   else
33476     as_ln_s='cp -p'
33477   fi
33478 else
33479   as_ln_s='cp -p'
33480 fi
33481 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
33482 rmdir conf$$.dir 2>/dev/null
33483 
33484 
33485 # as_fn_mkdir_p
33486 # -------------
33487 # Create "$as_dir" as a directory, including parents if necessary.
33488 as_fn_mkdir_p ()
33489 {
33490 
33491   case $as_dir in #(
33492   -*) as_dir=./$as_dir;;
33493   esac
33494   test -d "$as_dir" || eval $as_mkdir_p || {
33495     as_dirs=
33496     while :; do
33497       case $as_dir in #(
33498       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
33499       *) as_qdir=$as_dir;;
33500       esac
33501       as_dirs="'$as_qdir' $as_dirs"
33502       as_dir=`$as_dirname -- "$as_dir" ||
33503 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
33504          X"$as_dir" : 'X\(//\)[^/]' \| \
33505          X"$as_dir" : 'X\(//\)$' \| \
33506          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
33507 $as_echo X"$as_dir" |
33508     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
33509             s//\1/
33510             q
33511           }
33512           /^X\(\/\/\)[^/].*/{
33513             s//\1/
33514             q
33515           }
33516           /^X\(\/\/\)$/{
33517             s//\1/
33518             q
33519           }
33520           /^X\(\/\).*/{
33521             s//\1/
33522             q
33523           }
33524           s/.*/./; q'`
33525       test -d "$as_dir" && break
33526     done
33527     test -z "$as_dirs" || eval "mkdir $as_dirs"
33528   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
33529 
33530 
33531 } # as_fn_mkdir_p
33532 if mkdir -p . 2>/dev/null; then
33533   as_mkdir_p='mkdir -p "$as_dir"'
33534 else
33535   test -d ./-p && rmdir ./-p
33536   as_mkdir_p=false
33537 fi
33538 
33539 if test -x / >/dev/null 2>&1; then
33540   as_test_x='test -x'
33541 else
33542   if ls -dL / >/dev/null 2>&1; then
33543     as_ls_L_option=L
33544   else
33545     as_ls_L_option=
33546   fi
33547   as_test_x='
33548     eval sh -c '\''
33549       if test -d "$1"; then
33550         test -d "$1/.";
33551       else
33552         case $1 in #(
33553         -*)set "./$1";;
33554         esac;
33555         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
33556         ???[sx]*):;;*)false;;esac;fi
33557     '\'' sh
33558   '
33559 fi
33560 as_executable_p=$as_test_x
33561 
33562 # Sed expression to map a string onto a valid CPP name.
33563 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
33564 
33565 # Sed expression to map a string onto a valid variable name.
33566 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
33567 
33568 
33569 exec 6>&1
33570 ## ----------------------------------- ##
33571 ## Main body of $CONFIG_STATUS script. ##
33572 ## ----------------------------------- ##
33573 _ASEOF
33574 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
33575 
33576 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33577 # Save the log message, to keep $0 and so on meaningful, and to
33578 # report actual input values of CONFIG_FILES etc. instead of their
33579 # values after options handling.
33580 ac_log="
33581 This file was extended by OpenJDK $as_me jdk8, which was
33582 generated by GNU Autoconf 2.67.  Invocation command line was
33583 
33584   CONFIG_FILES    = $CONFIG_FILES
33585   CONFIG_HEADERS  = $CONFIG_HEADERS
33586   CONFIG_LINKS    = $CONFIG_LINKS
33587   CONFIG_COMMANDS = $CONFIG_COMMANDS
33588   $ $0 $@
33589 
33590 on `(hostname || uname -n) 2>/dev/null | sed 1q`
33591 "
33592 
33593 _ACEOF
33594 
33595 case $ac_config_files in *"
33596 "*) set x $ac_config_files; shift; ac_config_files=$*;;
33597 esac
33598 
33599 case $ac_config_headers in *"
33600 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
33601 esac
33602 
33603 
33604 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33605 # Files that config.status was made for.
33606 config_files="$ac_config_files"
33607 config_headers="$ac_config_headers"
33608 
33609 _ACEOF
33610 
33611 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33612 ac_cs_usage="\
33613 \`$as_me' instantiates files and other configuration actions
33614 from templates according to the current configuration.  Unless the files
33615 and actions are specified as TAGs, all are instantiated by default.
33616 
33617 Usage: $0 [OPTION]... [TAG]...
33618 
33619   -h, --help       print this help, then exit
33620   -V, --version    print version number and configuration settings, then exit
33621       --config     print configuration, then exit
33622   -q, --quiet, --silent
33623                    do not print progress messages
33624   -d, --debug      don't remove temporary files
33625       --recheck    update $as_me by reconfiguring in the same conditions
33626       --file=FILE[:TEMPLATE]
33627                    instantiate the configuration file FILE
33628       --header=FILE[:TEMPLATE]
33629                    instantiate the configuration header FILE
33630 
33631 Configuration files:
33632 $config_files
33633 
33634 Configuration headers:
33635 $config_headers
33636 
33637 Report bugs to <build-dev@openjdk.java.net>.
33638 OpenJDK home page: <http://openjdk.java.net>."
33639 
33640 _ACEOF
33641 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33642 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
33643 ac_cs_version="\\
33644 OpenJDK config.status jdk8
33645 configured by $0, generated by GNU Autoconf 2.67,
33646   with options \\"\$ac_cs_config\\"
33647 
33648 Copyright (C) 2010 Free Software Foundation, Inc.
33649 This config.status script is free software; the Free Software Foundation
33650 gives unlimited permission to copy, distribute and modify it."
33651 
33652 ac_pwd='$ac_pwd'
33653 srcdir='$srcdir'
33654 AWK='$AWK'
33655 test -n "\$AWK" || AWK=awk
33656 _ACEOF
33657 
33658 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33659 # The default lists apply if the user does not specify any file.
33660 ac_need_defaults=:
33661 while test $# != 0
33662 do
33663   case $1 in
33664   --*=?*)
33665     ac_option=`expr "X$1" : 'X\([^=]*\)='`
33666     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
33667     ac_shift=:
33668     ;;
33669   --*=)
33670     ac_option=`expr "X$1" : 'X\([^=]*\)='`
33671     ac_optarg=
33672     ac_shift=:
33673     ;;
33674   *)
33675     ac_option=$1
33676     ac_optarg=$2
33677     ac_shift=shift
33678     ;;
33679   esac
33680 
33681   case $ac_option in
33682   # Handling of the options.
33683   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
33684     ac_cs_recheck=: ;;
33685   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
33686     $as_echo "$ac_cs_version"; exit ;;
33687   --config | --confi | --conf | --con | --co | --c )
33688     $as_echo "$ac_cs_config"; exit ;;
33689   --debug | --debu | --deb | --de | --d | -d )
33690     debug=: ;;
33691   --file | --fil | --fi | --f )
33692     $ac_shift
33693     case $ac_optarg in
33694     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
33695     '') as_fn_error $? "missing file argument" ;;
33696     esac
33697     as_fn_append CONFIG_FILES " '$ac_optarg'"
33698     ac_need_defaults=false;;
33699   --header | --heade | --head | --hea )
33700     $ac_shift
33701     case $ac_optarg in
33702     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
33703     esac
33704     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
33705     ac_need_defaults=false;;
33706   --he | --h)
33707     # Conflict between --help and --header
33708     as_fn_error $? "ambiguous option: \`$1'
33709 Try \`$0 --help' for more information.";;
33710   --help | --hel | -h )
33711     $as_echo "$ac_cs_usage"; exit ;;
33712   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
33713   | -silent | --silent | --silen | --sile | --sil | --si | --s)
33714     ac_cs_silent=: ;;
33715 
33716   # This is an error.
33717   -*) as_fn_error $? "unrecognized option: \`$1'
33718 Try \`$0 --help' for more information." ;;
33719 
33720   *) as_fn_append ac_config_targets " $1"
33721      ac_need_defaults=false ;;
33722 
33723   esac
33724   shift
33725 done
33726 
33727 ac_configure_extra_args=
33728 
33729 if $ac_cs_silent; then
33730   exec 6>/dev/null
33731   ac_configure_extra_args="$ac_configure_extra_args --silent"
33732 fi
33733 
33734 _ACEOF
33735 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33736 if \$ac_cs_recheck; then
33737   set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
33738   shift
33739   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
33740   CONFIG_SHELL='$SHELL'
33741   export CONFIG_SHELL
33742   exec "\$@"
33743 fi
33744 
33745 _ACEOF
33746 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33747 exec 5>>config.log
33748 {
33749   echo
33750   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
33751 ## Running $as_me. ##
33752 _ASBOX
33753   $as_echo "$ac_log"
33754 } >&5
33755 
33756 _ACEOF
33757 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33758 _ACEOF
33759 
33760 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33761 
33762 # Handling of arguments.
33763 for ac_config_target in $ac_config_targets
33764 do
33765   case $ac_config_target in
33766     "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
33767     "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
33768     "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
33769     "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
33770     "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
33771     "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
33772     "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
33773 
33774   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
33775   esac
33776 done
33777 
33778 
33779 # If the user did not use the arguments to specify the items to instantiate,
33780 # then the envvar interface is used.  Set only those that are not.
33781 # We use the long form for the default assignment because of an extremely
33782 # bizarre bug on SunOS 4.1.3.
33783 if $ac_need_defaults; then
33784   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
33785   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
33786 fi
33787 
33788 # Have a temporary directory for convenience.  Make it in the build tree
33789 # simply because there is no reason against having it here, and in addition,
33790 # creating and moving files from /tmp can sometimes cause problems.
33791 # Hook for its removal unless debugging.
33792 # Note that there is a small window in which the directory will not be cleaned:
33793 # after its creation but before its name has been assigned to `$tmp'.
33794 $debug ||
33795 {
33796   tmp=
33797   trap 'exit_status=$?
33798   { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
33799 ' 0
33800   trap 'as_fn_exit 1' 1 2 13 15
33801 }
33802 # Create a (secure) tmp directory for tmp files.
33803 
33804 {
33805   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
33806   test -n "$tmp" && test -d "$tmp"
33807 }  ||
33808 {
33809   tmp=./conf$$-$RANDOM
33810   (umask 077 && mkdir "$tmp")
33811 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
33812 
33813 # Set up the scripts for CONFIG_FILES section.
33814 # No need to generate them if there are no CONFIG_FILES.
33815 # This happens for instance with `./config.status config.h'.
33816 if test -n "$CONFIG_FILES"; then
33817 
33818 
33819 ac_cr=`echo X | tr X '\015'`
33820 # On cygwin, bash can eat \r inside `` if the user requested igncr.
33821 # But we know of no other shell where ac_cr would be empty at this
33822 # point, so we can use a bashism as a fallback.
33823 if test "x$ac_cr" = x; then
33824   eval ac_cr=\$\'\\r\'
33825 fi
33826 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
33827 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
33828   ac_cs_awk_cr='\\r'
33829 else
33830   ac_cs_awk_cr=$ac_cr
33831 fi
33832 
33833 echo 'BEGIN {' >"$tmp/subs1.awk" &&
33834 _ACEOF
33835 
33836 
33837 {
33838   echo "cat >conf$$subs.awk <<_ACEOF" &&
33839   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
33840   echo "_ACEOF"
33841 } >conf$$subs.sh ||
33842   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
33843 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
33844 ac_delim='%!_!# '
33845 for ac_last_try in false false false false false :; do
33846   . ./conf$$subs.sh ||
33847     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
33848 
33849   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
33850   if test $ac_delim_n = $ac_delim_num; then
33851     break
33852   elif $ac_last_try; then
33853     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
33854   else
33855     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
33856   fi
33857 done
33858 rm -f conf$$subs.sh
33859 
33860 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33861 cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
33862 _ACEOF
33863 sed -n '
33864 h
33865 s/^/S["/; s/!.*/"]=/
33866 p
33867 g
33868 s/^[^!]*!//
33869 :repl
33870 t repl
33871 s/'"$ac_delim"'$//
33872 t delim
33873 :nl
33874 h
33875 s/\(.\{148\}\)..*/\1/
33876 t more1
33877 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
33878 p
33879 n
33880 b repl
33881 :more1
33882 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
33883 p
33884 g
33885 s/.\{148\}//
33886 t nl
33887 :delim
33888 h
33889 s/\(.\{148\}\)..*/\1/
33890 t more2
33891 s/["\\]/\\&/g; s/^/"/; s/$/"/
33892 p
33893 b
33894 :more2
33895 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
33896 p
33897 g
33898 s/.\{148\}//
33899 t delim
33900 ' <conf$$subs.awk | sed '
33901 /^[^""]/{
33902   N
33903   s/\n//
33904 }
33905 ' >>$CONFIG_STATUS || ac_write_fail=1
33906 rm -f conf$$subs.awk
33907 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33908 _ACAWK
33909 cat >>"\$tmp/subs1.awk" <<_ACAWK &&
33910   for (key in S) S_is_set[key] = 1
33911   FS = ""
33912 
33913 }
33914 {
33915   line = $ 0
33916   nfields = split(line, field, "@")
33917   substed = 0
33918   len = length(field[1])
33919   for (i = 2; i < nfields; i++) {
33920     key = field[i]
33921     keylen = length(key)
33922     if (S_is_set[key]) {
33923       value = S[key]
33924       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
33925       len += length(value) + length(field[++i])
33926       substed = 1
33927     } else
33928       len += 1 + keylen
33929   }
33930 
33931   print line
33932 }
33933 
33934 _ACAWK
33935 _ACEOF
33936 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33937 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
33938   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
33939 else
33940   cat
33941 fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
33942   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
33943 _ACEOF
33944 
33945 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
33946 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
33947 # trailing colons and then remove the whole line if VPATH becomes empty
33948 # (actually we leave an empty line to preserve line numbers).
33949 if test "x$srcdir" = x.; then
33950   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
33951 h
33952 s///
33953 s/^/:/
33954 s/[      ]*$/:/
33955 s/:\$(srcdir):/:/g
33956 s/:\${srcdir}:/:/g
33957 s/:@srcdir@:/:/g
33958 s/^:*//
33959 s/:*$//
33960 x
33961 s/\(=[   ]*\).*/\1/
33962 G
33963 s/\n//
33964 s/^[^=]*=[       ]*$//
33965 }'
33966 fi
33967 
33968 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33969 fi # test -n "$CONFIG_FILES"
33970 
33971 # Set up the scripts for CONFIG_HEADERS section.
33972 # No need to generate them if there are no CONFIG_HEADERS.
33973 # This happens for instance with `./config.status Makefile'.
33974 if test -n "$CONFIG_HEADERS"; then
33975 cat >"$tmp/defines.awk" <<\_ACAWK ||
33976 BEGIN {
33977 _ACEOF
33978 
33979 # Transform confdefs.h into an awk script `defines.awk', embedded as
33980 # here-document in config.status, that substitutes the proper values into
33981 # config.h.in to produce config.h.
33982 
33983 # Create a delimiter string that does not exist in confdefs.h, to ease
33984 # handling of long lines.
33985 ac_delim='%!_!# '
33986 for ac_last_try in false false :; do
33987   ac_t=`sed -n "/$ac_delim/p" confdefs.h`
33988   if test -z "$ac_t"; then
33989     break
33990   elif $ac_last_try; then
33991     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
33992   else
33993     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
33994   fi
33995 done
33996 
33997 # For the awk script, D is an array of macro values keyed by name,
33998 # likewise P contains macro parameters if any.  Preserve backslash
33999 # newline sequences.
34000 
34001 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
34002 sed -n '
34003 s/.\{148\}/&'"$ac_delim"'/g
34004 t rset
34005 :rset
34006 s/^[     ]*#[    ]*define[       ][      ]*/ /
34007 t def
34008 d
34009 :def
34010 s/\\$//
34011 t bsnl
34012 s/["\\]/\\&/g
34013 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
34014 D["\1"]=" \3"/p
34015 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
34016 d
34017 :bsnl
34018 s/["\\]/\\&/g
34019 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
34020 D["\1"]=" \3\\\\\\n"\\/p
34021 t cont
34022 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
34023 t cont
34024 d
34025 :cont
34026 n
34027 s/.\{148\}/&'"$ac_delim"'/g
34028 t clear
34029 :clear
34030 s/\\$//
34031 t bsnlc
34032 s/["\\]/\\&/g; s/^/"/; s/$/"/p
34033 d
34034 :bsnlc
34035 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
34036 b cont
34037 ' <confdefs.h | sed '
34038 s/'"$ac_delim"'/"\\\
34039 "/g' >>$CONFIG_STATUS || ac_write_fail=1
34040 
34041 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34042   for (key in D) D_is_set[key] = 1
34043   FS = ""
34044 }
34045 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
34046   line = \$ 0
34047   split(line, arg, " ")
34048   if (arg[1] == "#") {
34049     defundef = arg[2]
34050     mac1 = arg[3]
34051   } else {
34052     defundef = substr(arg[1], 2)
34053     mac1 = arg[2]
34054   }
34055   split(mac1, mac2, "(") #)
34056   macro = mac2[1]
34057   prefix = substr(line, 1, index(line, defundef) - 1)
34058   if (D_is_set[macro]) {
34059     # Preserve the white space surrounding the "#".
34060     print prefix "define", macro P[macro] D[macro]
34061     next
34062   } else {
34063     # Replace #undef with comments.  This is necessary, for example,
34064     # in the case of _POSIX_SOURCE, which is predefined and required
34065     # on some systems where configure will not decide to define it.
34066     if (defundef == "undef") {
34067       print "/*", prefix defundef, macro, "*/"
34068       next
34069     }
34070   }
34071 }
34072 { print }
34073 _ACAWK
34074 _ACEOF
34075 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34076   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
34077 fi # test -n "$CONFIG_HEADERS"
34078 
34079 
34080 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
34081 shift
34082 for ac_tag
34083 do
34084   case $ac_tag in
34085   :[FHLC]) ac_mode=$ac_tag; continue;;
34086   esac
34087   case $ac_mode$ac_tag in
34088   :[FHL]*:*);;
34089   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
34090   :[FH]-) ac_tag=-:-;;
34091   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
34092   esac
34093   ac_save_IFS=$IFS
34094   IFS=:
34095   set x $ac_tag
34096   IFS=$ac_save_IFS
34097   shift
34098   ac_file=$1
34099   shift
34100 
34101   case $ac_mode in
34102   :L) ac_source=$1;;
34103   :[FH])
34104     ac_file_inputs=
34105     for ac_f
34106     do
34107       case $ac_f in
34108       -) ac_f="$tmp/stdin";;
34109       *) # Look for the file first in the build tree, then in the source tree
34110          # (if the path is not absolute).  The absolute path cannot be DOS-style,
34111          # because $ac_f cannot contain `:'.
34112          test -f "$ac_f" ||
34113            case $ac_f in
34114            [\\/$]*) false;;
34115            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
34116            esac ||
34117            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
34118       esac
34119       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
34120       as_fn_append ac_file_inputs " '$ac_f'"
34121     done
34122 
34123     # Let's still pretend it is `configure' which instantiates (i.e., don't
34124     # use $as_me), people would be surprised to read:
34125     #    /* config.h.  Generated by config.status.  */
34126     configure_input='Generated from '`
34127           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
34128         `' by configure.'
34129     if test x"$ac_file" != x-; then
34130       configure_input="$ac_file.  $configure_input"
34131       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
34132 $as_echo "$as_me: creating $ac_file" >&6;}
34133     fi
34134     # Neutralize special characters interpreted by sed in replacement strings.
34135     case $configure_input in #(
34136     *\&* | *\|* | *\\* )
34137        ac_sed_conf_input=`$as_echo "$configure_input" |
34138        sed 's/[\\\\&|]/\\\\&/g'`;; #(
34139     *) ac_sed_conf_input=$configure_input;;
34140     esac
34141 
34142     case $ac_tag in
34143     *:-:* | *:-) cat >"$tmp/stdin" \
34144       || as_fn_error $? "could not create $ac_file" "$LINENO" 5  ;;
34145     esac
34146     ;;
34147   esac
34148 
34149   ac_dir=`$as_dirname -- "$ac_file" ||
34150 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
34151          X"$ac_file" : 'X\(//\)[^/]' \| \
34152          X"$ac_file" : 'X\(//\)$' \| \
34153          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
34154 $as_echo X"$ac_file" |
34155     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
34156             s//\1/
34157             q
34158           }
34159           /^X\(\/\/\)[^/].*/{
34160             s//\1/
34161             q
34162           }
34163           /^X\(\/\/\)$/{
34164             s//\1/
34165             q
34166           }
34167           /^X\(\/\).*/{
34168             s//\1/
34169             q
34170           }
34171           s/.*/./; q'`
34172   as_dir="$ac_dir"; as_fn_mkdir_p
34173   ac_builddir=.
34174 
34175 case "$ac_dir" in
34176 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
34177 *)
34178   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
34179   # A ".." for each directory in $ac_dir_suffix.
34180   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
34181   case $ac_top_builddir_sub in
34182   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
34183   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
34184   esac ;;
34185 esac
34186 ac_abs_top_builddir=$ac_pwd
34187 ac_abs_builddir=$ac_pwd$ac_dir_suffix
34188 # for backward compatibility:
34189 ac_top_builddir=$ac_top_build_prefix
34190 
34191 case $srcdir in
34192   .)  # We are building in place.
34193     ac_srcdir=.
34194     ac_top_srcdir=$ac_top_builddir_sub
34195     ac_abs_top_srcdir=$ac_pwd ;;
34196   [\\/]* | ?:[\\/]* )  # Absolute name.
34197     ac_srcdir=$srcdir$ac_dir_suffix;
34198     ac_top_srcdir=$srcdir
34199     ac_abs_top_srcdir=$srcdir ;;
34200   *) # Relative name.
34201     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
34202     ac_top_srcdir=$ac_top_build_prefix$srcdir
34203     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
34204 esac
34205 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
34206 
34207 
34208   case $ac_mode in
34209   :F)
34210   #
34211   # CONFIG_FILE
34212   #
34213 
34214 _ACEOF
34215 
34216 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34217 # If the template does not know about datarootdir, expand it.
34218 # FIXME: This hack should be removed a few years after 2.60.
34219 ac_datarootdir_hack=; ac_datarootdir_seen=
34220 ac_sed_dataroot='
34221 /datarootdir/ {
34222   p
34223   q
34224 }
34225 /@datadir@/p
34226 /@docdir@/p
34227 /@infodir@/p
34228 /@localedir@/p
34229 /@mandir@/p'
34230 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
34231 *datarootdir*) ac_datarootdir_seen=yes;;
34232 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
34233   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
34234 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
34235 _ACEOF
34236 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34237   ac_datarootdir_hack='
34238   s&@datadir@&$datadir&g
34239   s&@docdir@&$docdir&g
34240   s&@infodir@&$infodir&g
34241   s&@localedir@&$localedir&g
34242   s&@mandir@&$mandir&g
34243   s&\\\${datarootdir}&$datarootdir&g' ;;
34244 esac
34245 _ACEOF
34246 
34247 # Neutralize VPATH when `$srcdir' = `.'.
34248 # Shell code in configure.ac might set extrasub.
34249 # FIXME: do we really want to maintain this feature?
34250 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34251 ac_sed_extra="$ac_vpsub
34252 $extrasub
34253 _ACEOF
34254 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34255 :t
34256 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
34257 s|@configure_input@|$ac_sed_conf_input|;t t
34258 s&@top_builddir@&$ac_top_builddir_sub&;t t
34259 s&@top_build_prefix@&$ac_top_build_prefix&;t t
34260 s&@srcdir@&$ac_srcdir&;t t
34261 s&@abs_srcdir@&$ac_abs_srcdir&;t t
34262 s&@top_srcdir@&$ac_top_srcdir&;t t
34263 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
34264 s&@builddir@&$ac_builddir&;t t
34265 s&@abs_builddir@&$ac_abs_builddir&;t t
34266 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
34267 $ac_datarootdir_hack
34268 "
34269 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
34270   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34271 
34272 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
34273   { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
34274   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
34275   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
34276 which seems to be undefined.  Please make sure it is defined" >&5
34277 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
34278 which seems to be undefined.  Please make sure it is defined" >&2;}
34279 
34280   rm -f "$tmp/stdin"
34281   case $ac_file in
34282   -) cat "$tmp/out" && rm -f "$tmp/out";;
34283   *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
34284   esac \
34285   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34286  ;;
34287   :H)
34288   #
34289   # CONFIG_HEADER
34290   #
34291   if test x"$ac_file" != x-; then
34292     {
34293       $as_echo "/* $configure_input  */" \
34294       && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
34295     } >"$tmp/config.h" \
34296       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34297     if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
34298       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
34299 $as_echo "$as_me: $ac_file is unchanged" >&6;}
34300     else
34301       rm -f "$ac_file"
34302       mv "$tmp/config.h" "$ac_file" \
34303         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34304     fi
34305   else
34306     $as_echo "/* $configure_input  */" \
34307       && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
34308       || as_fn_error $? "could not create -" "$LINENO" 5
34309   fi
34310  ;;
34311 
34312 
34313   esac
34314 
34315 done # for ac_tag
34316 
34317 
34318 as_fn_exit 0
34319 _ACEOF
34320 ac_clean_files=$ac_clean_files_save
34321 
34322 test $ac_write_fail = 0 ||
34323   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
34324 
34325 
34326 # configure is writing to config.log, and then calls config.status.
34327 # config.status does its own redirection, appending to config.log.
34328 # Unfortunately, on DOS this fails, as config.log is still kept open
34329 # by configure, so config.status won't be able to write to it; its
34330 # output is simply discarded.  So we exec the FD to /dev/null,
34331 # effectively closing config.log, so it can be properly (re)opened and
34332 # appended to by config.status.  When coming back to configure, we
34333 # need to make the FD available again.
34334 if test "$no_create" != yes; then
34335   ac_cs_success=:
34336   ac_config_status_args=
34337   test "$silent" = yes &&
34338     ac_config_status_args="$ac_config_status_args --quiet"
34339   exec 5>/dev/null
34340   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
34341   exec 5>>config.log
34342   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
34343   # would make configure fail if this is the last instruction.
34344   $ac_cs_success || as_fn_exit 1
34345 fi
34346 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
34347   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
34348 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
34349 fi
34350 
34351 
34352 # Make the compare script executable
34353 $CHMOD +x $OUTPUT_ROOT/compare.sh
34354 
34355 # Finally output some useful information to the user
34356 
34357 # Finally output some useful information to the user
34358 
34359 if test "x$CCACHE" != x; then
34360   CCACHE_STATUS="installed and in use"
34361 else
34362   if test "x$GCC" = xyes; then
34363     CCACHE_STATUS="not installed (consider installing)"
34364     CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
34365   else
34366     CCACHE_STATUS="not available for your system"
34367   fi
34368 fi
34369 
34370 printf "\n"
34371 printf "====================================================\n"
34372 printf "A new configuration has been successfully created in\n"
34373 printf "$OUTPUT_ROOT\n"
34374 if test "x$CONFIGURE_COMMAND_LINE" != x; then
34375         printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
34376 else
34377         printf "using default settings.\n"
34378 fi
34379 
34380 printf "\n"
34381 printf "Configuration summary:\n"
34382 printf "* Debug level:    $DEBUG_LEVEL\n"
34383 printf "* JDK variant:    $JDK_VARIANT\n"
34384 printf "* JVM variants:   $with_jvm_variants\n"
34385 printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
34386 
34387 printf "\n"
34388 printf "Tools summary:\n"
34389 if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
34390   printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
34391 fi
34392 printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
34393 printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
34394 printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
34395 
34396 printf "\n"
34397 printf "Build performance summary:\n"
34398 printf "* Cores to use:   $JOBS\n"
34399 printf "* Memory limit:   $MEMORY_SIZE MB\n"
34400 printf "* ccache status:  $CCACHE_STATUS\n"
34401 printf "\n"
34402 
34403 if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
34404         printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
34405         printf "$CCACHE_HELP_MSG\n"
34406 
34407     # Print a helpful message on how to acquire the necessary build dependency.
34408     # ccache is the help tag: freetyp2, cups, pulse, alsa etc
34409     MISSING_DEPENDENCY=ccache
34410     PKGHANDLER_COMMAND=
34411 
34412     case $PKGHANDLER in
34413         apt-get)
34414                 apt_help     $MISSING_DEPENDENCY ;;
34415     yum)
34416                 yum_help     $MISSING_DEPENDENCY ;;
34417         port)
34418                 port_help    $MISSING_DEPENDENCY ;;
34419         pkgutil)
34420                 pkgutil_help $MISSING_DEPENDENCY ;;
34421         pkgadd)
34422                 pkgadd_help  $MISSING_DEPENDENCY ;;
34423     * )
34424       break ;;
34425     esac
34426 
34427     if test "x$PKGHANDLER_COMMAND" != x; then
34428         HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34429     fi
34430 
34431         printf "$HELP_MSG\n"
34432         printf "\n"
34433 fi
34434 
34435 if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
34436         printf "NOTE: You have requested to build more than one version of the JVM, which\n"
34437         printf "will result in longer build times.\n"
34438         printf "\n"
34439 fi
34440 
34441 if test "x$FOUND_ALT_VARIABLES" != "x"; then
34442         printf "WARNING: You have old-style ALT_ environment variables set.\n"
34443         printf "These are not respected, and will be ignored. It is recommended\n"
34444         printf "that you clean your environment. The following variables are set:\n"
34445         printf "$FOUND_ALT_VARIABLES\n"
34446         printf "\n"
34447 fi
34448 
34449 if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
34450         printf "WARNING: Your build output directory is not on a local disk.\n"
34451         printf "This will severely degrade build performance!\n"
34452         printf "It is recommended that you create an output directory on a local disk,\n"
34453         printf "and run the configure script again from that directory.\n"
34454         printf "\n"
34455 fi
34456 
34457 if test "x$IS_RECONFIGURE" = "xyes"; then
34458         printf "WARNING: The result of this configuration has overridden an older\n"
34459         printf "configuration. You *should* run 'make clean' to make sure you get a\n"
34460         printf "proper build. Failure to do so might result in strange build problems.\n"
34461         printf "\n"
34462 fi
34463